summaryrefslogtreecommitdiff
path: root/src/lib/libcrypto/dsa/dsa_lib.c
diff options
context:
space:
mode:
authortb <>2022-01-05 20:33:49 +0000
committertb <>2022-01-05 20:33:49 +0000
commit96a387aa79534030b5f4e06cefb74062f01c4f87 (patch)
tree43a16eca5c4aaff3aaf27fb114032f18eb704c82 /src/lib/libcrypto/dsa/dsa_lib.c
parentb86fb16a7f2ecb74d2fd9c11640ea10f44a18497 (diff)
downloadopenbsd-96a387aa79534030b5f4e06cefb74062f01c4f87.tar.gz
openbsd-96a387aa79534030b5f4e06cefb74062f01c4f87.tar.bz2
openbsd-96a387aa79534030b5f4e06cefb74062f01c4f87.zip
Prepare to provide DSA_get0_{p,q,g,{priv,pub}_key}()
ok inoguchi jsing
Diffstat (limited to 'src/lib/libcrypto/dsa/dsa_lib.c')
-rw-r--r--src/lib/libcrypto/dsa/dsa_lib.c32
1 files changed, 31 insertions, 1 deletions
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
364const BIGNUM *
365DSA_get0_p(const DSA *d)
366{
367 return d->p;
368}
369
370const BIGNUM *
371DSA_get0_q(const DSA *d)
372{
373 return d->q;
374}
375
376const BIGNUM *
377DSA_get0_g(const DSA *d)
378{
379 return d->g;
380}
381
382const BIGNUM *
383DSA_get0_pub_key(const DSA *d)
384{
385 return d->pub_key;
386}
387
388const BIGNUM *
389DSA_get0_priv_key(const DSA *d)
390{
391 return d->priv_key;
392}
393
364void 394void
365DSA_clear_flags(DSA *d, int flags) 395DSA_clear_flags(DSA *d, int flags)
366{ 396{