summary refs log tree commit diff
path: root/crypto/src/cms
diff options
context:
space:
mode:
authorDavid Hook <dgh@cryptoworkshop.com>2021-10-07 11:20:11 +1100
committerDavid Hook <dgh@cryptoworkshop.com>2021-10-07 11:20:11 +1100
commit81977ab62fb74af1624930718b83acd8c5c78f72 (patch)
treea756d3dda3e967dffe1c97c6876f5fbaf4a51e88 /crypto/src/cms
parentcorrected DER encoding of SET (diff)
downloadBouncyCastle.NET-ed25519-81977ab62fb74af1624930718b83acd8c5c78f72.tar.xz
added explicit sorting of DER encoded SET
Diffstat (limited to 'crypto/src/cms')
-rw-r--r--crypto/src/cms/SignerInformation.cs14
1 files changed, 8 insertions, 6 deletions
diff --git a/crypto/src/cms/SignerInformation.cs b/crypto/src/cms/SignerInformation.cs
index 2bb808ae2..58bb312b3 100644
--- a/crypto/src/cms/SignerInformation.cs
+++ b/crypto/src/cms/SignerInformation.cs
@@ -23,11 +23,7 @@ namespace Org.BouncyCastle.Cms
 		private static readonly CmsSignedHelper Helper = CmsSignedHelper.Instance;
 
 		private SignerID			sid;
-		private SignerInfo			info;
-		private AlgorithmIdentifier	digestAlgorithm;
-		private AlgorithmIdentifier	encryptionAlgorithm;
-		private readonly Asn1Set	signedAttributeSet;
-		private readonly Asn1Set	unsignedAttributeSet;
+
 		private CmsProcessable		content;
 		private byte[]				signature;
 		private DerObjectIdentifier	contentType;
@@ -39,6 +35,12 @@ namespace Org.BouncyCastle.Cms
 		private Asn1.Cms.AttributeTable	unsignedAttributeTable;
 		private readonly bool isCounterSignature;
 
+		protected SignerInfo info;
+		protected AlgorithmIdentifier digestAlgorithm;
+		protected AlgorithmIdentifier encryptionAlgorithm;
+		protected readonly Asn1Set signedAttributeSet;
+		protected readonly Asn1Set unsignedAttributeSet;
+
 		internal SignerInformation(
 			SignerInfo			info,
 			DerObjectIdentifier	contentType,
@@ -309,7 +311,7 @@ namespace Org.BouncyCastle.Cms
 		* return the DER encoding of the signed attributes.
 		* @throws IOException if an encoding error occurs.
 		*/
-		public byte[] GetEncodedSignedAttributes()
+		public virtual byte[] GetEncodedSignedAttributes()
 		{
 			return signedAttributeSet == null
 				?	null