diff options
author | Malte Timmermann <mt@openoffice.org> | 2004-07-15 06:16:12 +0000 |
---|---|---|
committer | Malte Timmermann <mt@openoffice.org> | 2004-07-15 06:16:12 +0000 |
commit | 9e997f79d05ae5be084bed24758f38d4c49328c3 (patch) | |
tree | dfe79105170d593887907e44bc3e4ec8dddbc3b3 /xmlsecurity/workben | |
parent | b95222d74caa71fa217ac713048d2694816d38f5 (diff) |
...
Diffstat (limited to 'xmlsecurity/workben')
-rw-r--r-- | xmlsecurity/workben/signaturetest.cxx | 19 |
1 files changed, 15 insertions, 4 deletions
diff --git a/xmlsecurity/workben/signaturetest.cxx b/xmlsecurity/workben/signaturetest.cxx index be0d061f87bc..95309a87d7da 100644 --- a/xmlsecurity/workben/signaturetest.cxx +++ b/xmlsecurity/workben/signaturetest.cxx @@ -2,9 +2,9 @@ * * $RCSfile: signaturetest.cxx,v $ * - * $Revision: 1.2 $ + * $Revision: 1.3 $ * - * last change: $Author: mt $ $Date: 2004-07-14 11:05:47 $ + * last change: $Author: mt $ $Date: 2004-07-15 07:16:12 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -421,8 +421,19 @@ IMPL_LINK( MyWin, VerifyDigitalSignaturesHdl, Button*, EMPTYARG ) comphelper::getProcessServiceFactory()->createInstance( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM ( "com.sun.star.security.DocumentDigitalSignatures" ) ) ), uno::UNO_QUERY ); if ( xD.is() ) { - com::sun::star::uno::Sequence< ::com::sun::star::security::DocumentSignaturesInformation > aInfos = xD->VerifyDocumentContentSignatures( xStore ); - // ... + uno::Sequence< security::DocumentSignaturesInformation > aInfos = xD->VerifyDocumentContentSignatures( xStore ); + int nInfos = aInfos.getLength(); + for ( int n = 0; n < nInfos; n++ ) + { + security::DocumentSignaturesInformation& rInf = aInfos[n]; + String aText( RTL_CONSTASCII_USTRINGPARAM( "The document is signed by\n\n " ) ); + aText += String( rInf.Signer->getSubjectName() ); + aText += String( RTL_CONSTASCII_USTRINGPARAM( "\n\n The signature is " ) ); + if ( !rInf.SignatureIsValid ) + aText += String( RTL_CONSTASCII_USTRINGPARAM( "NOT " ) ); + aText += String( RTL_CONSTASCII_USTRINGPARAM( "valid" ) ); + InfoBox( this, aText ).Execute(); + } } |