blob: 6ccc8c3e980cab21526516e15c8d075a559ace36 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
|
--- crypto/pkcs7/pk7_doit.c 2003/11/03 00:06:02 1.50.2.4.2.1
+++ crypto/pkcs7/pk7_doit.c 2004/03/25 00:58:59 1.50.2.4.2.2
@@ -257,10 +257,15 @@
bio=BIO_new(BIO_s_null());
else
{
- ASN1_OCTET_STRING *os;
- os = PKCS7_get_octet_string(p7->d.sign->contents);
- if (os && os->length > 0)
- bio = BIO_new_mem_buf(os->data, os->length);
+ if (PKCS7_type_is_signed(p7))
+ {
+ ASN1_OCTET_STRING *os;
+ os = PKCS7_get_octet_string(
+ p7->d.sign->contents);
+ if (os && os->length > 0)
+ bio = BIO_new_mem_buf(os->data,
+ os->length);
+ }
if(bio == NULL)
{
bio=BIO_new(BIO_s_mem());
|