summary refs log tree commit diff
path: root/crypto/src/cms
diff options
context:
space:
mode:
Diffstat (limited to 'crypto/src/cms')
-rw-r--r--crypto/src/cms/CMSSignedDataGenerator.cs4
1 files changed, 2 insertions, 2 deletions
diff --git a/crypto/src/cms/CMSSignedDataGenerator.cs b/crypto/src/cms/CMSSignedDataGenerator.cs
index f2676a440..beabab911 100644
--- a/crypto/src/cms/CMSSignedDataGenerator.cs
+++ b/crypto/src/cms/CMSSignedDataGenerator.cs
@@ -165,8 +165,8 @@ namespace Org.BouncyCastle.Cms
 
 					signedAttr = outer.GetAttributeSet(signed);
 
-					// sig must be composed from the DER encoding.
-					new DerOutputStream(sigStr).WriteObject(signedAttr);
+                    // sig must be composed from the DER encoding.
+                    Asn1OutputStream.Create(sigStr, Asn1Encodable.Der).WriteObject(signedAttr);
 				}
                 else if (content != null)
                 {