summary refs log tree commit diff
path: root/crypto/src/cms/CMSSignedDataStreamGenerator.cs
diff options
context:
space:
mode:
Diffstat (limited to 'crypto/src/cms/CMSSignedDataStreamGenerator.cs')
-rw-r--r--crypto/src/cms/CMSSignedDataStreamGenerator.cs8
1 files changed, 6 insertions, 2 deletions
diff --git a/crypto/src/cms/CMSSignedDataStreamGenerator.cs b/crypto/src/cms/CMSSignedDataStreamGenerator.cs
index d0ab7428a..1cea087f3 100644
--- a/crypto/src/cms/CMSSignedDataStreamGenerator.cs
+++ b/crypto/src/cms/CMSSignedDataStreamGenerator.cs
@@ -838,14 +838,18 @@ namespace Org.BouncyCastle.Cms
 
 				if (outer._certs.Count > 0)
 				{
-					Asn1Set certs = CmsUtilities.CreateBerSetFromList(outer._certs);
+					Asn1Set certs = outer.UseDerForCerts
+                        ?   CmsUtilities.CreateDerSetFromList(outer._certs)
+                        :   CmsUtilities.CreateBerSetFromList(outer._certs);
 
 					WriteToGenerator(_sigGen, new BerTaggedObject(false, 0, certs));
 				}
 
 				if (outer._crls.Count > 0)
 				{
-					Asn1Set crls = CmsUtilities.CreateBerSetFromList(outer._crls);
+                    Asn1Set crls = outer.UseDerForCrls
+                        ?   CmsUtilities.CreateDerSetFromList(outer._crls)
+                        :   CmsUtilities.CreateBerSetFromList(outer._crls);
 
 					WriteToGenerator(_sigGen, new BerTaggedObject(false, 1, crls));
 				}