From f7a21d85b6851bdbdc8db1397285d4c63b2c40be Mon Sep 17 00:00:00 2001 From: "Dr. Stephen Henson" Date: Tue, 6 Dec 2016 14:19:41 +0000 Subject: [PATCH] Set EVP_PKEY_CTX in SignerInfo If we aren't setting public key parameters make EVP_PKEY_CTX available in SignerInfo so PSS mode and parameters are automatically selected. Reviewed-by: Rich Salz Reviewed-by: Matt Caswell (Merged from https://github.com/openssl/openssl/pull/2177) --- crypto/cms/cms_sd.c | 1 + 1 file changed, 1 insertion(+) diff --git a/crypto/cms/cms_sd.c b/crypto/cms/cms_sd.c index 76c1f53b56..a31e8495ca 100644 --- a/crypto/cms/cms_sd.c +++ b/crypto/cms/cms_sd.c @@ -656,6 +656,7 @@ int CMS_SignerInfo_sign(CMS_SignerInfo *si) EVP_MD_CTX_reset(mctx); if (EVP_DigestSignInit(mctx, &pctx, md, NULL, si->pkey) <= 0) goto err; + si->pctx = pctx; } if (EVP_PKEY_CTX_ctrl(pctx, -1, EVP_PKEY_OP_SIGN, -- 2.25.1