diff options
author | Dr. Stephen Henson <steve@openssl.org> | 2016-11-30 16:55:30 +0000 |
---|---|---|
committer | Dr. Stephen Henson <steve@openssl.org> | 2017-01-08 01:42:48 +0000 |
commit | e64b2b5c839efb89403b4894f1ed43d5b8131201 (patch) | |
tree | 071c116f1db81963d981471565e69d8fd2d3ec98 /include | |
parent | ad4b3d0a658a2f5e4028714109d347c2b105dae4 (diff) |
Key gen param support.
Reviewed-by: Rich Salz <rsalz@openssl.org>
Reviewed-by: Matt Caswell <matt@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/2177)
Diffstat (limited to 'include')
-rw-r--r-- | include/openssl/rsa.h | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/include/openssl/rsa.h b/include/openssl/rsa.h index d46940aa1a..ededce089a 100644 --- a/include/openssl/rsa.h +++ b/include/openssl/rsa.h @@ -97,10 +97,18 @@ extern "C" { RSA_pkey_ctx_ctrl(ctx, (EVP_PKEY_OP_SIGN|EVP_PKEY_OP_VERIFY), \ EVP_PKEY_CTRL_RSA_PSS_SALTLEN, len, NULL) +# define EVP_PKEY_CTX_set_rsa_pss_keygen_saltlen(ctx, len) \ + EVP_PKEY_CTX_ctrl(ctx, EVP_PKEY_RSA_PSS, EVP_PKEY_OP_KEYGEN, \ + EVP_PKEY_CTRL_RSA_PSS_SALTLEN, len, NULL) + # define EVP_PKEY_CTX_get_rsa_pss_saltlen(ctx, plen) \ RSA_pkey_ctx_ctrl(ctx, (EVP_PKEY_OP_SIGN|EVP_PKEY_OP_VERIFY), \ EVP_PKEY_CTRL_GET_RSA_PSS_SALTLEN, 0, plen) +# define EVP_PKEY_CTX_set_rsa_pss_keygen_saltlen(ctx, len) \ + EVP_PKEY_CTX_ctrl(ctx, EVP_PKEY_RSA_PSS, EVP_PKEY_OP_KEYGEN, \ + EVP_PKEY_CTRL_RSA_PSS_SALTLEN, len, NULL) + # define EVP_PKEY_CTX_set_rsa_keygen_bits(ctx, bits) \ RSA_pkey_ctx_ctrl(ctx, EVP_PKEY_OP_KEYGEN, \ EVP_PKEY_CTRL_RSA_KEYGEN_BITS, bits, NULL) @@ -113,6 +121,10 @@ extern "C" { RSA_pkey_ctx_ctrl(ctx, EVP_PKEY_OP_TYPE_SIG | EVP_PKEY_OP_TYPE_CRYPT, \ EVP_PKEY_CTRL_RSA_MGF1_MD, 0, (void *)md) +# define EVP_PKEY_CTX_set_rsa_pss_keygen_mgf1_md(ctx, md) \ + EVP_PKEY_CTX_ctrl(ctx, EVP_PKEY_RSA_PSS, EVP_PKEY_OP_KEYGEN, \ + EVP_PKEY_CTRL_RSA_MGF1_MD, 0, (void *)md) + # define EVP_PKEY_CTX_set_rsa_oaep_md(ctx, md) \ EVP_PKEY_CTX_ctrl(ctx, EVP_PKEY_RSA, EVP_PKEY_OP_TYPE_CRYPT, \ EVP_PKEY_CTRL_RSA_OAEP_MD, 0, (void *)md) @@ -133,6 +145,11 @@ extern "C" { EVP_PKEY_CTX_ctrl(ctx, EVP_PKEY_RSA, EVP_PKEY_OP_TYPE_CRYPT, \ EVP_PKEY_CTRL_GET_RSA_OAEP_LABEL, 0, (void *)l) +# define EVP_PKEY_CTX_rsa_pss_key_digest(ctx, md) \ + EVP_PKEY_CTX_ctrl(ctx, EVP_PKEY_RSAi_PSS, \ + EVP_PKEY_OP_TYPE_CRYPT, EVP_PKEY_CTRL_MD, \ + 0, (void *)md) + # define EVP_PKEY_CTRL_RSA_PADDING (EVP_PKEY_ALG_CTRL + 1) # define EVP_PKEY_CTRL_RSA_PSS_SALTLEN (EVP_PKEY_ALG_CTRL + 2) |