summaryrefslogtreecommitdiff
path: root/src/lib/libcrypto/dsa/dsa_lib.c
diff options
context:
space:
mode:
authortb <>2022-01-14 08:29:06 +0000
committertb <>2022-01-14 08:29:06 +0000
commit82f4ff947f0f70daa31c164267dbb748f7c3c7ee (patch)
treebf869887a478042f2d395ff26cb94929bc51b5e8 /src/lib/libcrypto/dsa/dsa_lib.c
parent96b331528b7ab48983a3d8cb43fcf82cd8f322c3 (diff)
downloadopenbsd-82f4ff947f0f70daa31c164267dbb748f7c3c7ee.tar.gz
openbsd-82f4ff947f0f70daa31c164267dbb748f7c3c7ee.tar.bz2
openbsd-82f4ff947f0f70daa31c164267dbb748f7c3c7ee.zip
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 <steve@openssl.org> 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 <levitte@openssl.org>
Diffstat (limited to 'src/lib/libcrypto/dsa/dsa_lib.c')
-rw-r--r--src/lib/libcrypto/dsa/dsa_lib.c5
1 files changed, 2 insertions, 3 deletions
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 @@
1/* $OpenBSD: dsa_lib.c,v 1.33 2022/01/07 09:35:36 tb Exp $ */ 1/* $OpenBSD: dsa_lib.c,v 1.34 2022/01/14 08:29:06 tb Exp $ */
2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) 2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
3 * All rights reserved. 3 * All rights reserved.
4 * 4 *
@@ -154,7 +154,6 @@ DSA_new_method(ENGINE *engine)
154 154
155 ret->pad = 0; 155 ret->pad = 0;
156 ret->version = 0; 156 ret->version = 0;
157 ret->write_params = 1;
158 ret->p = NULL; 157 ret->p = NULL;
159 ret->q = NULL; 158 ret->q = NULL;
160 ret->g = NULL; 159 ret->g = NULL;
@@ -177,7 +176,7 @@ DSA_new_method(ENGINE *engine)
177 free(ret); 176 free(ret);
178 ret = NULL; 177 ret = NULL;
179 } 178 }
180 179
181 return ret; 180 return ret;
182} 181}
183 182