summaryrefslogtreecommitdiffstats
path: root/crypto/dsa
diff options
context:
space:
mode:
authorDr. Matthias St. Pierre <Matthias.St.Pierre@ncp-e.com>2018-05-27 08:57:55 +0200
committerDr. Matthias St. Pierre <Matthias.St.Pierre@ncp-e.com>2018-05-28 19:11:23 +0200
commite6f35b5768d8810644f1f2cc9ca8294d97688343 (patch)
treec7b679f4f410ab4d43acfd2ec6b64171e3b1fddb /crypto/dsa
parent5777254b7aa71ba14582912509c07ff9027a55eb (diff)
DSA: add simple getters for commonly used struct members
Reviewed-by: Richard Levitte <levitte@openssl.org> (Merged from https://github.com/openssl/openssl/pull/6290)
Diffstat (limited to 'crypto/dsa')
-rw-r--r--crypto/dsa/dsa_lib.c25
1 files changed, 25 insertions, 0 deletions
diff --git a/crypto/dsa/dsa_lib.c b/crypto/dsa/dsa_lib.c
index e730e8e68a..9275a53081 100644
--- a/crypto/dsa/dsa_lib.c
+++ b/crypto/dsa/dsa_lib.c
@@ -305,6 +305,31 @@ int DSA_set0_key(DSA *d, BIGNUM *pub_key, BIGNUM *priv_key)
return 1;
}
+const BIGNUM *DSA_get0_p(const DSA *d)
+{
+ return d->p;
+}
+
+const BIGNUM *DSA_get0_q(const DSA *d)
+{
+ return d->q;
+}
+
+const BIGNUM *DSA_get0_g(const DSA *d)
+{
+ return d->g;
+}
+
+const BIGNUM *DSA_get0_pub_key(const DSA *d)
+{
+ return d->pub_key;
+}
+
+const BIGNUM *DSA_get0_priv_key(const DSA *d)
+{
+ return d->priv_key;
+}
+
void DSA_clear_flags(DSA *d, int flags)
{
d->flags &= ~flags;