[openssl] master update
tmraz at fedoraproject.org
tmraz at fedoraproject.org
Tue Feb 2 15:50:50 UTC 2021
The branch master has been updated
via 6a1a6498ac4ecfb95331e30fc52d6e25cafbba43 (commit)
from af403db090ee66715e81f0062d1ef614e8d921b5 (commit)
- Log -----------------------------------------------------------------
commit 6a1a6498ac4ecfb95331e30fc52d6e25cafbba43
Author: Tomas Mraz <tomas at openssl.org>
Date: Mon Jan 25 19:12:43 2021 +0100
dh_cms_set_peerkey: Pad the public key to p size
Reviewed-by: Matt Caswell <matt at openssl.org>
(Merged from https://github.com/openssl/openssl/pull/13958)
-----------------------------------------------------------------------
Summary of changes:
crypto/cms/cms_dh.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/crypto/cms/cms_dh.c b/crypto/cms/cms_dh.c
index 52bce12c73..e55b4a062f 100644
--- a/crypto/cms/cms_dh.c
+++ b/crypto/cms/cms_dh.c
@@ -48,7 +48,11 @@ static int dh_cms_set_peerkey(EVP_PKEY_CTX *pctx,
if ((public_key = d2i_ASN1_INTEGER(NULL, &p, plen)) == NULL)
goto err;
- plen = ASN1_STRING_length((ASN1_STRING *)public_key);
+ /*
+ * Pad to full p parameter size as that is checked by
+ * EVP_PKEY_set1_encoded_public_key()
+ */
+ plen = EVP_PKEY_size(pk);
if ((bnpub = ASN1_INTEGER_to_BN(public_key, NULL)) == NULL)
goto err;
if ((buf = OPENSSL_malloc(plen)) == NULL)
More information about the openssl-commits
mailing list