aboutsummaryrefslogtreecommitdiffstats
path: root/crypto/dh/dh.h
diff options
context:
space:
mode:
authorDr. Stephen Henson <steve@openssl.org>2013-07-31 18:10:16 +0100
committerDr. Stephen Henson <steve@openssl.org>2013-08-05 15:45:01 +0100
commit3909087801729bebb3a1182936a855a47e4ee9c9 (patch)
tree3fc4c397ec84fc296cfc267eacac499ed7fd91b5 /crypto/dh/dh.h
parentd3cc91eee2cba07d8908f0fea531c62863ed3ccf (diff)
downloadopenssl-3909087801729bebb3a1182936a855a47e4ee9c9.tar.gz
Extend DH parameter generation support.
Add support for DH parameter generation using DSA methods including FIPS 186-3.
Diffstat (limited to 'crypto/dh/dh.h')
-rw-r--r--crypto/dh/dh.h11
1 files changed, 10 insertions, 1 deletions
diff --git a/crypto/dh/dh.h b/crypto/dh/dh.h
index ce5fee9c79..53f9f26566 100644
--- a/crypto/dh/dh.h
+++ b/crypto/dh/dh.h
@@ -243,6 +243,14 @@ DH *DH_get_2048_256(void);
EVP_PKEY_CTX_ctrl(ctx, EVP_PKEY_DH, EVP_PKEY_OP_PARAMGEN, \
EVP_PKEY_CTRL_DH_PARAMGEN_PRIME_LEN, len, NULL)
+#define EVP_PKEY_CTX_set_dh_paramgen_subprime_len(ctx, len) \
+ EVP_PKEY_CTX_ctrl(ctx, EVP_PKEY_DH, EVP_PKEY_OP_PARAMGEN, \
+ EVP_PKEY_CTRL_DH_PARAMGEN_SUBPRIME_LEN, len, NULL)
+
+#define EVP_PKEY_CTX_set_dh_paramgen_type(ctx, typ) \
+ EVP_PKEY_CTX_ctrl(ctx, EVP_PKEY_DH, EVP_PKEY_OP_PARAMGEN, \
+ EVP_PKEY_CTRL_DH_PARAMGEN_TYPE, typ, NULL)
+
#define EVP_PKEY_CTX_set_dh_paramgen_generator(ctx, gen) \
EVP_PKEY_CTX_ctrl(ctx, EVP_PKEY_DH, EVP_PKEY_OP_PARAMGEN, \
EVP_PKEY_CTRL_DH_PARAMGEN_GENERATOR, gen, NULL)
@@ -258,7 +266,8 @@ DH *DH_get_2048_256(void);
#define EVP_PKEY_CTRL_DH_PARAMGEN_PRIME_LEN (EVP_PKEY_ALG_CTRL + 1)
#define EVP_PKEY_CTRL_DH_PARAMGEN_GENERATOR (EVP_PKEY_ALG_CTRL + 2)
#define EVP_PKEY_CTRL_DH_RFC5114 (EVP_PKEY_ALG_CTRL + 3)
-
+#define EVP_PKEY_CTRL_DH_PARAMGEN_SUBPRIME_LEN (EVP_PKEY_ALG_CTRL + 4)
+#define EVP_PKEY_CTRL_DH_PARAMGEN_TYPE (EVP_PKEY_ALG_CTRL + 5)
/* BEGIN ERROR CODES */
/* The following lines are auto generated by the script mkerr.pl. Any changes