aboutsummaryrefslogtreecommitdiffstats
path: root/crypto/cms/cms_lib.c
diff options
context:
space:
mode:
Diffstat (limited to 'crypto/cms/cms_lib.c')
-rw-r--r--crypto/cms/cms_lib.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/crypto/cms/cms_lib.c b/crypto/cms/cms_lib.c
index d6cb60d02d15..6d27c4969b92 100644
--- a/crypto/cms/cms_lib.c
+++ b/crypto/cms/cms_lib.c
@@ -413,6 +413,8 @@ static STACK_OF(CMS_CertificateChoices)
return &cms->d.signedData->certificates;
case NID_pkcs7_enveloped:
+ if (cms->d.envelopedData->originatorInfo == NULL)
+ return NULL;
return &cms->d.envelopedData->originatorInfo->certificates;
default:
@@ -488,6 +490,8 @@ static STACK_OF(CMS_RevocationInfoChoice)
return &cms->d.signedData->crls;
case NID_pkcs7_enveloped:
+ if (cms->d.envelopedData->originatorInfo == NULL)
+ return NULL;
return &cms->d.envelopedData->originatorInfo->crls;
default: