diff options
author | Parménides GV <parmegv@sdf.org> | 2014-09-23 18:10:57 +0200 |
---|---|---|
committer | Parménides GV <parmegv@sdf.org> | 2014-09-23 18:10:57 +0200 |
commit | d0e7ba3029b2fd42582413aa95773fe7dbdede90 (patch) | |
tree | 733b8601d6e3a070fc54bde280526e16d0c69507 /app/openssl/crypto/pkcs7/pk7_doit.c | |
parent | 248ce016ac2f33df9673e90277733abfd854f27d (diff) |
Updated native subprojects from ics-openvpn.
Diffstat (limited to 'app/openssl/crypto/pkcs7/pk7_doit.c')
-rw-r--r-- | app/openssl/crypto/pkcs7/pk7_doit.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/app/openssl/crypto/pkcs7/pk7_doit.c b/app/openssl/crypto/pkcs7/pk7_doit.c index 77fda3b8..d91aa116 100644 --- a/app/openssl/crypto/pkcs7/pk7_doit.c +++ b/app/openssl/crypto/pkcs7/pk7_doit.c @@ -440,6 +440,11 @@ BIO *PKCS7_dataDecode(PKCS7 *p7, EVP_PKEY *pkey, BIO *in_bio, X509 *pcert) { case NID_pkcs7_signed: data_body=PKCS7_get_octet_string(p7->d.sign->contents); + if (!PKCS7_is_detached(p7) && data_body == NULL) + { + PKCS7err(PKCS7_F_PKCS7_DATADECODE,PKCS7_R_INVALID_SIGNED_DATA_TYPE); + goto err; + } md_sk=p7->d.sign->md_algs; break; case NID_pkcs7_signedAndEnveloped: @@ -928,6 +933,7 @@ int PKCS7_SIGNER_INFO_sign(PKCS7_SIGNER_INFO *si) if (EVP_DigestSignUpdate(&mctx,abuf,alen) <= 0) goto err; OPENSSL_free(abuf); + abuf = NULL; if (EVP_DigestSignFinal(&mctx, NULL, &siglen) <= 0) goto err; abuf = OPENSSL_malloc(siglen); |