summaryrefslogtreecommitdiffstats
path: root/crypto/bn/bn_dh.c
diff options
context:
space:
mode:
authorDr. Stephen Henson <steve@openssl.org>2017-05-30 01:16:56 +0100
committerDr. Stephen Henson <steve@openssl.org>2017-10-12 02:40:30 +0100
commit7806a782c87f8ce07bc710f480a1db9511d11506 (patch)
treea92b88e3f08b1de3ebb66aad63ac05b6328ad8ee /crypto/bn/bn_dh.c
parentf682bd60cf7af6d124c7c6df278964d90b025890 (diff)
DH named parameter support
Add functions to return DH parameters using NID and to return the NID if parameters match a named set. Currently this supports only RFC7919 parameters but could be expanded in future. Reviewed-by: Andy Polyakov <appro@openssl.org> (Merged from https://github.com/openssl/openssl/pull/4485)
Diffstat (limited to 'crypto/bn/bn_dh.c')
-rw-r--r--crypto/bn/bn_dh.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/crypto/bn/bn_dh.c b/crypto/bn/bn_dh.c
index 652545d89c..38acdee234 100644
--- a/crypto/bn/bn_dh.c
+++ b/crypto/bn/bn_dh.c
@@ -487,6 +487,10 @@ static const BN_ULONG ffdhe8192_p[] = {
OSSL_NELEM(x),\
0, BN_FLG_STATIC_DATA };
+static const BN_ULONG value_2 = 2;
+
+const BIGNUM _bignum_const_2 =
+ { (BN_ULONG *)&value_2, 1, 1, 0, BN_FLG_STATIC_DATA };
make_dh_bn(dh1024_160_p)
make_dh_bn(dh1024_160_g)