summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--xmlsecurity/inc/xmlsecurity/certificateviewer.hxx6
-rw-r--r--xmlsecurity/inc/xmlsecurity/macrosecurity.hxx9
-rw-r--r--xmlsecurity/source/component/documentdigitalsignatures.cxx28
-rw-r--r--xmlsecurity/source/component/documentdigitalsignatures.hxx5
-rw-r--r--xmlsecurity/source/dialogs/certificateviewer.cxx8
-rw-r--r--xmlsecurity/source/dialogs/macrosecurity.cxx14
-rw-r--r--xmlsecurity/source/xmlsec/nss/seinitializer_nssimpl.cxx7
-rw-r--r--xmlsecurity/util/makefile.mk16
8 files changed, 46 insertions, 47 deletions
diff --git a/xmlsecurity/inc/xmlsecurity/certificateviewer.hxx b/xmlsecurity/inc/xmlsecurity/certificateviewer.hxx
index 2c1b5774b774..42edab819053 100644
--- a/xmlsecurity/inc/xmlsecurity/certificateviewer.hxx
+++ b/xmlsecurity/inc/xmlsecurity/certificateviewer.hxx
@@ -2,9 +2,9 @@
*
* $RCSfile: certificateviewer.hxx,v $
*
- * $Revision: 1.4 $
+ * $Revision: 1.5 $
*
- * last change: $Author: mt $ $Date: 2004-07-21 13:57:52 $
+ * last change: $Author: mt $ $Date: 2004-07-23 09:58:19 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -99,7 +99,7 @@ private:
cssu::Reference< dcss::xml::crypto::XSecurityEnvironment > mxSecurityEnvironment;
cssu::Reference< dcss::security::XCertificate > mxCert;
public:
- CertificateViewer( Window* pParent, cssu::Reference< dcss::xml::crypto::XSecurityEnvironment >& rxSecurityEnvironment, cssu::Reference< dcss::security::XCertificate >& rXCert );
+ CertificateViewer( Window* pParent, const cssu::Reference< dcss::xml::crypto::XSecurityEnvironment >& rxSecurityEnvironment, const cssu::Reference< dcss::security::XCertificate >& rXCert );
virtual ~CertificateViewer();
};
diff --git a/xmlsecurity/inc/xmlsecurity/macrosecurity.hxx b/xmlsecurity/inc/xmlsecurity/macrosecurity.hxx
index dee420e8d23d..61a19fbbf206 100644
--- a/xmlsecurity/inc/xmlsecurity/macrosecurity.hxx
+++ b/xmlsecurity/inc/xmlsecurity/macrosecurity.hxx
@@ -2,9 +2,9 @@
*
* $RCSfile: macrosecurity.hxx,v $
*
- * $Revision: 1.5 $
+ * $Revision: 1.6 $
*
- * last change: $Author: gt $ $Date: 2004-07-22 13:41:57 $
+ * last change: $Author: mt $ $Date: 2004-07-23 09:58:20 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -114,7 +114,6 @@ private:
HelpButton maHelpBtn;
PushButton maResetBtn;
- XMLSignatureHelper maSignatureHelper;
cssu::Reference< dcss::xml::crypto::XSecurityEnvironment > mxSecurityEnvironment;
SignatureInformations maCurrentSignatureInformations;
SvtSecurityOptions maSecOptions;
@@ -123,9 +122,7 @@ private:
DECL_LINK( OkBtnHdl, void* );
public:
- MacroSecurity( Window* pParent,
- cssu::Reference< css::lang::XMultiServiceFactory >& rxMSF,
- cssu::Reference< dcss::xml::crypto::XSecurityEnvironment >& rxSecurityEnvironment );
+ MacroSecurity( Window* pParent, cssu::Reference< dcss::xml::crypto::XSecurityEnvironment >& rxSecurityEnvironment );
virtual ~MacroSecurity();
inline void EnableReset( bool _bEnable = true );
diff --git a/xmlsecurity/source/component/documentdigitalsignatures.cxx b/xmlsecurity/source/component/documentdigitalsignatures.cxx
index 3bf3a642bcab..84f5157c970c 100644
--- a/xmlsecurity/source/component/documentdigitalsignatures.cxx
+++ b/xmlsecurity/source/component/documentdigitalsignatures.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: documentdigitalsignatures.cxx,v $
*
- * $Revision: 1.8 $
+ * $Revision: 1.9 $
*
- * last change: $Author: gt $ $Date: 2004-07-23 09:44:07 $
+ * last change: $Author: mt $ $Date: 2004-07-23 09:58:20 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -62,6 +62,7 @@
#include <documentdigitalsignatures.hxx>
#include <xmlsecurity/digitalsignaturesdialog.hxx>
+#include <xmlsecurity/certificateviewer.hxx>
#include <xmlsecurity/macrosecurity.hxx>
#include <xmlsecurity/baseencoding.hxx>
#include <../dialogs/resourcemanager.hxx>
@@ -159,13 +160,7 @@ com::sun::star::uno::Sequence< ::com::sun::star::security::DocumentSignaturesInf
if ( aStreamHelper.xSignatureStream.is() )
{
uno::Reference< io::XInputStream > xInputStream( aStreamHelper.xSignatureStream, uno::UNO_QUERY );
- bool bVerifyOK = aSignatureHelper.ReadAndVerifySignature( xInputStream );
-
- if ( bVerifyOK )
- {
- // SignatureInformations aInformations = aSignatureHelper.GetSignatureInformations();
- // ...
- }
+ aSignatureHelper.ReadAndVerifySignature( xInputStream );
}
aStreamHelper.Clear();
@@ -215,12 +210,21 @@ com::sun::star::uno::Sequence< ::com::sun::star::security::DocumentSignaturesInf
void DocumentDigitalSignatures::manageTrustedSources( ) throw (::com::sun::star::uno::RuntimeException)
{
- cssu::Reference< css::lang::XMultiServiceFactory > xMSF;
- cssu::Reference< dcss::xml::crypto::XSecurityEnvironment > xSecurityEnvironment;
- MacroSecurity aDlg( NULL, xMSF, xSecurityEnvironment );
+ XMLSignatureHelper aSignatureHelper( mxMSF );
+ aSignatureHelper.Init( rtl::OUString() );
+ MacroSecurity aDlg( NULL, aSignatureHelper.GetSecurityEnvironment() );
aDlg.Execute();
}
+void DocumentDigitalSignatures::ShowCertificate( const ::com::sun::star::uno::Reference< ::com::sun::star::security::XCertificate >& _Certificate ) throw (::com::sun::star::uno::RuntimeException)
+{
+ XMLSignatureHelper aSignatureHelper( mxMSF );
+ aSignatureHelper.Init( rtl::OUString() );
+ CertificateViewer aViewer( NULL, aSignatureHelper.GetSecurityEnvironment(), _Certificate );
+ aViewer.Execute();
+
+}
+
::sal_Bool DocumentDigitalSignatures::isAuthorTrusted( const ::com::sun::star::uno::Reference< ::com::sun::star::security::XCertificate >& Author ) throw (::com::sun::star::uno::RuntimeException)
{
return sal_False;
diff --git a/xmlsecurity/source/component/documentdigitalsignatures.hxx b/xmlsecurity/source/component/documentdigitalsignatures.hxx
index 659b8438501e..2f6ecfdcde95 100644
--- a/xmlsecurity/source/component/documentdigitalsignatures.hxx
+++ b/xmlsecurity/source/component/documentdigitalsignatures.hxx
@@ -2,9 +2,9 @@
*
* $RCSfile: documentdigitalsignatures.hxx,v $
*
- * $Revision: 1.3 $
+ * $Revision: 1.4 $
*
- * last change: $Author: mt $ $Date: 2004-07-16 15:58:49 $
+ * last change: $Author: mt $ $Date: 2004-07-23 09:58:21 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -96,6 +96,7 @@ public:
sal_Bool SAL_CALL SignPackage( const ::com::sun::star::uno::Reference< ::com::sun::star::embed::XStorage >& rxStorage ) throw (::com::sun::star::uno::RuntimeException);
com::sun::star::uno::Sequence< ::com::sun::star::security::DocumentSignaturesInformation > SAL_CALL VerifyPackageSignatures( const ::com::sun::star::uno::Reference< ::com::sun::star::embed::XStorage >& rxStorage ) throw (::com::sun::star::uno::RuntimeException);
void SAL_CALL ShowPackageSignatures( const ::com::sun::star::uno::Reference< ::com::sun::star::embed::XStorage >& Storage ) throw (::com::sun::star::uno::RuntimeException);
+ void SAL_CALL ShowCertificate( const ::com::sun::star::uno::Reference< ::com::sun::star::security::XCertificate >& Certificate ) throw (::com::sun::star::uno::RuntimeException);
void SAL_CALL manageTrustedSources( ) throw (::com::sun::star::uno::RuntimeException);
::sal_Bool SAL_CALL isAuthorTrusted( const ::com::sun::star::uno::Reference< ::com::sun::star::security::XCertificate >& Author ) throw (::com::sun::star::uno::RuntimeException);
diff --git a/xmlsecurity/source/dialogs/certificateviewer.cxx b/xmlsecurity/source/dialogs/certificateviewer.cxx
index 63adcabc3457..f27f648e69e6 100644
--- a/xmlsecurity/source/dialogs/certificateviewer.cxx
+++ b/xmlsecurity/source/dialogs/certificateviewer.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: certificateviewer.cxx,v $
*
- * $Revision: 1.9 $
+ * $Revision: 1.10 $
*
- * last change: $Author: mt $ $Date: 2004-07-22 15:37:38 $
+ * last change: $Author: mt $ $Date: 2004-07-23 09:58:21 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -140,8 +140,8 @@ namespace
CertificateViewer::CertificateViewer(
Window* _pParent,
- cssu::Reference< dcss::xml::crypto::XSecurityEnvironment >& _rxSecurityEnvironment,
- cssu::Reference< dcss::security::XCertificate >& _rXCert )
+ const cssu::Reference< dcss::xml::crypto::XSecurityEnvironment >& _rxSecurityEnvironment,
+ const cssu::Reference< dcss::security::XCertificate >& _rXCert )
:TabDialog ( _pParent, XMLSEC_RES( RID_XMLSECDLG_CERTVIEWER ) )
,maTabCtrl ( this, ResId( 1 ) )
,maOkBtn ( this, ResId( BTN_OK ) )
diff --git a/xmlsecurity/source/dialogs/macrosecurity.cxx b/xmlsecurity/source/dialogs/macrosecurity.cxx
index 1a512f401c85..5a33a348a478 100644
--- a/xmlsecurity/source/dialogs/macrosecurity.cxx
+++ b/xmlsecurity/source/dialogs/macrosecurity.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: macrosecurity.cxx,v $
*
- * $Revision: 1.11 $
+ * $Revision: 1.12 $
*
- * last change: $Author: gt $ $Date: 2004-07-22 13:38:46 $
+ * last change: $Author: mt $ $Date: 2004-07-23 09:58:22 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -124,9 +124,8 @@ IMPL_LINK( MacroSecurity, OkBtnHdl, void*, EMTYARG )
return 0;
}
-MacroSecurity::MacroSecurity( Window* _pParent, cssu::Reference< lang::XMultiServiceFactory >& rxMSF, cssu::Reference< dcss::xml::crypto::XSecurityEnvironment >& _rxSecurityEnvironment )
+MacroSecurity::MacroSecurity( Window* _pParent, cssu::Reference< dcss::xml::crypto::XSecurityEnvironment >& _rxSecurityEnvironment )
:TabDialog ( _pParent, XMLSEC_RES( RID_XMLSECTP_MACROSEC ) )
- ,maSignatureHelper ( rxMSF )
,maTabCtrl ( this, ResId( 1 ) )
,maOkBtn ( this, ResId( BTN_OK ) )
,maCancelBtn ( this, ResId( BTN_CANCEL ) )
@@ -263,16 +262,15 @@ IMPL_LINK( MacroSecurityTrustedSourcesTP, ViewCertPBHdl, void*, EMTYARG )
{
USHORT nSelected = USHORT( sal_Int32( maTrustCertLB.FirstSelected()->GetUserData() ) );
const SignatureInformation& rInfo = mpDlg->maCurrentSignatureInformations[ nSelected ];
- uno::Reference< dcss::security::XCertificate > xCert = mpDlg->maSignatureHelper.GetSecurityEnvironment()->getCertificate( rInfo.ouX509IssuerName, numericStringToBigInteger( rInfo.ouX509SerialNumber ) );
+ uno::Reference< dcss::security::XCertificate > xCert = mpDlg->mxSecurityEnvironment->getCertificate( rInfo.ouX509IssuerName, numericStringToBigInteger( rInfo.ouX509SerialNumber ) );
// If we don't get it, create it from signature data:
if ( !xCert.is() )
- xCert = mpDlg->maSignatureHelper.GetSecurityEnvironment()->createCertificateFromAscii( rInfo.ouX509Certificate ) ;
+ xCert = mpDlg->mxSecurityEnvironment->createCertificateFromAscii( rInfo.ouX509Certificate ) ;
DBG_ASSERT( xCert.is(), "*MacroSecurityTrustedSourcesTP::ViewCertPBHdl(): Certificate not found and can't be created!" );
- uno::Reference< css::xml::crypto::XSecurityEnvironment > xSecEnv = mpDlg->maSignatureHelper.GetSecurityEnvironment();
- CertificateViewer aViewer( this, xSecEnv, xCert );
+ CertificateViewer aViewer( this, mpDlg->mxSecurityEnvironment, xCert );
aViewer.Execute();
}
return 0;
diff --git a/xmlsecurity/source/xmlsec/nss/seinitializer_nssimpl.cxx b/xmlsecurity/source/xmlsec/nss/seinitializer_nssimpl.cxx
index 17014f4b1b1d..e199d07543b6 100644
--- a/xmlsecurity/source/xmlsec/nss/seinitializer_nssimpl.cxx
+++ b/xmlsecurity/source/xmlsec/nss/seinitializer_nssimpl.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: seinitializer_nssimpl.cxx,v $
*
- * $Revision: 1.9 $
+ * $Revision: 1.10 $
*
- * last change: $Author: mt $ $Date: 2004-07-23 08:34:25 $
+ * last change: $Author: mt $ $Date: 2004-07-23 09:58:22 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -241,10 +241,7 @@ cssu::Reference< cssxc::XXMLSecurityContext > SAL_CALL
pDefaultCertDir = new rtl::OString;
rtl::OUString ouCertDir;
if ( getMozillaCurrentProfile(ouCertDir) )
- {
*pDefaultCertDir = rtl::OString(ouCertDir, ouCertDir.getLength(), RTL_TEXTENCODING_ASCII_US);
- DBG_ERROR( pDefaultCertDir->getStr() );
- }
}
sCertDir = *pDefaultCertDir;
diff --git a/xmlsecurity/util/makefile.mk b/xmlsecurity/util/makefile.mk
index 1780605e01de..f652e78e0539 100644
--- a/xmlsecurity/util/makefile.mk
+++ b/xmlsecurity/util/makefile.mk
@@ -2,9 +2,9 @@
#
# $RCSfile: makefile.mk,v $
#
-# $Revision: 1.10 $
+# $Revision: 1.11 $
#
-# last change: $Author: mmi $ $Date: 2004-07-23 03:00:42 $
+# last change: $Author: mt $ $Date: 2004-07-23 09:58:23 $
#
# The Contents of this file are made available subject to the terms of
# either of the following licenses
@@ -160,7 +160,8 @@ SHL4TARGET=$(TARGET)
SHL4LIBS=\
$(SLB)$/helper.lib \
$(SLB)$/dialogs.lib \
- $(SLB)$/component.lib
+ $(SLB)$/component.lib \
+ $(SLB)$/xs_comm.lib
SHL4STDLIBS=\
$(CPPULIB) \
$(CPPUHELPERLIB) \
@@ -177,13 +178,14 @@ SHL4STDLIBS=\
$(SFXLIB) \
$(XMLOFFLIB) \
$(SVXLIB)
-
+
+#MT: Remove ixml2 and xs_comm (above) by cerating service for base encodings
.IF "$(GUI)"=="WNT"
-SHL4STDLIBS+= "xmlsec.lib" "xsec_xmlsec.lib"
+SHL4STDLIBS+= "ixml2.lib" "xmlsec.lib" "xsec_xmlsec.lib"
.ELSE
-SHL4STDLIBS+= "-lxmlsec" "-lxsec_xmlsec"
+SHL4STDLIBS+= "-lxml2" "-lxmlsec" "-lxsec_xmlsec"
.ENDIF
-
+
SHL4VERSIONMAP = xmlsecurity.map
SHL4DEPN=