diff --git a/xmlsecurity/CppunitTest_xmlsecurity_pdfsigning.mk b/xmlsecurity/CppunitTest_xmlsecurity_pdfsigning.mk index faf6944a0773..02544bc54c92 100644 --- a/xmlsecurity/CppunitTest_xmlsecurity_pdfsigning.mk +++ b/xmlsecurity/CppunitTest_xmlsecurity_pdfsigning.mk @@ -39,6 +39,7 @@ ifneq ($(OS),WNT) ifneq (,$(ENABLE_NSS)) $(eval $(call gb_CppunitTest_use_externals,xmlsecurity_pdfsigning,\ nssutil3 \ + nss3 \ )) endif endif diff --git a/xmlsecurity/CppunitTest_xmlsecurity_signing.mk b/xmlsecurity/CppunitTest_xmlsecurity_signing.mk index 91613c06046e..6345c1f23aa8 100644 --- a/xmlsecurity/CppunitTest_xmlsecurity_signing.mk +++ b/xmlsecurity/CppunitTest_xmlsecurity_signing.mk @@ -44,6 +44,7 @@ ifneq ($(OS),WNT) ifneq (,$(ENABLE_NSS)) $(eval $(call gb_CppunitTest_use_externals,xmlsecurity_signing,\ nssutil3 \ + nss3 \ )) endif endif diff --git a/xmlsecurity/qa/unit/pdfsigning/pdfsigning.cxx b/xmlsecurity/qa/unit/pdfsigning/pdfsigning.cxx index 36a5a3d19a9b..5762bae5415d 100644 --- a/xmlsecurity/qa/unit/pdfsigning/pdfsigning.cxx +++ b/xmlsecurity/qa/unit/pdfsigning/pdfsigning.cxx @@ -13,6 +13,7 @@ #if USE_CRYPTO_NSS #include +#include #endif #include @@ -81,7 +82,9 @@ void PDFSigningTest::setUp() #ifdef NSS_USE_ALG_IN_ANY_SIGNATURE // policy may disallow using SHA1 for signatures but unit test documents // have such existing signatures (call this after createSecurityContext!) - NSS_SetAlgorithmPolicy(SEC_OID_SHA1, NSS_USE_ALG_IN_ANY_SIGNATURE, 0); + NSS_SetAlgorithmPolicy(SEC_OID_SHA1, NSS_USE_ALG_IN_SIGNATURE, 0); + // the minimum is 2048 in Fedora 40 + NSS_OptionSet(NSS_RSA_MIN_KEY_SIZE, 1024); #endif #endif } diff --git a/xmlsecurity/qa/unit/signing/signing.cxx b/xmlsecurity/qa/unit/signing/signing.cxx index 0a22681fb9a0..e6c20316face 100644 --- a/xmlsecurity/qa/unit/signing/signing.cxx +++ b/xmlsecurity/qa/unit/signing/signing.cxx @@ -15,6 +15,7 @@ #if USE_CRYPTO_NSS #include +#include #endif #include @@ -104,7 +105,9 @@ void SigningTest::setUp() #ifdef NSS_USE_ALG_IN_ANY_SIGNATURE // policy may disallow using SHA1 for signatures but unit test documents // have such existing signatures (call this after createSecurityContext!) - NSS_SetAlgorithmPolicy(SEC_OID_SHA1, NSS_USE_ALG_IN_ANY_SIGNATURE, 0); + NSS_SetAlgorithmPolicy(SEC_OID_SHA1, NSS_USE_ALG_IN_SIGNATURE, 0); + // the minimum is 2048 in Fedora 40 + NSS_OptionSet(NSS_RSA_MIN_KEY_SIZE, 1024); #endif #endif }