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 /crypto | |
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 'crypto')
-rw-r--r-- | crypto/rsa/rsa_pmeth.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/crypto/rsa/rsa_pmeth.c b/crypto/rsa/rsa_pmeth.c index f226c055dc..a1c65ef87e 100644 --- a/crypto/rsa/rsa_pmeth.c +++ b/crypto/rsa/rsa_pmeth.c @@ -388,6 +388,8 @@ static int pkey_rsa_ctrl(EVP_PKEY_CTX *ctx, int type, int p1, void *p2) goto bad_pad; if (!rctx->md) rctx->md = EVP_sha1(); + } else if (ctx->pmeth->pkey_id == EVP_PKEY_RSA_PSS) { + goto bad_pad; } if (p1 == RSA_PKCS1_OAEP_PADDING) { if (!(ctx->operation & EVP_PKEY_OP_TYPE_CRYPT)) |