]> git.tuebingen.mpg.de Git - paraslash.git/commit
openssl: Introduce openssl_perror().
authorAndre Noll <maan@tuebingen.mpg.de>
Tue, 2 May 2023 19:16:29 +0000 (21:16 +0200)
committerAndre Noll <maan@tuebingen.mpg.de>
Sun, 17 Mar 2024 11:35:04 +0000 (12:35 +0100)
commit9ca251345afded3a8ac284e57b85d47e95be807e
treebbf5a4b7989341b05c1c31edab1c6d8b43c2c511
parent4f6e210de71010e2e071ba98b4273be938f3e699
openssl: Introduce openssl_perror().

Openssl has a decent error reporting framework, but we only employ
it if get_random_bytes_or_die() fails. This patch abstracts out a
new helper which prints the error string of the earliest error code
from the thread's error queue. We make the helper return -E_OPENSSL
unconditionally as this simplifies callers a bit.

Only get_random_bytes_or_die() calls the new helper for now but
additional callers will be added in subsequent commits.
error.h
openssl.c