comphelper/source/misc/hash.cxx | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)
New commits: commit 641c9bffb0eaebd8f25b6e57de11aee39c5f3ad2 Author: Andras Timar <andras.ti...@collabora.com> AuthorDate: Fri Nov 4 17:44:10 2022 +0100 Commit: Aron Budea <aron.bu...@collabora.com> CommitDate: Fri Nov 4 23:12:59 2022 +0100 more detailed NSS error report Change-Id: I1b005a331aeed1c00d6bf18a6dff0ffa844ba6f5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/142286 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoff...@gmail.com> Reviewed-by: Aron Budea <aron.bu...@collabora.com> diff --git a/comphelper/source/misc/hash.cxx b/comphelper/source/misc/hash.cxx index 50fd8cd0f961..9fab6028a659 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((int) error) + ")"); } mpContext = HASH_Create(getNSSType()); HASH_Begin(mpContext);