diff options
author | TokieSan <eltokhy@aucegypt.edu> | 2023-06-06 21:51:42 +0300 |
---|---|---|
committer | Thorsten Behrens <thorsten.behrens@allotropia.de> | 2023-06-18 22:03:43 +0200 |
commit | 46722dbaa7795074e3c5043a76ae3f3a7782491e (patch) | |
tree | 2f4e2549508b2f659209efa1a574490234010e85 /xmlsecurity/source/component | |
parent | 68a4f005bc3e74d847e82dddf3237137cf3a1648 (diff) |
tdf#155665 Adding option to remember signatures for each save
Added the option in digital signatures dialog to remember used
signature.
Implemented ResignDocument function in objserv.cxx to resign after
every save in case the option to remember signature is on.
Added a new dialog box that checks whether there is a need to
remember the signature.
Change-Id: Ia7dbcc952044e9542e3fe6cd84b5d6633fcd1461
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/152687
Reviewed-by: Heiko Tietze <heiko.tietze@documentfoundation.org>
Reviewed-by: Thorsten Behrens <thorsten.behrens@allotropia.de>
Tested-by: Thorsten Behrens <thorsten.behrens@allotropia.de>
Diffstat (limited to 'xmlsecurity/source/component')
-rw-r--r-- | xmlsecurity/source/component/documentdigitalsignatures.cxx | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/xmlsecurity/source/component/documentdigitalsignatures.cxx b/xmlsecurity/source/component/documentdigitalsignatures.cxx index 990fa5dea739..0fd029fc2d81 100644 --- a/xmlsecurity/source/component/documentdigitalsignatures.cxx +++ b/xmlsecurity/source/component/documentdigitalsignatures.cxx @@ -869,7 +869,13 @@ bool DocumentDigitalSignatures::signWithCertificateImpl( aSignatureManager.setSignatureStream(xStream); aSignatureManager.setModel(xModel); - Reference<XXMLSecurityContext> xSecurityContext = aSignatureManager.getSecurityContext(); + Reference<XXMLSecurityContext> xSecurityContext; + Reference<XServiceInfo> xServiceInfo(xCertificate, UNO_QUERY); + if (xServiceInfo->getImplementationName() + == "com.sun.star.xml.security.gpg.XCertificate_GpgImpl") + xSecurityContext = aSignatureManager.getGpgSecurityContext(); + else + xSecurityContext = aSignatureManager.getSecurityContext(); sal_Int32 nSecurityId; |