diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/lib/libcrypto/evp/pmeth_lib.c | 30 |
1 files changed, 15 insertions, 15 deletions
diff --git a/src/lib/libcrypto/evp/pmeth_lib.c b/src/lib/libcrypto/evp/pmeth_lib.c index d9001ea8fd..3341ba1e0f 100644 --- a/src/lib/libcrypto/evp/pmeth_lib.c +++ b/src/lib/libcrypto/evp/pmeth_lib.c | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | /* $OpenBSD: pmeth_lib.c,v 1.30 2023/06/20 14:12:51 tb Exp $ */ | 1 | /* $OpenBSD: pmeth_lib.c,v 1.31 2023/06/20 14:14:00 tb Exp $ */ |
| 2 | /* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL | 2 | /* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL |
| 3 | * project 2006. | 3 | * project 2006. |
| 4 | */ | 4 | */ |
| @@ -151,7 +151,7 @@ EVP_PKEY_meth_find(int type) | |||
| 151 | } | 151 | } |
| 152 | 152 | ||
| 153 | static EVP_PKEY_CTX * | 153 | static EVP_PKEY_CTX * |
| 154 | evp_pkey_ctx_new(EVP_PKEY *pkey, ENGINE *e, int id) | 154 | evp_pkey_ctx_new(EVP_PKEY *pkey, ENGINE *engine, int id) |
| 155 | { | 155 | { |
| 156 | EVP_PKEY_CTX *pkey_ctx = NULL; | 156 | EVP_PKEY_CTX *pkey_ctx = NULL; |
| 157 | const EVP_PKEY_METHOD *pmeth; | 157 | const EVP_PKEY_METHOD *pmeth; |
| @@ -163,19 +163,19 @@ evp_pkey_ctx_new(EVP_PKEY *pkey, ENGINE *e, int id) | |||
| 163 | } | 163 | } |
| 164 | #ifndef OPENSSL_NO_ENGINE | 164 | #ifndef OPENSSL_NO_ENGINE |
| 165 | if (pkey != NULL && pkey->engine != NULL) | 165 | if (pkey != NULL && pkey->engine != NULL) |
| 166 | e = pkey->engine; | 166 | engine = pkey->engine; |
| 167 | /* Try to find an ENGINE which implements this method. */ | 167 | /* Try to find an ENGINE which implements this method. */ |
| 168 | if (e != NULL) { | 168 | if (engine != NULL) { |
| 169 | if (!ENGINE_init(e)) { | 169 | if (!ENGINE_init(engine)) { |
| 170 | EVPerror(ERR_R_ENGINE_LIB); | 170 | EVPerror(ERR_R_ENGINE_LIB); |
| 171 | return NULL; | 171 | return NULL; |
| 172 | } | 172 | } |
| 173 | } else | 173 | } else |
| 174 | e = ENGINE_get_pkey_meth_engine(id); | 174 | engine = ENGINE_get_pkey_meth_engine(id); |
| 175 | 175 | ||
| 176 | /* Look up method handler in ENGINE or use internal tables. */ | 176 | /* Look up method handler in ENGINE or use internal tables. */ |
| 177 | if (e != NULL) | 177 | if (engine != NULL) |
| 178 | pmeth = ENGINE_get_pkey_meth(e, id); | 178 | pmeth = ENGINE_get_pkey_meth(engine, id); |
| 179 | else | 179 | else |
| 180 | #endif | 180 | #endif |
| 181 | pmeth = EVP_PKEY_meth_find(id); | 181 | pmeth = EVP_PKEY_meth_find(id); |
| @@ -189,8 +189,8 @@ evp_pkey_ctx_new(EVP_PKEY *pkey, ENGINE *e, int id) | |||
| 189 | EVPerror(ERR_R_MALLOC_FAILURE); | 189 | EVPerror(ERR_R_MALLOC_FAILURE); |
| 190 | goto err; | 190 | goto err; |
| 191 | } | 191 | } |
| 192 | pkey_ctx->engine = e; | 192 | pkey_ctx->engine = engine; |
| 193 | e = NULL; | 193 | engine = NULL; |
| 194 | pkey_ctx->pmeth = pmeth; | 194 | pkey_ctx->pmeth = pmeth; |
| 195 | pkey_ctx->operation = EVP_PKEY_OP_UNDEFINED; | 195 | pkey_ctx->operation = EVP_PKEY_OP_UNDEFINED; |
| 196 | if ((pkey_ctx->pkey = pkey) != NULL) | 196 | if ((pkey_ctx->pkey = pkey) != NULL) |
| @@ -206,7 +206,7 @@ evp_pkey_ctx_new(EVP_PKEY *pkey, ENGINE *e, int id) | |||
| 206 | err: | 206 | err: |
| 207 | EVP_PKEY_CTX_free(pkey_ctx); | 207 | EVP_PKEY_CTX_free(pkey_ctx); |
| 208 | #ifndef OPENSSL_NO_ENGINE | 208 | #ifndef OPENSSL_NO_ENGINE |
| 209 | ENGINE_finish(e); | 209 | ENGINE_finish(engine); |
| 210 | #endif | 210 | #endif |
| 211 | 211 | ||
| 212 | return NULL; | 212 | return NULL; |
| @@ -257,15 +257,15 @@ EVP_PKEY_meth_free(EVP_PKEY_METHOD *pmeth) | |||
| 257 | } | 257 | } |
| 258 | 258 | ||
| 259 | EVP_PKEY_CTX * | 259 | EVP_PKEY_CTX * |
| 260 | EVP_PKEY_CTX_new(EVP_PKEY *pkey, ENGINE *e) | 260 | EVP_PKEY_CTX_new(EVP_PKEY *pkey, ENGINE *engine) |
| 261 | { | 261 | { |
| 262 | return evp_pkey_ctx_new(pkey, e, -1); | 262 | return evp_pkey_ctx_new(pkey, engine, -1); |
| 263 | } | 263 | } |
| 264 | 264 | ||
| 265 | EVP_PKEY_CTX * | 265 | EVP_PKEY_CTX * |
| 266 | EVP_PKEY_CTX_new_id(int id, ENGINE *e) | 266 | EVP_PKEY_CTX_new_id(int id, ENGINE *engine) |
| 267 | { | 267 | { |
| 268 | return evp_pkey_ctx_new(NULL, e, id); | 268 | return evp_pkey_ctx_new(NULL, engine, id); |
| 269 | } | 269 | } |
| 270 | 270 | ||
| 271 | EVP_PKEY_CTX * | 271 | EVP_PKEY_CTX * |
