diff options
author | Andras Timar <andras.timar@collabora.com> | 2022-11-04 17:44:10 +0100 |
---|---|---|
committer | Andras Timar <andras.timar@collabora.com> | 2023-01-25 08:33:41 +0000 |
commit | 15397a10585e223733c651287c9f84a719180128 (patch) | |
tree | 87f6677aeaa7a99898918821b899a26fc660914a /comphelper/source | |
parent | b03790dac08f97594b2cdc8a4ab0394d62fb851f (diff) |
more detailed NSS error report
Change-Id: I1b005a331aeed1c00d6bf18a6dff0ffa844ba6f5
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/142286
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Aron Budea <aron.budea@collabora.com>
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146041
Tested-by: Jenkins
Reviewed-by: Andras Timar <andras.timar@collabora.com>
Diffstat (limited to 'comphelper/source')
-rw-r--r-- | comphelper/source/misc/hash.cxx | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/comphelper/source/misc/hash.cxx b/comphelper/source/misc/hash.cxx index 50fd8cd0f961..980097e234d0 100644 --- a/comphelper/source/misc/hash.cxx +++ b/comphelper/source/misc/hash.cxx @@ -18,6 +18,7 @@ #if USE_TLS_NSS #include <nss.h> +#include <nspr.h> #include <sechash.h> #elif USE_TLS_OPENSSL #include <openssl/evp.h> @@ -78,7 +79,9 @@ struct HashImpl #if USE_TLS_NSS auto const e = NSS_NoDB_Init(nullptr); if (e != SECSuccess) { - throw css::uno::RuntimeException("NSS_NoDB_Init failed with " + OUString::number(e)); + PRErrorCode error = PR_GetError(); + const char* errorText = PR_ErrorToName(error); + throw css::uno::RuntimeException("NSS_NoDB_Init failed with " + OUString(errorText, strlen(errorText), RTL_TEXTENCODING_UTF8) + " (" + OUString::number(static_cast<int>(error)) + ")"); } mpContext = HASH_Create(getNSSType()); HASH_Begin(mpContext); |