Kaydet (Commit) 85a1abd8 authored tarafından Malte Timmermann's avatar Malte Timmermann

#i20156# Some improvements...

üst d3e69fe9
......@@ -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
......
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
......
......@@ -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();
......
......@@ -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();
......
......@@ -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();
......
......@@ -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<
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment