]> 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>
Thu, 16 May 2024 23:36:54 +0000 (01:36 +0200)
commit6a5b7c55fc65303245e9e54c65ba409da1215343
tree145b20aea4680c8c89bb1be003c48fb9ed0a8118
parentc7c503371bfd0bc8a5b5da85653b1b8a1c68150e
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