diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/lib/libcrypto/dsa/dsa.h | 9 | ||||
| -rw-r--r-- | src/lib/libcrypto/dsa/dsa_lib.c | 32 |
2 files changed, 39 insertions, 2 deletions
diff --git a/src/lib/libcrypto/dsa/dsa.h b/src/lib/libcrypto/dsa/dsa.h index 15536f63e2..391f02c5a4 100644 --- a/src/lib/libcrypto/dsa/dsa.h +++ b/src/lib/libcrypto/dsa/dsa.h | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | /* $OpenBSD: dsa.h,v 1.31 2021/11/29 20:13:25 tb Exp $ */ | 1 | /* $OpenBSD: dsa.h,v 1.32 2022/01/05 20:33:49 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 | * |
| @@ -267,6 +267,13 @@ void DSA_get0_pqg(const DSA *d, const BIGNUM **p, const BIGNUM **q, | |||
| 267 | int DSA_set0_pqg(DSA *d, BIGNUM *p, BIGNUM *q, BIGNUM *g); | 267 | int DSA_set0_pqg(DSA *d, BIGNUM *p, BIGNUM *q, BIGNUM *g); |
| 268 | void DSA_get0_key(const DSA *d, const BIGNUM **pub_key, const BIGNUM **priv_key); | 268 | void DSA_get0_key(const DSA *d, const BIGNUM **pub_key, const BIGNUM **priv_key); |
| 269 | int DSA_set0_key(DSA *d, BIGNUM *pub_key, BIGNUM *priv_key); | 269 | int DSA_set0_key(DSA *d, BIGNUM *pub_key, BIGNUM *priv_key); |
| 270 | #if defined(LIBRESSL_OPAQUE_DSA) || defined(LIBRESSL_CRYPTO_INTERNAL) | ||
| 271 | const BIGNUM *DSA_get0_p(const DSA *d); | ||
| 272 | const BIGNUM *DSA_get0_q(const DSA *d); | ||
| 273 | const BIGNUM *DSA_get0_g(const DSA *d); | ||
| 274 | const BIGNUM *DSA_get0_pub_key(const DSA *d); | ||
| 275 | const BIGNUM *DSA_get0_priv_key(const DSA *d); | ||
| 276 | #endif | ||
| 270 | void DSA_clear_flags(DSA *d, int flags); | 277 | void DSA_clear_flags(DSA *d, int flags); |
| 271 | int DSA_test_flags(const DSA *d, int flags); | 278 | int DSA_test_flags(const DSA *d, int flags); |
| 272 | void DSA_set_flags(DSA *d, int flags); | 279 | void DSA_set_flags(DSA *d, int flags); |
diff --git a/src/lib/libcrypto/dsa/dsa_lib.c b/src/lib/libcrypto/dsa/dsa_lib.c index d5fdd6e78e..146d2cc5e0 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.29 2018/04/14 07:09:21 tb Exp $ */ | 1 | /* $OpenBSD: dsa_lib.c,v 1.30 2022/01/05 20:33:49 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 | * |
| @@ -361,6 +361,36 @@ DSA_set0_key(DSA *d, BIGNUM *pub_key, BIGNUM *priv_key) | |||
| 361 | return 1; | 361 | return 1; |
| 362 | } | 362 | } |
| 363 | 363 | ||
| 364 | const BIGNUM * | ||
| 365 | DSA_get0_p(const DSA *d) | ||
| 366 | { | ||
| 367 | return d->p; | ||
| 368 | } | ||
| 369 | |||
| 370 | const BIGNUM * | ||
| 371 | DSA_get0_q(const DSA *d) | ||
| 372 | { | ||
| 373 | return d->q; | ||
| 374 | } | ||
| 375 | |||
| 376 | const BIGNUM * | ||
| 377 | DSA_get0_g(const DSA *d) | ||
| 378 | { | ||
| 379 | return d->g; | ||
| 380 | } | ||
| 381 | |||
| 382 | const BIGNUM * | ||
| 383 | DSA_get0_pub_key(const DSA *d) | ||
| 384 | { | ||
| 385 | return d->pub_key; | ||
| 386 | } | ||
| 387 | |||
| 388 | const BIGNUM * | ||
| 389 | DSA_get0_priv_key(const DSA *d) | ||
| 390 | { | ||
| 391 | return d->priv_key; | ||
| 392 | } | ||
| 393 | |||
| 364 | void | 394 | void |
| 365 | DSA_clear_flags(DSA *d, int flags) | 395 | DSA_clear_flags(DSA *d, int flags) |
| 366 | { | 396 | { |
