diff options
Diffstat (limited to 'src/lib/libcrypto/dsa')
-rw-r--r-- | src/lib/libcrypto/dsa/dsa_asn1.c | 19 | ||||
-rw-r--r-- | src/lib/libcrypto/dsa/dsa_err.c | 3 | ||||
-rw-r--r-- | src/lib/libcrypto/dsa/dsa_gen.c | 4 | ||||
-rw-r--r-- | src/lib/libcrypto/dsa/dsa_key.c | 3 | ||||
-rw-r--r-- | src/lib/libcrypto/dsa/dsa_lib.c | 29 | ||||
-rw-r--r-- | src/lib/libcrypto/dsa/dsa_meth.c | 9 | ||||
-rw-r--r-- | src/lib/libcrypto/dsa/dsa_ossl.c | 8 | ||||
-rw-r--r-- | src/lib/libcrypto/dsa/dsa_prn.c | 6 |
8 files changed, 73 insertions, 8 deletions
diff --git a/src/lib/libcrypto/dsa/dsa_asn1.c b/src/lib/libcrypto/dsa/dsa_asn1.c index 70a826ca95..5e4f882cfc 100644 --- a/src/lib/libcrypto/dsa/dsa_asn1.c +++ b/src/lib/libcrypto/dsa/dsa_asn1.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: dsa_asn1.c,v 1.30 2023/03/25 09:09:28 tb Exp $ */ | 1 | /* $OpenBSD: dsa_asn1.c,v 1.31 2023/07/08 14:28:15 beck 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 2000. | 3 | * project 2000. |
4 | */ | 4 | */ |
@@ -126,12 +126,14 @@ d2i_DSA_SIG(DSA_SIG **a, const unsigned char **in, long len) | |||
126 | return (DSA_SIG *)ASN1_item_d2i((ASN1_VALUE **)a, in, len, | 126 | return (DSA_SIG *)ASN1_item_d2i((ASN1_VALUE **)a, in, len, |
127 | &DSA_SIG_it); | 127 | &DSA_SIG_it); |
128 | } | 128 | } |
129 | LCRYPTO_ALIAS(d2i_DSA_SIG); | ||
129 | 130 | ||
130 | int | 131 | int |
131 | i2d_DSA_SIG(const DSA_SIG *a, unsigned char **out) | 132 | i2d_DSA_SIG(const DSA_SIG *a, unsigned char **out) |
132 | { | 133 | { |
133 | return ASN1_item_i2d((ASN1_VALUE *)a, out, &DSA_SIG_it); | 134 | return ASN1_item_i2d((ASN1_VALUE *)a, out, &DSA_SIG_it); |
134 | } | 135 | } |
136 | LCRYPTO_ALIAS(i2d_DSA_SIG); | ||
135 | 137 | ||
136 | void | 138 | void |
137 | DSA_SIG_get0(const DSA_SIG *sig, const BIGNUM **pr, const BIGNUM **ps) | 139 | DSA_SIG_get0(const DSA_SIG *sig, const BIGNUM **pr, const BIGNUM **ps) |
@@ -141,6 +143,7 @@ DSA_SIG_get0(const DSA_SIG *sig, const BIGNUM **pr, const BIGNUM **ps) | |||
141 | if (ps != NULL) | 143 | if (ps != NULL) |
142 | *ps = sig->s; | 144 | *ps = sig->s; |
143 | } | 145 | } |
146 | LCRYPTO_ALIAS(DSA_SIG_get0); | ||
144 | 147 | ||
145 | int | 148 | int |
146 | DSA_SIG_set0(DSA_SIG *sig, BIGNUM *r, BIGNUM *s) | 149 | DSA_SIG_set0(DSA_SIG *sig, BIGNUM *r, BIGNUM *s) |
@@ -155,6 +158,7 @@ DSA_SIG_set0(DSA_SIG *sig, BIGNUM *r, BIGNUM *s) | |||
155 | 158 | ||
156 | return 1; | 159 | return 1; |
157 | } | 160 | } |
161 | LCRYPTO_ALIAS(DSA_SIG_set0); | ||
158 | 162 | ||
159 | /* Override the default free and new methods */ | 163 | /* Override the default free and new methods */ |
160 | static int | 164 | static int |
@@ -243,12 +247,14 @@ d2i_DSAPrivateKey(DSA **a, const unsigned char **in, long len) | |||
243 | return (DSA *)ASN1_item_d2i((ASN1_VALUE **)a, in, len, | 247 | return (DSA *)ASN1_item_d2i((ASN1_VALUE **)a, in, len, |
244 | &DSAPrivateKey_it); | 248 | &DSAPrivateKey_it); |
245 | } | 249 | } |
250 | LCRYPTO_ALIAS(d2i_DSAPrivateKey); | ||
246 | 251 | ||
247 | int | 252 | int |
248 | i2d_DSAPrivateKey(const DSA *a, unsigned char **out) | 253 | i2d_DSAPrivateKey(const DSA *a, unsigned char **out) |
249 | { | 254 | { |
250 | return ASN1_item_i2d((ASN1_VALUE *)a, out, &DSAPrivateKey_it); | 255 | return ASN1_item_i2d((ASN1_VALUE *)a, out, &DSAPrivateKey_it); |
251 | } | 256 | } |
257 | LCRYPTO_ALIAS(i2d_DSAPrivateKey); | ||
252 | 258 | ||
253 | static const ASN1_AUX DSAparams_aux = { | 259 | static const ASN1_AUX DSAparams_aux = { |
254 | .app_data = NULL, | 260 | .app_data = NULL, |
@@ -299,36 +305,42 @@ d2i_DSAparams(DSA **a, const unsigned char **in, long len) | |||
299 | return (DSA *)ASN1_item_d2i((ASN1_VALUE **)a, in, len, | 305 | return (DSA *)ASN1_item_d2i((ASN1_VALUE **)a, in, len, |
300 | &DSAparams_it); | 306 | &DSAparams_it); |
301 | } | 307 | } |
308 | LCRYPTO_ALIAS(d2i_DSAparams); | ||
302 | 309 | ||
303 | int | 310 | int |
304 | i2d_DSAparams(const DSA *a, unsigned char **out) | 311 | i2d_DSAparams(const DSA *a, unsigned char **out) |
305 | { | 312 | { |
306 | return ASN1_item_i2d((ASN1_VALUE *)a, out, &DSAparams_it); | 313 | return ASN1_item_i2d((ASN1_VALUE *)a, out, &DSAparams_it); |
307 | } | 314 | } |
315 | LCRYPTO_ALIAS(i2d_DSAparams); | ||
308 | 316 | ||
309 | DSA * | 317 | DSA * |
310 | d2i_DSAparams_bio(BIO *bp, DSA **a) | 318 | d2i_DSAparams_bio(BIO *bp, DSA **a) |
311 | { | 319 | { |
312 | return ASN1_item_d2i_bio(&DSAparams_it, bp, a); | 320 | return ASN1_item_d2i_bio(&DSAparams_it, bp, a); |
313 | } | 321 | } |
322 | LCRYPTO_ALIAS(d2i_DSAparams_bio); | ||
314 | 323 | ||
315 | int | 324 | int |
316 | i2d_DSAparams_bio(BIO *bp, DSA *a) | 325 | i2d_DSAparams_bio(BIO *bp, DSA *a) |
317 | { | 326 | { |
318 | return ASN1_item_i2d_bio(&DSAparams_it, bp, a); | 327 | return ASN1_item_i2d_bio(&DSAparams_it, bp, a); |
319 | } | 328 | } |
329 | LCRYPTO_ALIAS(i2d_DSAparams_bio); | ||
320 | 330 | ||
321 | DSA * | 331 | DSA * |
322 | d2i_DSAparams_fp(FILE *fp, DSA **a) | 332 | d2i_DSAparams_fp(FILE *fp, DSA **a) |
323 | { | 333 | { |
324 | return ASN1_item_d2i_fp(&DSAparams_it, fp, a); | 334 | return ASN1_item_d2i_fp(&DSAparams_it, fp, a); |
325 | } | 335 | } |
336 | LCRYPTO_ALIAS(d2i_DSAparams_fp); | ||
326 | 337 | ||
327 | int | 338 | int |
328 | i2d_DSAparams_fp(FILE *fp, DSA *a) | 339 | i2d_DSAparams_fp(FILE *fp, DSA *a) |
329 | { | 340 | { |
330 | return ASN1_item_i2d_fp(&DSAparams_it, fp, a); | 341 | return ASN1_item_i2d_fp(&DSAparams_it, fp, a); |
331 | } | 342 | } |
343 | LCRYPTO_ALIAS(i2d_DSAparams_fp); | ||
332 | 344 | ||
333 | static const ASN1_AUX DSAPublicKey_aux = { | 345 | static const ASN1_AUX DSAPublicKey_aux = { |
334 | .app_data = NULL, | 346 | .app_data = NULL, |
@@ -385,18 +397,21 @@ d2i_DSAPublicKey(DSA **a, const unsigned char **in, long len) | |||
385 | return (DSA *)ASN1_item_d2i((ASN1_VALUE **)a, in, len, | 397 | return (DSA *)ASN1_item_d2i((ASN1_VALUE **)a, in, len, |
386 | &DSAPublicKey_it); | 398 | &DSAPublicKey_it); |
387 | } | 399 | } |
400 | LCRYPTO_ALIAS(d2i_DSAPublicKey); | ||
388 | 401 | ||
389 | int | 402 | int |
390 | i2d_DSAPublicKey(const DSA *a, unsigned char **out) | 403 | i2d_DSAPublicKey(const DSA *a, unsigned char **out) |
391 | { | 404 | { |
392 | return ASN1_item_i2d((ASN1_VALUE *)a, out, &DSAPublicKey_it); | 405 | return ASN1_item_i2d((ASN1_VALUE *)a, out, &DSAPublicKey_it); |
393 | } | 406 | } |
407 | LCRYPTO_ALIAS(i2d_DSAPublicKey); | ||
394 | 408 | ||
395 | DSA * | 409 | DSA * |
396 | DSAparams_dup(DSA *dsa) | 410 | DSAparams_dup(DSA *dsa) |
397 | { | 411 | { |
398 | return ASN1_item_dup(&DSAparams_it, dsa); | 412 | return ASN1_item_dup(&DSAparams_it, dsa); |
399 | } | 413 | } |
414 | LCRYPTO_ALIAS(DSAparams_dup); | ||
400 | 415 | ||
401 | int | 416 | int |
402 | DSA_sign(int type, const unsigned char *dgst, int dlen, unsigned char *sig, | 417 | DSA_sign(int type, const unsigned char *dgst, int dlen, unsigned char *sig, |
@@ -422,6 +437,7 @@ DSA_sign(int type, const unsigned char *dgst, int dlen, unsigned char *sig, | |||
422 | 437 | ||
423 | return ret; | 438 | return ret; |
424 | } | 439 | } |
440 | LCRYPTO_ALIAS(DSA_sign); | ||
425 | 441 | ||
426 | /* | 442 | /* |
427 | * data has already been hashed (probably with SHA or SHA-1). | 443 | * data has already been hashed (probably with SHA or SHA-1). |
@@ -457,3 +473,4 @@ DSA_verify(int type, const unsigned char *dgst, int dgst_len, | |||
457 | 473 | ||
458 | return ret; | 474 | return ret; |
459 | } | 475 | } |
476 | LCRYPTO_ALIAS(DSA_verify); | ||
diff --git a/src/lib/libcrypto/dsa/dsa_err.c b/src/lib/libcrypto/dsa/dsa_err.c index 8f105a8759..6934fe14f0 100644 --- a/src/lib/libcrypto/dsa/dsa_err.c +++ b/src/lib/libcrypto/dsa/dsa_err.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: dsa_err.c,v 1.18 2023/03/04 20:47:04 tb Exp $ */ | 1 | /* $OpenBSD: dsa_err.c,v 1.19 2023/07/08 14:28:15 beck Exp $ */ |
2 | /* ==================================================================== | 2 | /* ==================================================================== |
3 | * Copyright (c) 1999-2011 The OpenSSL Project. All rights reserved. | 3 | * Copyright (c) 1999-2011 The OpenSSL Project. All rights reserved. |
4 | * | 4 | * |
@@ -101,3 +101,4 @@ void ERR_load_DSA_strings(void) | |||
101 | } | 101 | } |
102 | #endif | 102 | #endif |
103 | } | 103 | } |
104 | LCRYPTO_ALIAS(ERR_load_DSA_strings); | ||
diff --git a/src/lib/libcrypto/dsa/dsa_gen.c b/src/lib/libcrypto/dsa/dsa_gen.c index 4a16278b5a..490c7e51bb 100644 --- a/src/lib/libcrypto/dsa/dsa_gen.c +++ b/src/lib/libcrypto/dsa/dsa_gen.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: dsa_gen.c,v 1.29 2023/04/13 14:58:27 tb Exp $ */ | 1 | /* $OpenBSD: dsa_gen.c,v 1.30 2023/07/08 14:28:15 beck 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 | * |
@@ -94,6 +94,7 @@ DSA_generate_parameters_ex(DSA *ret, int bits, const unsigned char *seed_in, | |||
94 | seed_len, NULL, counter_ret, h_ret, cb); | 94 | seed_len, NULL, counter_ret, h_ret, cb); |
95 | } | 95 | } |
96 | } | 96 | } |
97 | LCRYPTO_ALIAS(DSA_generate_parameters_ex); | ||
97 | 98 | ||
98 | int | 99 | int |
99 | dsa_builtin_paramgen(DSA *ret, size_t bits, size_t qbits, const EVP_MD *evpmd, | 100 | dsa_builtin_paramgen(DSA *ret, size_t bits, size_t qbits, const EVP_MD *evpmd, |
@@ -375,5 +376,6 @@ DSA_generate_parameters(int bits, unsigned char *seed_in, int seed_len, | |||
375 | DSA_free(ret); | 376 | DSA_free(ret); |
376 | return NULL; | 377 | return NULL; |
377 | } | 378 | } |
379 | LCRYPTO_ALIAS(DSA_generate_parameters); | ||
378 | 380 | ||
379 | #endif | 381 | #endif |
diff --git a/src/lib/libcrypto/dsa/dsa_key.c b/src/lib/libcrypto/dsa/dsa_key.c index 890f991df9..c378707e36 100644 --- a/src/lib/libcrypto/dsa/dsa_key.c +++ b/src/lib/libcrypto/dsa/dsa_key.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: dsa_key.c,v 1.33 2023/01/11 04:35:26 jsing Exp $ */ | 1 | /* $OpenBSD: dsa_key.c,v 1.34 2023/07/08 14:28:15 beck 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 | * |
@@ -78,6 +78,7 @@ DSA_generate_key(DSA *dsa) | |||
78 | return dsa->meth->dsa_keygen(dsa); | 78 | return dsa->meth->dsa_keygen(dsa); |
79 | return dsa_builtin_keygen(dsa); | 79 | return dsa_builtin_keygen(dsa); |
80 | } | 80 | } |
81 | LCRYPTO_ALIAS(DSA_generate_key); | ||
81 | 82 | ||
82 | static int | 83 | static int |
83 | dsa_builtin_keygen(DSA *dsa) | 84 | dsa_builtin_keygen(DSA *dsa) |
diff --git a/src/lib/libcrypto/dsa/dsa_lib.c b/src/lib/libcrypto/dsa/dsa_lib.c index 6986f9ad6b..46a7dbcfbe 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.42 2023/03/11 15:29:03 tb Exp $ */ | 1 | /* $OpenBSD: dsa_lib.c,v 1.43 2023/07/08 14:28:15 beck 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 | * |
@@ -84,6 +84,7 @@ DSA_set_default_method(const DSA_METHOD *meth) | |||
84 | { | 84 | { |
85 | default_DSA_method = meth; | 85 | default_DSA_method = meth; |
86 | } | 86 | } |
87 | LCRYPTO_ALIAS(DSA_set_default_method); | ||
87 | 88 | ||
88 | const DSA_METHOD * | 89 | const DSA_METHOD * |
89 | DSA_get_default_method(void) | 90 | DSA_get_default_method(void) |
@@ -92,12 +93,14 @@ DSA_get_default_method(void) | |||
92 | default_DSA_method = DSA_OpenSSL(); | 93 | default_DSA_method = DSA_OpenSSL(); |
93 | return default_DSA_method; | 94 | return default_DSA_method; |
94 | } | 95 | } |
96 | LCRYPTO_ALIAS(DSA_get_default_method); | ||
95 | 97 | ||
96 | DSA * | 98 | DSA * |
97 | DSA_new(void) | 99 | DSA_new(void) |
98 | { | 100 | { |
99 | return DSA_new_method(NULL); | 101 | return DSA_new_method(NULL); |
100 | } | 102 | } |
103 | LCRYPTO_ALIAS(DSA_new); | ||
101 | 104 | ||
102 | int | 105 | int |
103 | DSA_set_method(DSA *dsa, const DSA_METHOD *meth) | 106 | DSA_set_method(DSA *dsa, const DSA_METHOD *meth) |
@@ -119,6 +122,7 @@ DSA_set_method(DSA *dsa, const DSA_METHOD *meth) | |||
119 | meth->init(dsa); | 122 | meth->init(dsa); |
120 | return 1; | 123 | return 1; |
121 | } | 124 | } |
125 | LCRYPTO_ALIAS(DSA_set_method); | ||
122 | 126 | ||
123 | DSA * | 127 | DSA * |
124 | DSA_new_method(ENGINE *engine) | 128 | DSA_new_method(ENGINE *engine) |
@@ -179,6 +183,7 @@ DSA_new_method(ENGINE *engine) | |||
179 | 183 | ||
180 | return ret; | 184 | return ret; |
181 | } | 185 | } |
186 | LCRYPTO_ALIAS(DSA_new_method); | ||
182 | 187 | ||
183 | void | 188 | void |
184 | DSA_free(DSA *r) | 189 | DSA_free(DSA *r) |
@@ -209,6 +214,7 @@ DSA_free(DSA *r) | |||
209 | BN_free(r->r); | 214 | BN_free(r->r); |
210 | free(r); | 215 | free(r); |
211 | } | 216 | } |
217 | LCRYPTO_ALIAS(DSA_free); | ||
212 | 218 | ||
213 | int | 219 | int |
214 | DSA_up_ref(DSA *r) | 220 | DSA_up_ref(DSA *r) |
@@ -216,6 +222,7 @@ DSA_up_ref(DSA *r) | |||
216 | int i = CRYPTO_add(&r->references, 1, CRYPTO_LOCK_DSA); | 222 | int i = CRYPTO_add(&r->references, 1, CRYPTO_LOCK_DSA); |
217 | return i > 1 ? 1 : 0; | 223 | return i > 1 ? 1 : 0; |
218 | } | 224 | } |
225 | LCRYPTO_ALIAS(DSA_up_ref); | ||
219 | 226 | ||
220 | int | 227 | int |
221 | DSA_size(const DSA *r) | 228 | DSA_size(const DSA *r) |
@@ -231,6 +238,7 @@ DSA_size(const DSA *r) | |||
231 | 238 | ||
232 | return ret; | 239 | return ret; |
233 | } | 240 | } |
241 | LCRYPTO_ALIAS(DSA_size); | ||
234 | 242 | ||
235 | int | 243 | int |
236 | DSA_get_ex_new_index(long argl, void *argp, CRYPTO_EX_new *new_func, | 244 | DSA_get_ex_new_index(long argl, void *argp, CRYPTO_EX_new *new_func, |
@@ -239,18 +247,21 @@ DSA_get_ex_new_index(long argl, void *argp, CRYPTO_EX_new *new_func, | |||
239 | return CRYPTO_get_ex_new_index(CRYPTO_EX_INDEX_DSA, argl, argp, | 247 | return CRYPTO_get_ex_new_index(CRYPTO_EX_INDEX_DSA, argl, argp, |
240 | new_func, dup_func, free_func); | 248 | new_func, dup_func, free_func); |
241 | } | 249 | } |
250 | LCRYPTO_ALIAS(DSA_get_ex_new_index); | ||
242 | 251 | ||
243 | int | 252 | int |
244 | DSA_set_ex_data(DSA *d, int idx, void *arg) | 253 | DSA_set_ex_data(DSA *d, int idx, void *arg) |
245 | { | 254 | { |
246 | return CRYPTO_set_ex_data(&d->ex_data, idx, arg); | 255 | return CRYPTO_set_ex_data(&d->ex_data, idx, arg); |
247 | } | 256 | } |
257 | LCRYPTO_ALIAS(DSA_set_ex_data); | ||
248 | 258 | ||
249 | void * | 259 | void * |
250 | DSA_get_ex_data(DSA *d, int idx) | 260 | DSA_get_ex_data(DSA *d, int idx) |
251 | { | 261 | { |
252 | return CRYPTO_get_ex_data(&d->ex_data, idx); | 262 | return CRYPTO_get_ex_data(&d->ex_data, idx); |
253 | } | 263 | } |
264 | LCRYPTO_ALIAS(DSA_get_ex_data); | ||
254 | 265 | ||
255 | int | 266 | int |
256 | DSA_security_bits(const DSA *d) | 267 | DSA_security_bits(const DSA *d) |
@@ -260,6 +271,7 @@ DSA_security_bits(const DSA *d) | |||
260 | 271 | ||
261 | return BN_security_bits(BN_num_bits(d->p), BN_num_bits(d->q)); | 272 | return BN_security_bits(BN_num_bits(d->p), BN_num_bits(d->q)); |
262 | } | 273 | } |
274 | LCRYPTO_ALIAS(DSA_security_bits); | ||
263 | 275 | ||
264 | #ifndef OPENSSL_NO_DH | 276 | #ifndef OPENSSL_NO_DH |
265 | DH * | 277 | DH * |
@@ -301,6 +313,7 @@ err: | |||
301 | DH_free(ret); | 313 | DH_free(ret); |
302 | return NULL; | 314 | return NULL; |
303 | } | 315 | } |
316 | LCRYPTO_ALIAS(DSA_dup_DH); | ||
304 | #endif | 317 | #endif |
305 | 318 | ||
306 | void | 319 | void |
@@ -313,6 +326,7 @@ DSA_get0_pqg(const DSA *d, const BIGNUM **p, const BIGNUM **q, const BIGNUM **g) | |||
313 | if (g != NULL) | 326 | if (g != NULL) |
314 | *g = d->g; | 327 | *g = d->g; |
315 | } | 328 | } |
329 | LCRYPTO_ALIAS(DSA_get0_pqg); | ||
316 | 330 | ||
317 | int | 331 | int |
318 | DSA_set0_pqg(DSA *d, BIGNUM *p, BIGNUM *q, BIGNUM *g) | 332 | DSA_set0_pqg(DSA *d, BIGNUM *p, BIGNUM *q, BIGNUM *g) |
@@ -336,6 +350,7 @@ DSA_set0_pqg(DSA *d, BIGNUM *p, BIGNUM *q, BIGNUM *g) | |||
336 | 350 | ||
337 | return 1; | 351 | return 1; |
338 | } | 352 | } |
353 | LCRYPTO_ALIAS(DSA_set0_pqg); | ||
339 | 354 | ||
340 | void | 355 | void |
341 | DSA_get0_key(const DSA *d, const BIGNUM **pub_key, const BIGNUM **priv_key) | 356 | DSA_get0_key(const DSA *d, const BIGNUM **pub_key, const BIGNUM **priv_key) |
@@ -345,6 +360,7 @@ DSA_get0_key(const DSA *d, const BIGNUM **pub_key, const BIGNUM **priv_key) | |||
345 | if (priv_key != NULL) | 360 | if (priv_key != NULL) |
346 | *priv_key = d->priv_key; | 361 | *priv_key = d->priv_key; |
347 | } | 362 | } |
363 | LCRYPTO_ALIAS(DSA_get0_key); | ||
348 | 364 | ||
349 | int | 365 | int |
350 | DSA_set0_key(DSA *d, BIGNUM *pub_key, BIGNUM *priv_key) | 366 | DSA_set0_key(DSA *d, BIGNUM *pub_key, BIGNUM *priv_key) |
@@ -363,66 +379,77 @@ DSA_set0_key(DSA *d, BIGNUM *pub_key, BIGNUM *priv_key) | |||
363 | 379 | ||
364 | return 1; | 380 | return 1; |
365 | } | 381 | } |
382 | LCRYPTO_ALIAS(DSA_set0_key); | ||
366 | 383 | ||
367 | const BIGNUM * | 384 | const BIGNUM * |
368 | DSA_get0_p(const DSA *d) | 385 | DSA_get0_p(const DSA *d) |
369 | { | 386 | { |
370 | return d->p; | 387 | return d->p; |
371 | } | 388 | } |
389 | LCRYPTO_ALIAS(DSA_get0_p); | ||
372 | 390 | ||
373 | const BIGNUM * | 391 | const BIGNUM * |
374 | DSA_get0_q(const DSA *d) | 392 | DSA_get0_q(const DSA *d) |
375 | { | 393 | { |
376 | return d->q; | 394 | return d->q; |
377 | } | 395 | } |
396 | LCRYPTO_ALIAS(DSA_get0_q); | ||
378 | 397 | ||
379 | const BIGNUM * | 398 | const BIGNUM * |
380 | DSA_get0_g(const DSA *d) | 399 | DSA_get0_g(const DSA *d) |
381 | { | 400 | { |
382 | return d->g; | 401 | return d->g; |
383 | } | 402 | } |
403 | LCRYPTO_ALIAS(DSA_get0_g); | ||
384 | 404 | ||
385 | const BIGNUM * | 405 | const BIGNUM * |
386 | DSA_get0_pub_key(const DSA *d) | 406 | DSA_get0_pub_key(const DSA *d) |
387 | { | 407 | { |
388 | return d->pub_key; | 408 | return d->pub_key; |
389 | } | 409 | } |
410 | LCRYPTO_ALIAS(DSA_get0_pub_key); | ||
390 | 411 | ||
391 | const BIGNUM * | 412 | const BIGNUM * |
392 | DSA_get0_priv_key(const DSA *d) | 413 | DSA_get0_priv_key(const DSA *d) |
393 | { | 414 | { |
394 | return d->priv_key; | 415 | return d->priv_key; |
395 | } | 416 | } |
417 | LCRYPTO_ALIAS(DSA_get0_priv_key); | ||
396 | 418 | ||
397 | void | 419 | void |
398 | DSA_clear_flags(DSA *d, int flags) | 420 | DSA_clear_flags(DSA *d, int flags) |
399 | { | 421 | { |
400 | d->flags &= ~flags; | 422 | d->flags &= ~flags; |
401 | } | 423 | } |
424 | LCRYPTO_ALIAS(DSA_clear_flags); | ||
402 | 425 | ||
403 | int | 426 | int |
404 | DSA_test_flags(const DSA *d, int flags) | 427 | DSA_test_flags(const DSA *d, int flags) |
405 | { | 428 | { |
406 | return d->flags & flags; | 429 | return d->flags & flags; |
407 | } | 430 | } |
431 | LCRYPTO_ALIAS(DSA_test_flags); | ||
408 | 432 | ||
409 | void | 433 | void |
410 | DSA_set_flags(DSA *d, int flags) | 434 | DSA_set_flags(DSA *d, int flags) |
411 | { | 435 | { |
412 | d->flags |= flags; | 436 | d->flags |= flags; |
413 | } | 437 | } |
438 | LCRYPTO_ALIAS(DSA_set_flags); | ||
414 | 439 | ||
415 | ENGINE * | 440 | ENGINE * |
416 | DSA_get0_engine(DSA *d) | 441 | DSA_get0_engine(DSA *d) |
417 | { | 442 | { |
418 | return d->engine; | 443 | return d->engine; |
419 | } | 444 | } |
445 | LCRYPTO_ALIAS(DSA_get0_engine); | ||
420 | 446 | ||
421 | int | 447 | int |
422 | DSA_bits(const DSA *dsa) | 448 | DSA_bits(const DSA *dsa) |
423 | { | 449 | { |
424 | return BN_num_bits(dsa->p); | 450 | return BN_num_bits(dsa->p); |
425 | } | 451 | } |
452 | LCRYPTO_ALIAS(DSA_bits); | ||
426 | 453 | ||
427 | int | 454 | int |
428 | dsa_check_key(const DSA *dsa) | 455 | dsa_check_key(const DSA *dsa) |
diff --git a/src/lib/libcrypto/dsa/dsa_meth.c b/src/lib/libcrypto/dsa/dsa_meth.c index 392afb84df..c84b5287e1 100644 --- a/src/lib/libcrypto/dsa/dsa_meth.c +++ b/src/lib/libcrypto/dsa/dsa_meth.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: dsa_meth.c,v 1.6 2022/11/26 16:08:52 tb Exp $ */ | 1 | /* $OpenBSD: dsa_meth.c,v 1.7 2023/07/08 14:28:15 beck Exp $ */ |
2 | /* | 2 | /* |
3 | * Copyright (c) 2018 Theo Buehler <tb@openbsd.org> | 3 | * Copyright (c) 2018 Theo Buehler <tb@openbsd.org> |
4 | * | 4 | * |
@@ -38,6 +38,7 @@ DSA_meth_new(const char *name, int flags) | |||
38 | 38 | ||
39 | return meth; | 39 | return meth; |
40 | } | 40 | } |
41 | LCRYPTO_ALIAS(DSA_meth_new); | ||
41 | 42 | ||
42 | void | 43 | void |
43 | DSA_meth_free(DSA_METHOD *meth) | 44 | DSA_meth_free(DSA_METHOD *meth) |
@@ -48,6 +49,7 @@ DSA_meth_free(DSA_METHOD *meth) | |||
48 | free(meth->name); | 49 | free(meth->name); |
49 | free(meth); | 50 | free(meth); |
50 | } | 51 | } |
52 | LCRYPTO_ALIAS(DSA_meth_free); | ||
51 | 53 | ||
52 | DSA_METHOD * | 54 | DSA_METHOD * |
53 | DSA_meth_dup(const DSA_METHOD *meth) | 55 | DSA_meth_dup(const DSA_METHOD *meth) |
@@ -64,12 +66,14 @@ DSA_meth_dup(const DSA_METHOD *meth) | |||
64 | 66 | ||
65 | return copy; | 67 | return copy; |
66 | } | 68 | } |
69 | LCRYPTO_ALIAS(DSA_meth_dup); | ||
67 | 70 | ||
68 | const char * | 71 | const char * |
69 | DSA_meth_get0_name(const DSA_METHOD *meth) | 72 | DSA_meth_get0_name(const DSA_METHOD *meth) |
70 | { | 73 | { |
71 | return meth->name; | 74 | return meth->name; |
72 | } | 75 | } |
76 | LCRYPTO_ALIAS(DSA_meth_get0_name); | ||
73 | 77 | ||
74 | int | 78 | int |
75 | DSA_meth_set1_name(DSA_METHOD *meth, const char *name) | 79 | DSA_meth_set1_name(DSA_METHOD *meth, const char *name) |
@@ -86,6 +90,7 @@ DSA_meth_set1_name(DSA_METHOD *meth, const char *name) | |||
86 | 90 | ||
87 | return 1; | 91 | return 1; |
88 | } | 92 | } |
93 | LCRYPTO_ALIAS(DSA_meth_set1_name); | ||
89 | 94 | ||
90 | int | 95 | int |
91 | DSA_meth_set_sign(DSA_METHOD *meth, | 96 | DSA_meth_set_sign(DSA_METHOD *meth, |
@@ -94,6 +99,7 @@ DSA_meth_set_sign(DSA_METHOD *meth, | |||
94 | meth->dsa_do_sign = sign; | 99 | meth->dsa_do_sign = sign; |
95 | return 1; | 100 | return 1; |
96 | } | 101 | } |
102 | LCRYPTO_ALIAS(DSA_meth_set_sign); | ||
97 | 103 | ||
98 | int | 104 | int |
99 | DSA_meth_set_finish(DSA_METHOD *meth, int (*finish)(DSA *)) | 105 | DSA_meth_set_finish(DSA_METHOD *meth, int (*finish)(DSA *)) |
@@ -101,3 +107,4 @@ DSA_meth_set_finish(DSA_METHOD *meth, int (*finish)(DSA *)) | |||
101 | meth->finish = finish; | 107 | meth->finish = finish; |
102 | return 1; | 108 | return 1; |
103 | } | 109 | } |
110 | LCRYPTO_ALIAS(DSA_meth_set_finish); | ||
diff --git a/src/lib/libcrypto/dsa/dsa_ossl.c b/src/lib/libcrypto/dsa/dsa_ossl.c index b69cf1a03f..36b2a63462 100644 --- a/src/lib/libcrypto/dsa/dsa_ossl.c +++ b/src/lib/libcrypto/dsa/dsa_ossl.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: dsa_ossl.c,v 1.51 2023/03/27 10:25:02 tb Exp $ */ | 1 | /* $OpenBSD: dsa_ossl.c,v 1.52 2023/07/08 14:28:15 beck 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 | * |
@@ -91,6 +91,7 @@ DSA_OpenSSL(void) | |||
91 | { | 91 | { |
92 | return &openssl_dsa_meth; | 92 | return &openssl_dsa_meth; |
93 | } | 93 | } |
94 | LCRYPTO_ALIAS(DSA_OpenSSL); | ||
94 | 95 | ||
95 | /* | 96 | /* |
96 | * Since DSA parameters are entirely arbitrary and checking them to be | 97 | * Since DSA parameters are entirely arbitrary and checking them to be |
@@ -440,6 +441,7 @@ DSA_SIG_new(void) | |||
440 | { | 441 | { |
441 | return calloc(1, sizeof(DSA_SIG)); | 442 | return calloc(1, sizeof(DSA_SIG)); |
442 | } | 443 | } |
444 | LCRYPTO_ALIAS(DSA_SIG_new); | ||
443 | 445 | ||
444 | void | 446 | void |
445 | DSA_SIG_free(DSA_SIG *sig) | 447 | DSA_SIG_free(DSA_SIG *sig) |
@@ -451,21 +453,25 @@ DSA_SIG_free(DSA_SIG *sig) | |||
451 | BN_free(sig->s); | 453 | BN_free(sig->s); |
452 | free(sig); | 454 | free(sig); |
453 | } | 455 | } |
456 | LCRYPTO_ALIAS(DSA_SIG_free); | ||
454 | 457 | ||
455 | int | 458 | int |
456 | DSA_sign_setup(DSA *dsa, BN_CTX *ctx_in, BIGNUM **kinvp, BIGNUM **rp) | 459 | DSA_sign_setup(DSA *dsa, BN_CTX *ctx_in, BIGNUM **kinvp, BIGNUM **rp) |
457 | { | 460 | { |
458 | return dsa->meth->dsa_sign_setup(dsa, ctx_in, kinvp, rp); | 461 | return dsa->meth->dsa_sign_setup(dsa, ctx_in, kinvp, rp); |
459 | } | 462 | } |
463 | LCRYPTO_ALIAS(DSA_sign_setup); | ||
460 | 464 | ||
461 | DSA_SIG * | 465 | DSA_SIG * |
462 | DSA_do_sign(const unsigned char *dgst, int dlen, DSA *dsa) | 466 | DSA_do_sign(const unsigned char *dgst, int dlen, DSA *dsa) |
463 | { | 467 | { |
464 | return dsa->meth->dsa_do_sign(dgst, dlen, dsa); | 468 | return dsa->meth->dsa_do_sign(dgst, dlen, dsa); |
465 | } | 469 | } |
470 | LCRYPTO_ALIAS(DSA_do_sign); | ||
466 | 471 | ||
467 | int | 472 | int |
468 | DSA_do_verify(const unsigned char *dgst, int dgst_len, DSA_SIG *sig, DSA *dsa) | 473 | DSA_do_verify(const unsigned char *dgst, int dgst_len, DSA_SIG *sig, DSA *dsa) |
469 | { | 474 | { |
470 | return dsa->meth->dsa_do_verify(dgst, dgst_len, sig, dsa); | 475 | return dsa->meth->dsa_do_verify(dgst, dgst_len, sig, dsa); |
471 | } | 476 | } |
477 | LCRYPTO_ALIAS(DSA_do_verify); | ||
diff --git a/src/lib/libcrypto/dsa/dsa_prn.c b/src/lib/libcrypto/dsa/dsa_prn.c index 4ed656a04a..f276d82482 100644 --- a/src/lib/libcrypto/dsa/dsa_prn.c +++ b/src/lib/libcrypto/dsa/dsa_prn.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: dsa_prn.c,v 1.9 2022/11/19 06:33:00 tb Exp $ */ | 1 | /* $OpenBSD: dsa_prn.c,v 1.10 2023/07/08 14:28:15 beck 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 | */ |
@@ -77,6 +77,7 @@ DSA_print_fp(FILE *fp, const DSA *x, int off) | |||
77 | BIO_free(b); | 77 | BIO_free(b); |
78 | return ret; | 78 | return ret; |
79 | } | 79 | } |
80 | LCRYPTO_ALIAS(DSA_print_fp); | ||
80 | 81 | ||
81 | int | 82 | int |
82 | DSAparams_print_fp(FILE *fp, const DSA *x) | 83 | DSAparams_print_fp(FILE *fp, const DSA *x) |
@@ -93,6 +94,7 @@ DSAparams_print_fp(FILE *fp, const DSA *x) | |||
93 | BIO_free(b); | 94 | BIO_free(b); |
94 | return ret; | 95 | return ret; |
95 | } | 96 | } |
97 | LCRYPTO_ALIAS(DSAparams_print_fp); | ||
96 | 98 | ||
97 | int | 99 | int |
98 | DSA_print(BIO *bp, const DSA *x, int off) | 100 | DSA_print(BIO *bp, const DSA *x, int off) |
@@ -111,6 +113,7 @@ DSA_print(BIO *bp, const DSA *x, int off) | |||
111 | EVP_PKEY_free(pk); | 113 | EVP_PKEY_free(pk); |
112 | return ret; | 114 | return ret; |
113 | } | 115 | } |
116 | LCRYPTO_ALIAS(DSA_print); | ||
114 | 117 | ||
115 | int | 118 | int |
116 | DSAparams_print(BIO *bp, const DSA *x) | 119 | DSAparams_print(BIO *bp, const DSA *x) |
@@ -129,3 +132,4 @@ DSAparams_print(BIO *bp, const DSA *x) | |||
129 | EVP_PKEY_free(pk); | 132 | EVP_PKEY_free(pk); |
130 | return ret; | 133 | return ret; |
131 | } | 134 | } |
135 | LCRYPTO_ALIAS(DSAparams_print); | ||