From 937cec7deea3ad39c0ed89d48bdb03e698755f75 Mon Sep 17 00:00:00 2001 From: Nickolay Olshevsky Date: Mon, 8 Jan 2024 16:12:19 +0200 Subject: [PATCH] Add some debug logging to backend_version() function. --- src/lib/crypto/backend_version.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/lib/crypto/backend_version.cpp b/src/lib/crypto/backend_version.cpp index 43d8d4f516..86aed98dfd 100644 --- a/src/lib/crypto/backend_version.cpp +++ b/src/lib/crypto/backend_version.cpp @@ -84,7 +84,9 @@ backend_version() return "unknown"; } } - if (regexec(&r, ver, 5, matches, 0) != 0) { + int res = regexec(&r, ver, 5, matches, 0); + if (res != 0) { + RNP_LOG("regexec() failed on %s: %d", ver, res); return "unknown"; } assert(sizeof(version) > matches[1].rm_eo - matches[1].rm_so); @@ -95,6 +97,7 @@ backend_version() std::smatch result; std::string ver = OpenSSL_version(OPENSSL_VERSION); if (!std::regex_search(ver, result, re)) { + RNP_LOG("std::regex_search failed on \"%s\"", ver); return "unknown"; } assert(sizeof(version) > result[1].str().size());