]> git.tuebingen.mpg.de Git - paraslash.git/commit
openssl: Use the EVP library for RSA public encryption.
authorAndre Noll <maan@tuebingen.mpg.de>
Sun, 7 May 2023 15:49:58 +0000 (17:49 +0200)
committerAndre Noll <maan@tuebingen.mpg.de>
Sun, 17 Mar 2024 11:35:04 +0000 (12:35 +0100)
commit2282adb56d722ede1070e0bdc540f27bbd5f3386
tree25e0f637bf9325d42f13ed8269ed1f803ec39629
parenta6cfb20c2c38f11430e950732e8f9e7b595449a7
openssl: Use the EVP library for RSA public encryption.

Many functions related to RSA have been deprecated in openssl-3. Users
of the deprecated API are expected to switch to the high-level
cryptographic functions of the EVP library which ships together
with openssl.

Since openssl-1.0 is still supported and even openssl-1.1 lacks some
of the features we need for EVP, for example OSSL_PARAM_construct_BN(),
we check for this symbol at configure time and use #ifdefs in openssl.c
to compile the code conditionally depending on the value of the new
HAVE_OSSL_PARAM preprocessor macro. The code should work with both
old and new openssl versions.

apc_get_pubkey() used to call RSA_size() to obtain the key size in
bytes for the return value, but RSA_size() is one of the functions
that got deprecated in openssl-3. So modify read_public_key() to
return the number of bits of the modulus (rather than the constant
one), and use 1/8 of this number as the return value.
configure.ac
openssl.c