diff options
-rw-r--r-- | ucb/source/ucp/webdav-neon/NeonSession.cxx | 7 | ||||
-rw-r--r-- | ucb/source/ucp/webdav/SerfSession.cxx | 7 |
2 files changed, 4 insertions, 10 deletions
diff --git a/ucb/source/ucp/webdav-neon/NeonSession.cxx b/ucb/source/ucp/webdav-neon/NeonSession.cxx index b3a737fb5fa6..d05973fc53f7 100644 --- a/ucb/source/ucp/webdav-neon/NeonSession.cxx +++ b/ucb/source/ucp/webdav-neon/NeonSession.cxx @@ -49,6 +49,7 @@ extern "C" { #include "libxml/parser.h" #include "rtl/ustrbuf.hxx" +#include "comphelper/processfactory.hxx" #include "comphelper/sequence.hxx" #include <comphelper/stl_types.hxx> #include "ucbhelper/simplecertificatevalidationrequest.hxx" @@ -406,11 +407,7 @@ extern "C" int NeonSession_CertificationNotify( void *userdata, uno::Reference< security::XCertificateContainer > xCertificateContainer; try { - xCertificateContainer - = uno::Reference< security::XCertificateContainer >( - pSession->getMSF()->createInstance( - rtl::OUString( "com.sun.star.security.CertificateContainer" ) ), - uno::UNO_QUERY ); + xCertificateContainer = security::CertificateContainer::create( comphelper::getComponentContext( pSession->getMSF() ) ); } catch ( uno::Exception const & ) { diff --git a/ucb/source/ucp/webdav/SerfSession.cxx b/ucb/source/ucp/webdav/SerfSession.cxx index 0030c211bec6..bd858b49bbe6 100644 --- a/ucb/source/ucp/webdav/SerfSession.cxx +++ b/ucb/source/ucp/webdav/SerfSession.cxx @@ -24,6 +24,7 @@ #include <vector> #include <string.h> #include <rtl/string.h> +#include "comphelper/processfactory.hxx" #include "comphelper/sequence.hxx" #include "ucbhelper/simplecertificatevalidationrequest.hxx" @@ -385,11 +386,7 @@ apr_status_t SerfSession::verifySerfCertificateChain ( try { // Create a certificate container. - xCertificateContainer = uno::Reference< security::XCertificateContainer >( - getMSF()->createInstance( - rtl::OUString::createFromAscii( - "com.sun.star.security.CertificateContainer" ) ), - uno::UNO_QUERY_THROW); + xCertificateContainer = security::CertificateContainer::create( comphelper::getComponentContext(getMSF()) ); xSEInitializer = uno::Reference< xml::crypto::XSEInitializer >( getMSF()->createInstance( |