Set PSS padding mode for PSS keys.
@@ -49,6 +49,9 @@ static int pkey_rsa_init(EVP_PKEY_CTX *ctx)
if (rctx == NULL)
return 0;
rctx->nbits = 1024;
+ 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;
