summaryrefslogtreecommitdiff
path: root/src/lib/libcrypto/dsa/dsa_pmeth.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/libcrypto/dsa/dsa_pmeth.c')
-rw-r--r--src/lib/libcrypto/dsa/dsa_pmeth.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/src/lib/libcrypto/dsa/dsa_pmeth.c b/src/lib/libcrypto/dsa/dsa_pmeth.c
index ef89e2be33..afc01a7791 100644
--- a/src/lib/libcrypto/dsa/dsa_pmeth.c
+++ b/src/lib/libcrypto/dsa/dsa_pmeth.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: dsa_pmeth.c,v 1.13 2021/12/04 16:08:32 tb Exp $ */ 1/* $OpenBSD: dsa_pmeth.c,v 1.14 2022/11/19 06:33: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 */
@@ -10,7 +10,7 @@
10 * are met: 10 * are met:
11 * 11 *
12 * 1. Redistributions of source code must retain the above copyright 12 * 1. Redistributions of source code must retain the above copyright
13 * notice, this list of conditions and the following disclaimer. 13 * notice, this list of conditions and the following disclaimer.
14 * 14 *
15 * 2. Redistributions in binary form must reproduce the above copyright 15 * 2. Redistributions in binary form must reproduce the above copyright
16 * notice, this list of conditions and the following disclaimer in 16 * notice, this list of conditions and the following disclaimer in
@@ -99,7 +99,7 @@ pkey_dsa_init(EVP_PKEY_CTX *ctx)
99 ctx->data = dctx; 99 ctx->data = dctx;
100 ctx->keygen_info = dctx->gentmp; 100 ctx->keygen_info = dctx->gentmp;
101 ctx->keygen_info_count = 2; 101 ctx->keygen_info_count = 2;
102 102
103 return 1; 103 return 1;
104} 104}
105 105
@@ -110,7 +110,7 @@ pkey_dsa_copy(EVP_PKEY_CTX *dst, EVP_PKEY_CTX *src)
110 110
111 if (!pkey_dsa_init(dst)) 111 if (!pkey_dsa_init(dst))
112 return 0; 112 return 0;
113 sctx = src->data; 113 sctx = src->data;
114 dctx = dst->data; 114 dctx = dst->data;
115 dctx->nbits = sctx->nbits; 115 dctx->nbits = sctx->nbits;
116 dctx->qbits = sctx->qbits; 116 dctx->qbits = sctx->qbits;
@@ -223,19 +223,19 @@ pkey_dsa_ctrl(EVP_PKEY_CTX *ctx, int type, int p1, void *p2)
223 case EVP_PKEY_CTRL_PKCS7_SIGN: 223 case EVP_PKEY_CTRL_PKCS7_SIGN:
224 case EVP_PKEY_CTRL_CMS_SIGN: 224 case EVP_PKEY_CTRL_CMS_SIGN:
225 return 1; 225 return 1;
226 226
227 case EVP_PKEY_CTRL_PEER_KEY: 227 case EVP_PKEY_CTRL_PEER_KEY:
228 DSAerror(EVP_R_OPERATION_NOT_SUPPORTED_FOR_THIS_KEYTYPE); 228 DSAerror(EVP_R_OPERATION_NOT_SUPPORTED_FOR_THIS_KEYTYPE);
229 return -2; 229 return -2;
230 default: 230 default:
231 return -2; 231 return -2;
232 } 232 }
233} 233}
234 234
235static int 235static int
236pkey_dsa_ctrl_str(EVP_PKEY_CTX *ctx, const char *type, const char *value) 236pkey_dsa_ctrl_str(EVP_PKEY_CTX *ctx, const char *type, const char *value)
237{ 237{
238 long lval; 238 long lval;
239 char *ep; 239 char *ep;
240 240
241 if (!strcmp(type, "dsa_paramgen_bits")) { 241 if (!strcmp(type, "dsa_paramgen_bits")) {
@@ -268,7 +268,7 @@ pkey_dsa_ctrl_str(EVP_PKEY_CTX *ctx, const char *type, const char *value)
268 qbits, NULL); 268 qbits, NULL);
269 } else if (!strcmp(type, "dsa_paramgen_md")) { 269 } else if (!strcmp(type, "dsa_paramgen_md")) {
270 return EVP_PKEY_CTX_ctrl(ctx, EVP_PKEY_DSA, 270 return EVP_PKEY_CTX_ctrl(ctx, EVP_PKEY_DSA,
271 EVP_PKEY_OP_PARAMGEN, EVP_PKEY_CTRL_DSA_PARAMGEN_MD, 0, 271 EVP_PKEY_OP_PARAMGEN, EVP_PKEY_CTRL_DSA_PARAMGEN_MD, 0,
272 (void *)EVP_get_digestbyname(value)); 272 (void *)EVP_get_digestbyname(value));
273 } 273 }
274not_a_number: 274not_a_number: