summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMalte Timmermann <mt@openoffice.org>2004-08-18 08:14:42 +0000
committerMalte Timmermann <mt@openoffice.org>2004-08-18 08:14:42 +0000
commit85a1abd8b1dfaac7b0f87c2ab49f069a842ff1d5 (patch)
tree57f20548ad2b8e75bf85cfd3a6195456f5b31ba6
parentd3e69fe9ce604443baa91ff7cc09862beeefe853 (diff)
#i20156# Some improvements...
-rw-r--r--xmlsecurity/inc/xmlsecurity/xmlsignaturehelper.hxx5
-rw-r--r--xmlsecurity/prj/build.lst2
-rw-r--r--xmlsecurity/source/dialogs/digitalsignaturesdialog.cxx9
-rw-r--r--xmlsecurity/source/helper/xmlsignaturehelper.cxx9
-rw-r--r--xmlsecurity/source/helper/xsecctl.cxx24
-rw-r--r--xmlsecurity/source/helper/xsecctl.hxx11
6 files changed, 33 insertions, 27 deletions
diff --git a/xmlsecurity/inc/xmlsecurity/xmlsignaturehelper.hxx b/xmlsecurity/inc/xmlsecurity/xmlsignaturehelper.hxx
index e942dd3a5d19..7d97c7c769a5 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 5659e9664996..031e6c286c0a 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 2fa5ba8cd273..387cc1c5c0c9 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 89fb1ef8db0c..e71be13ea2ee 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 b4096aa5aa39..35c2333515e2 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 1f271b5fb360..ffdce8f5d623 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<