From 82f4ff947f0f70daa31c164267dbb748f7c3c7ee Mon Sep 17 00:00:00 2001 From: tb <> Date: Fri, 14 Jan 2022 08:29:06 +0000 Subject: Simplify DSAPublicKey_it This was obtained by porting the OpenSSL commit below and then using expand_crypto_asn1.go to unroll the new ASN.1 macros - actually the ones from 987157f6f63 which fixed the omission of dsa_cb() in the first commit. ok inoguchi jsing commit ea6b07b54c1f8fc2275a121cdda071e2df7bd6c1 Author: Dr. Stephen Henson Date: Thu Mar 26 14:35:49 2015 +0000 Simplify DSA public key handling. DSA public keys could exist in two forms: a single Integer type or a SEQUENCE containing the parameters and public key with a field called "write_params" deciding which form to use. These forms are non standard and were only used by functions containing "DSAPublicKey" in the name. Simplify code to only use the parameter form and encode the public key component directly in the DSA public key method. Reviewed-by: Richard Levitte --- src/lib/libcrypto/dsa/dsa_lib.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'src/lib/libcrypto/dsa/dsa_lib.c') diff --git a/src/lib/libcrypto/dsa/dsa_lib.c b/src/lib/libcrypto/dsa/dsa_lib.c index 7a7986b1f7..1369c6f745 100644 --- a/src/lib/libcrypto/dsa/dsa_lib.c +++ b/src/lib/libcrypto/dsa/dsa_lib.c @@ -1,4 +1,4 @@ -/* $OpenBSD: dsa_lib.c,v 1.33 2022/01/07 09:35:36 tb Exp $ */ +/* $OpenBSD: dsa_lib.c,v 1.34 2022/01/14 08:29:06 tb Exp $ */ /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) * All rights reserved. * @@ -154,7 +154,6 @@ DSA_new_method(ENGINE *engine) ret->pad = 0; ret->version = 0; - ret->write_params = 1; ret->p = NULL; ret->q = NULL; ret->g = NULL; @@ -177,7 +176,7 @@ DSA_new_method(ENGINE *engine) free(ret); ret = NULL; } - + return ret; } -- cgit v1.2.3-55-g6feb