summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authortb <>2023-08-11 13:53:45 +0000
committertb <>2023-08-11 13:53:45 +0000
commitb0d988db635837f3218e3afae6b83c6a6091e0de (patch)
tree2aaa23d57d54278fda5b3850aaecc7c7fdfa2986 /src
parent92ddfd07bfe6dc6da0145c4b24f90be2fedb67d7 (diff)
downloadopenbsd-b0d988db635837f3218e3afae6b83c6a6091e0de.tar.gz
openbsd-b0d988db635837f3218e3afae6b83c6a6091e0de.tar.bz2
openbsd-b0d988db635837f3218e3afae6b83c6a6091e0de.zip
Use params{,_len} in {dh,dsa}_params_{en,de}code()
Diffstat (limited to 'src')
-rw-r--r--src/lib/libcrypto/dh/dh_ameth.c10
-rw-r--r--src/lib/libcrypto/dsa/dsa_ameth.c10
2 files changed, 10 insertions, 10 deletions
diff --git a/src/lib/libcrypto/dh/dh_ameth.c b/src/lib/libcrypto/dh/dh_ameth.c
index cd4c130f10..c43ada8ed8 100644
--- a/src/lib/libcrypto/dh/dh_ameth.c
+++ b/src/lib/libcrypto/dh/dh_ameth.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: dh_ameth.c,v 1.34 2023/08/11 11:32:19 tb Exp $ */ 1/* $OpenBSD: dh_ameth.c,v 1.35 2023/08/11 13:53:45 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 */
@@ -298,12 +298,12 @@ dh_priv_encode(PKCS8_PRIV_KEY_INFO *p8, const EVP_PKEY *pkey)
298} 298}
299 299
300static int 300static int
301dh_param_decode(EVP_PKEY *pkey, const unsigned char **pder, int derlen) 301dh_param_decode(EVP_PKEY *pkey, const unsigned char **params, int params_len)
302{ 302{
303 DH *dh = NULL; 303 DH *dh = NULL;
304 int ret = 0; 304 int ret = 0;
305 305
306 if ((dh = d2i_DHparams(NULL, pder, derlen)) == NULL) { 306 if ((dh = d2i_DHparams(NULL, params, params_len)) == NULL) {
307 DHerror(ERR_R_DH_LIB); 307 DHerror(ERR_R_DH_LIB);
308 goto err; 308 goto err;
309 } 309 }
@@ -320,9 +320,9 @@ dh_param_decode(EVP_PKEY *pkey, const unsigned char **pder, int derlen)
320} 320}
321 321
322static int 322static int
323dh_param_encode(const EVP_PKEY *pkey, unsigned char **pder) 323dh_param_encode(const EVP_PKEY *pkey, unsigned char **params)
324{ 324{
325 return i2d_DHparams(pkey->pkey.dh, pder); 325 return i2d_DHparams(pkey->pkey.dh, params);
326} 326}
327 327
328static int 328static int
diff --git a/src/lib/libcrypto/dsa/dsa_ameth.c b/src/lib/libcrypto/dsa/dsa_ameth.c
index b94c3c40be..529bab4d47 100644
--- a/src/lib/libcrypto/dsa/dsa_ameth.c
+++ b/src/lib/libcrypto/dsa/dsa_ameth.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: dsa_ameth.c,v 1.49 2023/08/11 13:51:33 tb Exp $ */ 1/* $OpenBSD: dsa_ameth.c,v 1.50 2023/08/11 13:53:45 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 */
@@ -459,12 +459,12 @@ do_dsa_print(BIO *bp, const DSA *x, int off, int ptype)
459} 459}
460 460
461static int 461static int
462dsa_param_decode(EVP_PKEY *pkey, const unsigned char **pder, int derlen) 462dsa_param_decode(EVP_PKEY *pkey, const unsigned char **params, int params_len)
463{ 463{
464 DSA *dsa = NULL; 464 DSA *dsa = NULL;
465 int ret = 0; 465 int ret = 0;
466 466
467 if ((dsa = d2i_DSAparams(NULL, pder, derlen)) == NULL) { 467 if ((dsa = d2i_DSAparams(NULL, params, params_len)) == NULL) {
468 DSAerror(ERR_R_DSA_LIB); 468 DSAerror(ERR_R_DSA_LIB);
469 goto err; 469 goto err;
470 } 470 }
@@ -483,9 +483,9 @@ dsa_param_decode(EVP_PKEY *pkey, const unsigned char **pder, int derlen)
483} 483}
484 484
485static int 485static int
486dsa_param_encode(const EVP_PKEY *pkey, unsigned char **pder) 486dsa_param_encode(const EVP_PKEY *pkey, unsigned char **params)
487{ 487{
488 return i2d_DSAparams(pkey->pkey.dsa, pder); 488 return i2d_DSAparams(pkey->pkey.dsa, params);
489} 489}
490 490
491static int 491static int