lok: ensure to initialize the security context
if the backend NSS is used, before load the document ensure the NSS is initialized otherwise NSS next functions calls will fail. Signed-off-by: Henry Castro <hcastro@collabora.com> Change-Id: I7ac1d7eeee681995e6c284e2dd4595a33d044af4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/142213 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Aron Budea <aron.budea@collabora.com> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/142289 Tested-by: Jenkins Reviewed-by: Andras Timar <andras.timar@collabora.com>
This commit is contained in:
committed by
Andras Timar
parent
66291d467b
commit
7a6324ea0d
@@ -3404,6 +3404,20 @@ static void doc_iniUnoCommands ()
|
||||
return;
|
||||
}
|
||||
|
||||
uno::Reference<xml::crypto::XSEInitializer> xSEInitializer = xml::crypto::SEInitializer::create(xContext);
|
||||
if (!xSEInitializer.is())
|
||||
{
|
||||
SAL_WARN("lok", "iniUnoCommands: XSEInitializer is not available");
|
||||
return;
|
||||
}
|
||||
|
||||
uno::Reference<xml::crypto::XXMLSecurityContext> xSecurityContext =
|
||||
xSEInitializer->createSecurityContext(OUString());
|
||||
if (!xSecurityContext.is())
|
||||
{
|
||||
SAL_WARN("lok", "iniUnoCommands: failed to create security context");
|
||||
}
|
||||
|
||||
SfxSlotPool& rSlotPool = SfxSlotPool::GetSlotPool(pViewFrame);
|
||||
uno::Reference<util::XURLTransformer> xParser(util::URLTransformer::create(xContext));
|
||||
|
||||
|
||||
Reference in New Issue
Block a user