diff options
author | Thorsten Behrens <Thorsten.Behrens@CIB.de> | 2017-05-24 07:03:23 +0200 |
---|---|---|
committer | Thorsten Behrens <Thorsten.Behrens@CIB.de> | 2017-06-21 22:16:55 +0200 |
commit | 0e226d4c193824d79f71d6918038de48afffaf26 (patch) | |
tree | a5502e2394ab11e3f0572ee5cebfd5a7c359923a /xmlsecurity/source/component | |
parent | 2186d7b7f63712c5203fb86677afa3a5e6e933cb (diff) |
gpg4libre: initial GPG signature validation
Change-Id: I80afd77f74a6cb3f3fb7da03a6a4b74b132360d2
Diffstat (limited to 'xmlsecurity/source/component')
-rw-r--r-- | xmlsecurity/source/component/documentdigitalsignatures.cxx | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/xmlsecurity/source/component/documentdigitalsignatures.cxx b/xmlsecurity/source/component/documentdigitalsignatures.cxx index 4dfa87edeeda..7d2068d8133b 100644 --- a/xmlsecurity/source/component/documentdigitalsignatures.cxx +++ b/xmlsecurity/source/component/documentdigitalsignatures.cxx @@ -307,6 +307,7 @@ DocumentDigitalSignatures::ImplVerifySignatures( rSignatureHelper.EndMission(); uno::Reference<xml::crypto::XSecurityEnvironment> xSecEnv = aSignatureManager.getSecurityEnvironment(); + uno::Reference<xml::crypto::XSecurityEnvironment> xGpgSecEnv = aSignatureManager.getGpgSecurityEnvironment(); SignatureInformations aSignInfos = rSignatureHelper.GetSignatureInformations(); int nInfos = aSignInfos.size(); @@ -359,7 +360,11 @@ DocumentDigitalSignatures::ImplVerifySignatures( { //We should always be able to get the certificates because it is contained in the document, //unless the document is damaged so that signature xml file could not be parsed. - rSigInfo.CertificateStatus = css::security::CertificateValidity::INVALID; + rSigInfo.CertificateStatus = + xGpgSecEnv->verifyCertificate(rSigInfo.Signer, + Sequence<Reference<css::security::XCertificate> >()); + // well - except for gpg signatures ... + //rSigInfo.CertificateStatus = css::security::CertificateValidity::INVALID; } rSigInfo.SignatureIsValid = ( rInfo.nStatus == css::xml::crypto::SecurityOperationStatus_OPERATION_SUCCEEDED ); |