diff options
author | Vladimir Glazounov <vg@openoffice.org> | 2008-08-18 12:13:05 +0000 |
---|---|---|
committer | Vladimir Glazounov <vg@openoffice.org> | 2008-08-18 12:13:05 +0000 |
commit | 003b09a3ec2e4db5782635db9acc44ef01433eb2 (patch) | |
tree | 031933ed59e8f40f7032f060ab8e91bb5573e682 /xmlsecurity | |
parent | a3c032669d8a6c6f4fbb260bf493cb67ae31d1fa (diff) |
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
Diffstat (limited to 'xmlsecurity')
-rw-r--r-- | xmlsecurity/source/dialogs/certificatechooser.cxx | 12 |
1 files 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 <xmlsecurity/biginteger.hxx> #include <com/sun/star/xml/crypto/XSecurityEnvironment.hpp> #include <comphelper/sequence.hxx> +#include <comphelper/processfactory.hxx> #include <com/sun/star/security/NoPasswordException.hpp> #include <com/sun/star/security/CertificateCharacters.hpp> +#include <com/sun/star/security/SerialNumberAdapter.hpp> #include <dialogs.hrc> #include <resourcemanager.hxx> @@ -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; |