Skip to content

Commit

Permalink
Add some debug logging to backend_version() function.
Browse files Browse the repository at this point in the history
  • Loading branch information
ni4 committed Jan 8, 2024
1 parent 483d1ae commit 937cec7
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/lib/crypto/backend_version.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand All @@ -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());
Expand Down

0 comments on commit 937cec7

Please sign in to comment.