diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2013-11-09 16:24:56 +0100 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2013-11-09 16:24:56 +0100 |
commit | 16b91e13c726b5b3f43c1aafde6fb8c4c18e3c77 (patch) | |
tree | 4b28ef83eae766ddc982389ac9aa13a5db96c87e /xmlsecurity | |
parent | More sc CppunitTest fixes (diff) | |
download | core-16b91e13c726b5b3f43c1aafde6fb8c4c18e3c77.tar.gz core-16b91e13c726b5b3f43c1aafde6fb8c4c18e3c77.zip |
Converge on SvtSecurityOptions::isTrustedLocation
Change-Id: Ibcf4b7d9d11295c7679637a37d41dc2960e04f8f
Diffstat (limited to 'xmlsecurity')
-rw-r--r-- | xmlsecurity/source/component/documentdigitalsignatures.cxx | 14 |
1 files changed, 1 insertions, 13 deletions
diff --git a/xmlsecurity/source/component/documentdigitalsignatures.cxx b/xmlsecurity/source/component/documentdigitalsignatures.cxx index ceb76148066e..39095604ad3f 100644 --- a/xmlsecurity/source/component/documentdigitalsignatures.cxx +++ b/xmlsecurity/source/component/documentdigitalsignatures.cxx @@ -36,12 +36,10 @@ #include <com/sun/star/ucb/XCommandEnvironment.hpp> #include <com/sun/star/ucb/XCommandProcessor.hpp> #include <com/sun/star/ucb/Command.hpp> -#include <tools/urlobj.hxx> #include <vcl/msgbox.hxx> #include <unotools/securityoptions.hxx> #include <com/sun/star/security/CertificateValidity.hpp> #include <com/sun/star/security/SerialNumberAdapter.hpp> -#include <unotools/ucbhelper.hxx> #include "comphelper/documentconstants.hxx" #include "com/sun/star/lang/IllegalArgumentException.hpp" @@ -439,17 +437,7 @@ Reference< css::security::XCertificate > DocumentDigitalSignatures::chooseCertif ::sal_Bool DocumentDigitalSignatures::isLocationTrusted( const OUString& Location ) throw (RuntimeException) { - sal_Bool bFound = sal_False; - INetURLObject aLocObj( Location ); - INetURLObject aLocObjLowCase( Location.toAsciiLowerCase() ); // will be used for case insensitive comparing - - Sequence< OUString > aSecURLs = SvtSecurityOptions().GetSecureURLs(); - const OUString* pSecURLs = aSecURLs.getConstArray(); - const OUString* pSecURLsEnd = pSecURLs + aSecURLs.getLength(); - for ( ; pSecURLs != pSecURLsEnd && !bFound; ++pSecURLs ) - bFound = ::utl::UCBContentHelper::IsSubPath( *pSecURLs, Location ); - - return bFound; + return SvtSecurityOptions().isTrustedLocationUri(Location); } void DocumentDigitalSignatures::addAuthorToTrustedSources( |