From 003b09a3ec2e4db5782635db9acc44ef01433eb2 Mon Sep 17 00:00:00 2001 From: Vladimir Glazounov Date: Mon, 18 Aug 2008 12:13:05 +0000 Subject: [PATCH] INTEGRATION: CWS cmcfixes48 (1.12.22); FILE MERGED 2008/08/01 13:54:31 cmc 1.12.22.1: #i92247# remove duplication of object code, link only the single library to libxmlsec1, and update some stuff to new api --- xmlsecurity/source/dialogs/certificatechooser.cxx | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/xmlsecurity/source/dialogs/certificatechooser.cxx b/xmlsecurity/source/dialogs/certificatechooser.cxx index 8e618d786fcb..1da33b586fe7 100644 --- a/xmlsecurity/source/dialogs/certificatechooser.cxx +++ b/xmlsecurity/source/dialogs/certificatechooser.cxx @@ -7,7 +7,7 @@ * OpenOffice.org - a multi-platform office productivity suite * * $RCSfile: certificatechooser.cxx,v $ - * $Revision: 1.12 $ + * $Revision: 1.13 $ * * This file is part of OpenOffice.org. * @@ -36,9 +36,11 @@ #include #include #include +#include #include #include +#include #include #include @@ -64,7 +66,7 @@ USHORT CertificateChooser::GetSelectedEntryPos( void ) const return (USHORT) nSel; } -CertificateChooser::CertificateChooser( Window* _pParent, uno::Reference< dcss::xml::crypto::XSecurityEnvironment >& _rxSecurityEnvironment, const SignatureInformations& _rCertsToIgnore ) +CertificateChooser::CertificateChooser( Window* _pParent, uno::Reference< uno::XComponentContext>& _rxCtx, uno::Reference< dcss::xml::crypto::XSecurityEnvironment >& _rxSecurityEnvironment, const SignatureInformations& _rCertsToIgnore ) :ModalDialog ( _pParent, XMLSEC_RES( RID_XMLSECDLG_CERTCHOOSER ) ) ,maCertsToIgnore( _rCertsToIgnore ) ,maHintFT ( this, XMLSEC_RES( FT_HINT_SELECT ) ) @@ -84,6 +86,7 @@ CertificateChooser::CertificateChooser( Window* _pParent, uno::Reference< dcss:: FreeResource(); + mxCtx = _rxCtx; mxSecurityEnvironment = _rxSecurityEnvironment; mbInitialized = FALSE; @@ -135,6 +138,9 @@ void CertificateChooser::ImplInitialize() { } + uno::Reference< dcss::security::XSerialNumberAdapter> xSerialNumberAdapter = + ::com::sun::star::security::SerialNumberAdapter::create(mxCtx); + sal_Int32 nCertificates = maCerts.getLength(); sal_Int32 nCertificatesToIgnore = maCertsToIgnore.size(); for( sal_Int32 nCert = nCertificates; nCert; ) @@ -150,7 +156,7 @@ void CertificateChooser::ImplInitialize() { const SignatureInformation& rInf = maCertsToIgnore[ nSig ]; if ( ( aIssuerName == rInf.ouX509IssuerName ) && - ( bigIntegerToNumericString( xCert->getSerialNumber() ) == rInf.ouX509SerialNumber ) ) + ( xSerialNumberAdapter->toString( xCert->getSerialNumber() ) == rInf.ouX509SerialNumber ) ) { bIgnoreThis = true; break;