summary refs log tree commit diff
path: root/crypto/src/cms/CMSSignedDataStreamGenerator.cs
diff options
context:
space:
mode:
authorPeter Dettman <peter.dettman@bouncycastle.org>2018-08-06 17:58:23 +0700
committerPeter Dettman <peter.dettman@bouncycastle.org>2018-08-06 17:58:23 +0700
commitc5c97a3d43047a45c137ac061ac9dcdc95256131 (patch)
tree4b6ef5d7545a404ed0ef16294608c7396d75db79 /crypto/src/cms/CMSSignedDataStreamGenerator.cs
parentAdd IgnoreX509NameOrdering property (diff)
downloadBouncyCastle.NET-ed25519-c5c97a3d43047a45c137ac061ac9dcdc95256131.tar.xz
Add UseDerForCerts, UseDerForCrls properties
- see https://github.com/bcgit/bc-csharp/pull/101
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));
 				}