提交 ad4b3d0a 编写于 作者: D Dr. Stephen Henson

Set PSS padding mode for PSS keys.

Reviewed-by: NRich Salz <rsalz@openssl.org>
Reviewed-by: NMatt Caswell <matt@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/2177)
上级 410877ba
......@@ -49,7 +49,10 @@ static int pkey_rsa_init(EVP_PKEY_CTX *ctx)
if (rctx == NULL)
return 0;
rctx->nbits = 1024;
rctx->pad_mode = RSA_PKCS1_PADDING;
if (ctx->pmeth->pkey_id == EVP_PKEY_RSA_PSS)
rctx->pad_mode = RSA_PKCS1_PSS_PADDING;
else
rctx->pad_mode = RSA_PKCS1_PADDING;
rctx->saltlen = -2;
ctx->data = rctx;
ctx->keygen_info = rctx->gentmp;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册