diff options
author | Malte Timmermann <mt@openoffice.org> | 2004-08-18 08:14:42 +0000 |
---|---|---|
committer | Malte Timmermann <mt@openoffice.org> | 2004-08-18 08:14:42 +0000 |
commit | bca76a4f9deb7443cb405fb34b08f4c8672cb8a6 (patch) | |
tree | ec084a0939b9c8224846d7b1837f8a3963a373b6 | |
parent | b37421615c65263ac9cd72798efd3fd511b5aa45 (diff) |
#i20156# Some improvements...
-rw-r--r-- | xmlsecurity/inc/xmlsecurity/xmlsignaturehelper.hxx | 5 | ||||
-rw-r--r-- | xmlsecurity/prj/build.lst | 2 | ||||
-rw-r--r-- | xmlsecurity/source/dialogs/digitalsignaturesdialog.cxx | 11 | ||||
-rw-r--r-- | xmlsecurity/source/helper/xmlsignaturehelper.cxx | 9 | ||||
-rw-r--r-- | xmlsecurity/source/helper/xsecctl.cxx | 24 | ||||
-rw-r--r-- | xmlsecurity/source/helper/xsecctl.hxx | 11 |
6 files changed, 34 insertions, 28 deletions
diff --git a/xmlsecurity/inc/xmlsecurity/xmlsignaturehelper.hxx b/xmlsecurity/inc/xmlsecurity/xmlsignaturehelper.hxx index c6dfb0ffe..ec3af4de1 100644 --- a/xmlsecurity/inc/xmlsecurity/xmlsignaturehelper.hxx +++ b/xmlsecurity/inc/xmlsecurity/xmlsignaturehelper.hxx @@ -2,9 +2,9 @@ * * $RCSfile: xmlsignaturehelper.hxx,v $ * - * $Revision: 1.5 $ + * $Revision: 1.6 $ * - * last change: $Author: mt $ $Date: 2004-07-26 15:45:14 $ + * last change: $Author: mt $ $Date: 2004-08-18 09:14:40 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -189,6 +189,7 @@ public: ::com::sun::star::uno::Reference< ::com::sun::star::xml::crypto::XSecurityEnvironment > GetSecurityEnvironment(); // After signing/veryfieng, get information about signatures + SignatureInformation GetSignatureInformation( sal_Int32 nSecurityId ) const; SignatureInformations GetSignatureInformations() const; // See XSecController for documentation diff --git a/xmlsecurity/prj/build.lst b/xmlsecurity/prj/build.lst index 5659e9664..031e6c286 100644 --- a/xmlsecurity/prj/build.lst +++ b/xmlsecurity/prj/build.lst @@ -1,4 +1,4 @@ -xs xmlsecurity : xmloff offapi unoil svx moz NULL +xs xmlsecurity : xmloff offapi unoil svx moz libxmlsec NULL xs xmlsecurity usr1 - all xs_mkout NULL xs xmlsecurity\source\framework nmake - all xs_fw NULL xs xmlsecurity\source\xmlsec\nss nmake - all xs_nss NULL diff --git a/xmlsecurity/source/dialogs/digitalsignaturesdialog.cxx b/xmlsecurity/source/dialogs/digitalsignaturesdialog.cxx index c54d7967b..5bbc98c02 100644 --- a/xmlsecurity/source/dialogs/digitalsignaturesdialog.cxx +++ b/xmlsecurity/source/dialogs/digitalsignaturesdialog.cxx @@ -2,9 +2,9 @@ * * $RCSfile: digitalsignaturesdialog.cxx,v $ * - * $Revision: 1.13 $ + * $Revision: 1.14 $ * - * last change: $Author: mmi $ $Date: 2004-08-12 02:29:21 $ + * last change: $Author: mt $ $Date: 2004-08-18 09:14:41 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -285,14 +285,15 @@ IMPL_LINK( DigitalSignaturesDialog, AddButtonHdl, Button*, EMPTYARG ) maSignatureHelper.ExportSignature( xDocumentHandler, maCurrentSignatureInformations[n]); // Create a new one... - bool bDone = maSignatureHelper.CreateAndWriteSignature( xDocumentHandler ); + maSignatureHelper.CreateAndWriteSignature( xDocumentHandler ); // That's it... maSignatureHelper.CloseDocumentHandler( xDocumentHandler); maSignatureHelper.EndMission(); - - if ( bDone ) + + sal_Int32 nStatus = maSignatureHelper.GetSignatureInformation( nSecurityId ).nStatus; + if ( nStatus == STATUS_CREATION_SUCCEED ) { uno::Reference< embed::XTransactedObject > xTrans( aStreamHelper.xSignatureStorage, uno::UNO_QUERY ); xTrans->commit(); diff --git a/xmlsecurity/source/helper/xmlsignaturehelper.cxx b/xmlsecurity/source/helper/xmlsignaturehelper.cxx index dcf29e472..0e36da60d 100644 --- a/xmlsecurity/source/helper/xmlsignaturehelper.cxx +++ b/xmlsecurity/source/helper/xmlsignaturehelper.cxx @@ -2,9 +2,9 @@ * * $RCSfile: xmlsignaturehelper.cxx,v $ * - * $Revision: 1.17 $ + * $Revision: 1.18 $ * - * last change: $Author: mmi $ $Date: 2004-08-12 02:29:21 $ + * last change: $Author: mt $ $Date: 2004-08-18 09:14:42 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -443,6 +443,11 @@ bool XMLSignatureHelper::ReadAndVerifySignature( const com::sun::star::uno::Refe return !mbError; } +SignatureInformation XMLSignatureHelper::GetSignatureInformation( sal_Int32 nSecurityId ) const +{ + return mpXSecController->getSignatureInformation( nSecurityId ); +} + SignatureInformations XMLSignatureHelper::GetSignatureInformations() const { return mpXSecController->getSignatureInformations(); diff --git a/xmlsecurity/source/helper/xsecctl.cxx b/xmlsecurity/source/helper/xsecctl.cxx index 7dcfa8225..5ed7c8ede 100644 --- a/xmlsecurity/source/helper/xsecctl.cxx +++ b/xmlsecurity/source/helper/xsecctl.cxx @@ -2,9 +2,9 @@ * * $RCSfile: xsecctl.cxx,v $ * - * $Revision: 1.3 $ + * $Revision: 1.4 $ * - * last change: $Author: mmi $ $Date: 2004-08-12 02:29:21 $ + * last change: $Author: mt $ $Date: 2004-08-18 09:14:42 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -296,7 +296,7 @@ sal_Bool XSecController::convertDateTime( com::sun::star::util::DateTime& rDateT return bSuccess; } -int XSecController::findSignatureInfor( sal_Int32 nSecurityId) +int XSecController::findSignatureInfor( sal_Int32 nSecurityId) const /****** XSecController/findSignatureInfor ************************************* * * NAME @@ -1379,21 +1379,19 @@ void XSecController::exportSignature( xDocumentHandler->endElement( tag_Signature ); } -bool XSecController::getSignatureInfor( sal_Int32 nSecurityId, SignatureInformation& signatureInfor ) +SignatureInformation XSecController::getSignatureInformation( sal_Int32 nSecurityId ) const { - int index = findSignatureInfor(nSecurityId); - if (index == -1) + SignatureInformation aInf( 0 ); + int nIndex = findSignatureInfor(nSecurityId); + DBG_ASSERT( nIndex != -1, "getSignatureInformation - SecurityId is invalid!" ); + if ( nIndex != -1) { - return false; - } - else - { - signatureInfor = m_vInternalSignatureInformations[index].signatureInfor; - return true; + aInf = m_vInternalSignatureInformations[nIndex].signatureInfor; } + return aInf; } -SignatureInformations XSecController::getSignatureInformations() +SignatureInformations XSecController::getSignatureInformations() const { SignatureInformations vInfors; int sigNum = m_vInternalSignatureInformations.size(); diff --git a/xmlsecurity/source/helper/xsecctl.hxx b/xmlsecurity/source/helper/xsecctl.hxx index 5044b2b10..27e732f7d 100644 --- a/xmlsecurity/source/helper/xsecctl.hxx +++ b/xmlsecurity/source/helper/xsecctl.hxx @@ -2,9 +2,9 @@ * * $RCSfile: xsecctl.hxx,v $ * - * $Revision: 1.4 $ + * $Revision: 1.5 $ * - * last change: $Author: mmi $ $Date: 2004-08-12 02:29:21 $ + * last change: $Author: mt $ $Date: 2004-08-18 09:14:42 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -411,7 +411,7 @@ private: sal_Bool convertDateTime( com::sun::star::util::DateTime& rDateTime, const ::rtl::OUString& rString ); void createXSecComponent( ); - int findSignatureInfor( sal_Int32 nSecurityId ); + int findSignatureInfor( sal_Int32 nSecurityId ) const; bool chainOn( bool bRetrievingLastEvent ); void chainOff(); void checkChainingStatus(); @@ -497,8 +497,9 @@ public: void clearSAXChainConnector(); void endMission(); const char* getErrorMessage(); - bool getSignatureInfor( sal_Int32 nSecurityId, SignatureInformation& signatureInfor ); - SignatureInformations getSignatureInformations(); + + SignatureInformation getSignatureInformation( sal_Int32 nSecurityId ) const; + SignatureInformations getSignatureInformations() const; void exportSignature( const com::sun::star::uno::Reference< |