diff options
Diffstat (limited to 'src/lib/libcrypto/dsa/dsa_ossl.c')
| -rw-r--r-- | src/lib/libcrypto/dsa/dsa_ossl.c | 37 |
1 files changed, 36 insertions, 1 deletions
diff --git a/src/lib/libcrypto/dsa/dsa_ossl.c b/src/lib/libcrypto/dsa/dsa_ossl.c index a242291a62..fd5fac64bb 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.47 2023/01/11 04:39:42 jsing Exp $ */ | 1 | /* $OpenBSD: dsa_ossl.c,v 1.48 2023/02/13 09:21:35 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 | * |
| @@ -433,3 +433,38 @@ dsa_finish(DSA *dsa) | |||
| 433 | BN_MONT_CTX_free(dsa->method_mont_p); | 433 | BN_MONT_CTX_free(dsa->method_mont_p); |
| 434 | return 1; | 434 | return 1; |
| 435 | } | 435 | } |
| 436 | |||
| 437 | DSA_SIG * | ||
| 438 | DSA_SIG_new(void) | ||
| 439 | { | ||
| 440 | return calloc(1, sizeof(DSA_SIG)); | ||
| 441 | } | ||
| 442 | |||
| 443 | void | ||
| 444 | DSA_SIG_free(DSA_SIG *sig) | ||
| 445 | { | ||
| 446 | if (sig == NULL) | ||
| 447 | return; | ||
| 448 | |||
| 449 | BN_free(sig->r); | ||
| 450 | BN_free(sig->s); | ||
| 451 | free(sig); | ||
| 452 | } | ||
| 453 | |||
| 454 | int | ||
| 455 | DSA_sign_setup(DSA *dsa, BN_CTX *ctx_in, BIGNUM **kinvp, BIGNUM **rp) | ||
| 456 | { | ||
| 457 | return dsa->meth->dsa_sign_setup(dsa, ctx_in, kinvp, rp); | ||
| 458 | } | ||
| 459 | |||
| 460 | DSA_SIG * | ||
| 461 | DSA_do_sign(const unsigned char *dgst, int dlen, DSA *dsa) | ||
| 462 | { | ||
| 463 | return dsa->meth->dsa_do_sign(dgst, dlen, dsa); | ||
| 464 | } | ||
| 465 | |||
| 466 | int | ||
| 467 | DSA_do_verify(const unsigned char *dgst, int dgst_len, DSA_SIG *sig, DSA *dsa) | ||
| 468 | { | ||
| 469 | return dsa->meth->dsa_do_verify(dgst, dgst_len, sig, dsa); | ||
| 470 | } | ||
