summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authortb <>2024-10-27 09:40:09 +0000
committertb <>2024-10-27 09:40:09 +0000
commita8f715df0e33ec622660acd6a4e2cd8ffb1921fa (patch)
tree0e0587dec81ada7c5cad406c127744a6bad511e4 /src
parentfc2cb66f0ea3c56212f08445efb2249d14ad832c (diff)
downloadopenbsd-a8f715df0e33ec622660acd6a4e2cd8ffb1921fa.tar.gz
openbsd-a8f715df0e33ec622660acd6a4e2cd8ffb1921fa.tar.bz2
openbsd-a8f715df0e33ec622660acd6a4e2cd8ffb1921fa.zip
d2i_ECParameters: rename a to out_ec_key
Diffstat (limited to 'src')
-rw-r--r--src/lib/libcrypto/ec/ec_asn1.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/lib/libcrypto/ec/ec_asn1.c b/src/lib/libcrypto/ec/ec_asn1.c
index 4e4e9b062e..7cfd4bdee6 100644
--- a/src/lib/libcrypto/ec/ec_asn1.c
+++ b/src/lib/libcrypto/ec/ec_asn1.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: ec_asn1.c,v 1.85 2024/10/27 09:38:49 tb Exp $ */ 1/* $OpenBSD: ec_asn1.c,v 1.86 2024/10/27 09:40:09 tb Exp $ */
2/* 2/*
3 * Written by Nils Larsch for the OpenSSL project. 3 * Written by Nils Larsch for the OpenSSL project.
4 */ 4 */
@@ -1281,7 +1281,7 @@ i2d_ECParameters(EC_KEY *ec_key, unsigned char **out)
1281LCRYPTO_ALIAS(i2d_ECParameters); 1281LCRYPTO_ALIAS(i2d_ECParameters);
1282 1282
1283EC_KEY * 1283EC_KEY *
1284d2i_ECParameters(EC_KEY **a, const unsigned char **in, long len) 1284d2i_ECParameters(EC_KEY **out_ec_key, const unsigned char **in, long len)
1285{ 1285{
1286 EC_KEY *ec_key; 1286 EC_KEY *ec_key;
1287 1287
@@ -1289,23 +1289,23 @@ d2i_ECParameters(EC_KEY **a, const unsigned char **in, long len)
1289 ECerror(ERR_R_PASSED_NULL_PARAMETER); 1289 ECerror(ERR_R_PASSED_NULL_PARAMETER);
1290 return NULL; 1290 return NULL;
1291 } 1291 }
1292 if (a == NULL || *a == NULL) { 1292 if (out_ec_key == NULL || *out_ec_key == NULL) {
1293 if ((ec_key = EC_KEY_new()) == NULL) { 1293 if ((ec_key = EC_KEY_new()) == NULL) {
1294 ECerror(ERR_R_MALLOC_FAILURE); 1294 ECerror(ERR_R_MALLOC_FAILURE);
1295 return NULL; 1295 return NULL;
1296 } 1296 }
1297 } else 1297 } else
1298 ec_key = *a; 1298 ec_key = *out_ec_key;
1299 1299
1300 if (!d2i_ECPKParameters(&ec_key->group, in, len)) { 1300 if (!d2i_ECPKParameters(&ec_key->group, in, len)) {
1301 ECerror(ERR_R_EC_LIB); 1301 ECerror(ERR_R_EC_LIB);
1302 if (a == NULL || *a != ec_key) 1302 if (out_ec_key == NULL || *out_ec_key != ec_key)
1303 EC_KEY_free(ec_key); 1303 EC_KEY_free(ec_key);
1304 return NULL; 1304 return NULL;
1305 } 1305 }
1306 1306
1307 if (a != NULL) 1307 if (out_ec_key != NULL)
1308 *a = ec_key; 1308 *out_ec_key = ec_key;
1309 return ec_key; 1309 return ec_key;
1310} 1310}
1311LCRYPTO_ALIAS(d2i_ECParameters); 1311LCRYPTO_ALIAS(d2i_ECParameters);