diff options
author | Caolán McNamara <caolanm@redhat.com> | 2021-02-04 11:44:50 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2021-02-04 16:14:59 +0100 |
commit | 6f7f9e4d19b38d6f51f032ee3d7b99d5bbdb5b75 (patch) | |
tree | 6322b271cf64137b639c7aa1ac774574bf822f17 /xmlsecurity | |
parent | 86790ab0a582e0efc2f535221997bac99db0dd40 (diff) |
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 <caolanm@redhat.com>
Diffstat (limited to 'xmlsecurity')
-rw-r--r-- | xmlsecurity/source/xmlsec/nss/securityenvironment_nssimpl.cxx | 13 |
1 files changed, 12 insertions, 1 deletions
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); |