xmlsecurity/source/xmlsec/nss/securityenvironment_nssimpl.cxx | 13 +++++++++- 1 file changed, 12 insertions(+), 1 deletion(-)
New commits: commit 6f7f9e4d19b38d6f51f032ee3d7b99d5bbdb5b75 Author: Caolán McNamara <caol...@redhat.com> AuthorDate: Thu Feb 4 11:44:50 2021 +0000 Commit: Caolán McNamara <caol...@redhat.com> CommitDate: Thu Feb 4 16:14:59 2021 +0100 log why status wasn't SECSuccess Change-Id: Ibdbfdb9c6fd25165d584d35475909f0085896898 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/110410 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caol...@redhat.com> diff --git a/xmlsecurity/source/xmlsec/nss/securityenvironment_nssimpl.cxx b/xmlsecurity/source/xmlsec/nss/securityenvironment_nssimpl.cxx index ccf61e106e57..1d2a7c2ec08f 100644 --- a/xmlsecurity/source/xmlsec/nss/securityenvironment_nssimpl.cxx +++ b/xmlsecurity/source/xmlsec/nss/securityenvironment_nssimpl.cxx @@ -448,7 +448,11 @@ X509Certificate_NssImpl* SecurityEnvironment_NssImpl::createAndAddCertificateFro aStatus = CERT_DecodeTrustString(&aTrust, aTrustString.getStr()); if (aStatus != SECSuccess) + { + PRIntn err = PR_GetError(); + SAL_WARN("xmlsecurity.xmlsec", "Error: " << err << ": " << getCertError(err)); return nullptr; + } PK11SlotInfo* pSlot = PK11_GetInternalKeySlot(); @@ -458,13 +462,20 @@ X509Certificate_NssImpl* SecurityEnvironment_NssImpl::createAndAddCertificateFro aStatus = PK11_ImportCert(pSlot, pCERTCertificate, CK_INVALID_HANDLE, nullptr, PR_FALSE); if (aStatus != SECSuccess) + { + PRIntn err = PR_GetError(); + SAL_WARN("xmlsecurity.xmlsec", "Error: " << err << ": " << getCertError(err)); return nullptr; + } aStatus = CERT_ChangeCertTrust(CERT_GetDefaultCertDB(), pCERTCertificate, &aTrust); if (aStatus != SECSuccess) + { + PRIntn err = PR_GetError(); + SAL_WARN("xmlsecurity.xmlsec", "Error: " << err << ": " << getCertError(err)); return nullptr; - + } PK11_FreeSlot(pSlot); _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits