diff options
author | Dr. Matthias St. Pierre <Matthias.St.Pierre@ncp-e.com> | 2018-05-16 16:18:13 +0200 |
---|---|---|
committer | Dr. Matthias St. Pierre <Matthias.St.Pierre@ncp-e.com> | 2018-05-18 08:53:48 +0200 |
commit | 6db7fadf0975c75bfba01dd939063b4bdcb1a0fe (patch) | |
tree | 0406141399b090370828fabeeec3359a9b209237 /doc/man3/DH_get0_pqg.pod | |
parent | Make BN_GF2m_mod_arr more constant time (diff) | |
download | openssl-6db7fadf0975c75bfba01dd939063b4bdcb1a0fe.tar.xz openssl-6db7fadf0975c75bfba01dd939063b4bdcb1a0fe.zip |
DH: add simple getters for commonly used DH struct members
Reviewed-by: Rich Salz <rsalz@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/6273)
Diffstat (limited to 'doc/man3/DH_get0_pqg.pod')
-rw-r--r-- | doc/man3/DH_get0_pqg.pod | 20 |
1 files changed, 17 insertions, 3 deletions
diff --git a/doc/man3/DH_get0_pqg.pod b/doc/man3/DH_get0_pqg.pod index ec476a7d62..6b25556ef7 100644 --- a/doc/man3/DH_get0_pqg.pod +++ b/doc/man3/DH_get0_pqg.pod @@ -2,9 +2,11 @@ =head1 NAME -DH_get0_pqg, DH_set0_pqg, DH_get0_key, DH_set0_key, DH_clear_flags, -DH_test_flags, DH_set_flags, DH_get0_engine, DH_get_length, -DH_set_length - Routines for getting and setting data in a DH object +DH_get0_pqg, DH_set0_pqg, DH_get0_key, DH_set0_key, +DH_get0_p, DH_get0_q, DH_get0_g, +DH_get0_priv_key, DH_get0_pub_key, +DH_clear_flags, DH_test_flags, DH_set_flags, DH_get0_engine, +DH_get_length, DH_set_length - Routines for getting and setting data in a DH object =head1 SYNOPSIS @@ -16,6 +18,11 @@ DH_set_length - Routines for getting and setting data in a DH object void DH_get0_key(const DH *dh, const BIGNUM **pub_key, const BIGNUM **priv_key); int DH_set0_key(DH *dh, BIGNUM *pub_key, BIGNUM *priv_key); + const BIGNUM *DH_get0_p(const DH *dh); + const BIGNUM *DH_get0_q(const DH *dh); + const BIGNUM *DH_get0_g(const DH *dh); + const BIGNUM *DH_get0_priv_key(const DH *dh); + const BIGNUM *DH_get0_pub_key(const DH *dh); void DH_clear_flags(DH *dh, int flags); int DH_test_flags(const DH *dh, int flags); void DH_set_flags(DH *dh, int flags); @@ -54,6 +61,10 @@ untouched. As with DH_set0_pqg() this function transfers the memory management of the key values to the DH object, and therefore they should not be freed directly after this function has been called. +Any of the values B<p>, B<q>, B<g>, B<priv_key>, and B<pub_key> can also be +retrieved separately by the corresponding function DH_get0_p(), DH_get0_q(), +DH_get0_g(), DH_get0_priv_key(), and DH_get0_pub_key(), respectively. + DH_set_flags() sets the flags in the B<flags> parameter on the DH object. Multiple flags can be passed in one go (bitwise ORed together). Any flags that are already set are left set. DH_test_flags() tests to see whether the flags @@ -81,6 +92,9 @@ duplicate. The same applies to DH_get0_pqg() and DH_set0_pqg(). DH_set0_pqg() and DH_set0_key() return 1 on success or 0 on failure. +DH_get0_p(), DH_get0_q(), DH_get0_g(), DH_get0_priv_key(), and DH_get0_pub_key() +return the respective value. + DH_test_flags() returns the current state of the flags in the DH object. DH_get0_engine() returns the ENGINE set for the DH object or NULL if no ENGINE |