diff options
author | Dr. Stephen Henson <steve@openssl.org> | 2006-04-12 23:51:24 +0000 |
---|---|---|
committer | Dr. Stephen Henson <steve@openssl.org> | 2006-04-12 23:51:24 +0000 |
commit | 3ba0885a3e0d52c6bef91ce9bea26cd3eabd3594 (patch) | |
tree | 7ed7dcd305e4e21fb1236703f130fac9d9e0581a /crypto/dh/dh.h | |
parent | 023c9d8dd5fee8dfe1ccc4aea71050f4c7ca6680 (diff) |
Extend DH ASN1 method, add DH EVP_PKEY_METHOD.
Diffstat (limited to 'crypto/dh/dh.h')
-rw-r--r-- | crypto/dh/dh.h | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/crypto/dh/dh.h b/crypto/dh/dh.h index f81bad1811..6ab27e44c3 100644 --- a/crypto/dh/dh.h +++ b/crypto/dh/dh.h @@ -201,6 +201,18 @@ int DHparams_print(BIO *bp, const DH *x); int DHparams_print(char *bp, const DH *x); #endif +#define EVP_PKEY_CTX_set_dh_paramgen_prime_len(ctx, len) \ + 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_generator(ctx, gen) \ + EVP_PKEY_CTX_ctrl(ctx, EVP_PKEY_DH, EVP_PKEY_OP_PARAMGEN, \ + EVP_PKEY_CTRL_DH_PARAMGEN_GENERATOR, gen, NULL) + +#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) + + /* BEGIN ERROR CODES */ /* The following lines are auto generated by the script mkerr.pl. Any changes * made after this point may be overwritten when the script is next run. @@ -220,9 +232,9 @@ void ERR_load_DH_strings(void); #define DH_F_DH_PRIV_ENCODE 111 #define DH_F_DH_PUB_DECODE 108 #define DH_F_DH_PUB_ENCODE 109 -#define DH_F_DSA_PRIV_ENCODE 112 #define DH_F_GENERATE_KEY 103 #define DH_F_GENERATE_PARAMETERS 104 +#define DH_F_PKEY_DH_KEYGEN 113 /* Reason codes. */ #define DH_R_BAD_GENERATOR 101 |