mirror of
https://github.com/ibm-s390-linux/s390-tools.git
synced 2026-08-05 02:14:52 +00:00
libseckey: Fix error checking in SK_OPENSSL_init() (OpenSSL 1.1.1 only)
Fix the NULL-checks to test the variable that was just assigned. Assisted-by: IBM Bob:2.0.0 Signed-off-by: Ingo Franzki <ifranzki@linux.ibm.com> Reviewed-by: Finn Callies <fcallies@linux.ibm.com> Signed-off-by: Jan Höppner <hoeppner@linux.ibm.com>
This commit is contained in:
committed by
Jan Höppner
parent
71503c0e7d
commit
6c729fba9e
@@ -796,13 +796,13 @@ int SK_OPENSSL_init(bool debug)
|
||||
return -EIO;
|
||||
}
|
||||
sk_pkey_meth_default_method_rsa = EVP_PKEY_meth_find(EVP_PKEY_RSA);
|
||||
if (sk_pkey_meth_default_method_ec == NULL) {
|
||||
if (sk_pkey_meth_default_method_rsa == NULL) {
|
||||
sk_debug(debug, "ERROR: EVP_PKEY_meth_find(RSA) failed");
|
||||
return -EIO;
|
||||
}
|
||||
sk_pkey_meth_default_method_rsa_pss =
|
||||
EVP_PKEY_meth_find(EVP_PKEY_RSA_PSS);
|
||||
if (sk_pkey_meth_default_method_ec == NULL) {
|
||||
if (sk_pkey_meth_default_method_rsa_pss == NULL) {
|
||||
sk_debug(debug, "ERROR: EVP_PKEY_meth_find(RSA-PSS) failed");
|
||||
return -EIO;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user