diff options
author | Dr. Stephen Henson <steve@openssl.org> | 2016-11-30 18:26:10 +0000 |
---|---|---|
committer | Dr. Stephen Henson <steve@openssl.org> | 2017-01-08 01:42:48 +0000 |
commit | a300c7256e14527e3c4804b34824835db42fce54 (patch) | |
tree | ded3844ef8305caf0ad3bc2bf960e5f7b569c15c /include | |
parent | e64b2b5c839efb89403b4894f1ed43d5b8131201 (diff) |
Support pad mode get/set for PSS keys.
Pad mode setting returns an error if the mode is anything other then PSS.
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 | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/include/openssl/rsa.h b/include/openssl/rsa.h index ededce089a..d9c15b0d50 100644 --- a/include/openssl/rsa.h +++ b/include/openssl/rsa.h @@ -86,12 +86,10 @@ extern "C" { # endif # define EVP_PKEY_CTX_set_rsa_padding(ctx, pad) \ - EVP_PKEY_CTX_ctrl(ctx, EVP_PKEY_RSA, -1, EVP_PKEY_CTRL_RSA_PADDING, \ - pad, NULL) + RSA_pkey_ctx_ctrl(ctx, -1, EVP_PKEY_CTRL_RSA_PADDING, pad, NULL) # define EVP_PKEY_CTX_get_rsa_padding(ctx, ppad) \ - EVP_PKEY_CTX_ctrl(ctx, EVP_PKEY_RSA, -1, \ - EVP_PKEY_CTRL_GET_RSA_PADDING, 0, ppad) + RSA_pkey_ctx_ctrl(ctx, -1, EVP_PKEY_CTRL_GET_RSA_PADDING, 0, ppad) # define EVP_PKEY_CTX_set_rsa_pss_saltlen(ctx, len) \ RSA_pkey_ctx_ctrl(ctx, (EVP_PKEY_OP_SIGN|EVP_PKEY_OP_VERIFY), \ |