summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorTom Rini <trini@konsulko.com>2022-03-05 11:34:31 -0500
committerTom Rini <trini@konsulko.com>2022-03-05 11:34:31 -0500
commit0444cbbe77ef3583c84086b8e80dc8f86cc80e40 (patch)
tree6e69554b0f9e3e5c3971da75fe1f10dc6098db10 /lib
parent55b5c426ae68ec9c1589960e7e6a8d2a4c399534 (diff)
parent9b5ad4f5da756939eac4123fc347af533eeb339e (diff)
Merge branch '2022-03-04-assorted-minor-fixes'
- mailmap file updates, OpenSSL code cleanup, assorted TI platform fixes, typo fix.
Diffstat (limited to 'lib')
-rw-r--r--lib/rsa/rsa-sign.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/lib/rsa/rsa-sign.c b/lib/rsa/rsa-sign.c
index 3e7b7982890..b2a21199e48 100644
--- a/lib/rsa/rsa-sign.c
+++ b/lib/rsa/rsa-sign.c
@@ -383,12 +383,11 @@ static int rsa_sign_with_key(EVP_PKEY *pkey, struct padding_algo *padding_algo,
goto err_alloc;
}
- context = EVP_MD_CTX_create();
+ context = EVP_MD_CTX_new();
if (!context) {
ret = rsa_err("EVP context creation failed");
goto err_create;
}
- EVP_MD_CTX_init(context);
ckey = EVP_PKEY_CTX_new(pkey, NULL);
if (!ckey) {
@@ -425,8 +424,7 @@ static int rsa_sign_with_key(EVP_PKEY *pkey, struct padding_algo *padding_algo,
goto err_sign;
}
- EVP_MD_CTX_reset(context);
- EVP_MD_CTX_destroy(context);
+ EVP_MD_CTX_free(context);
debug("Got signature: %zu bytes, expected %d\n", size, EVP_PKEY_size(pkey));
*sigp = sig;
@@ -435,7 +433,7 @@ static int rsa_sign_with_key(EVP_PKEY *pkey, struct padding_algo *padding_algo,
return 0;
err_sign:
- EVP_MD_CTX_destroy(context);
+ EVP_MD_CTX_free(context);
err_create:
free(sig);
err_alloc: