summary refs log tree commit diff
path: root/crypto/src
diff options
context:
space:
mode:
Diffstat (limited to 'crypto/src')
-rw-r--r--crypto/src/cms/KeyAgreeRecipientInformation.cs4
-rw-r--r--crypto/src/cms/KeyTransRecipientInformation.cs2
-rw-r--r--crypto/src/cms/SignerInformation.cs2
-rw-r--r--crypto/src/x509/store/X509CertStoreSelector.cs8
4 files changed, 11 insertions, 5 deletions
diff --git a/crypto/src/cms/KeyAgreeRecipientInformation.cs b/crypto/src/cms/KeyAgreeRecipientInformation.cs
index 893b88b73..f368cb211 100644
--- a/crypto/src/cms/KeyAgreeRecipientInformation.cs
+++ b/crypto/src/cms/KeyAgreeRecipientInformation.cs
@@ -52,7 +52,7 @@ namespace Org.BouncyCastle.Cms
 
                         // Note: 'date' and 'other' fields of RecipientKeyIdentifier appear to be only informational 
 
-                        rid.SubjectKeyIdentifier = rKeyID.SubjectKeyIdentifier.GetOctets();
+                        rid.SubjectKeyIdentifier = rKeyID.SubjectKeyIdentifier.GetEncoded(Asn1Encodable.Der);
                     }
 
                     infos.Add(new KeyAgreeRecipientInformation(info, rid, id.EncryptedKey,
@@ -93,7 +93,7 @@ namespace Org.BouncyCastle.Cms
             {
                 SubjectKeyIdentifier ski = originator.SubjectKeyIdentifier;
 
-                origID.SubjectKeyIdentifier = ski.GetKeyIdentifier();
+                origID.SubjectKeyIdentifier = ski.GetEncoded(Asn1Encodable.Der);
             }
 
             return GetPublicKeyFromOriginatorID(origID);
diff --git a/crypto/src/cms/KeyTransRecipientInformation.cs b/crypto/src/cms/KeyTransRecipientInformation.cs
index 2a40fed06..e09e6015f 100644
--- a/crypto/src/cms/KeyTransRecipientInformation.cs
+++ b/crypto/src/cms/KeyTransRecipientInformation.cs
@@ -40,7 +40,7 @@ namespace Org.BouncyCastle.Cms
                 {
                     Asn1OctetString octs = Asn1OctetString.GetInstance(r.ID);
 
-					rid.SubjectKeyIdentifier = octs.GetOctets();
+					rid.SubjectKeyIdentifier = octs.GetEncoded(Asn1Encodable.Der);
                 }
                 else
                 {
diff --git a/crypto/src/cms/SignerInformation.cs b/crypto/src/cms/SignerInformation.cs
index df6624f99..28f1ecfa9 100644
--- a/crypto/src/cms/SignerInformation.cs
+++ b/crypto/src/cms/SignerInformation.cs
@@ -58,7 +58,7 @@ namespace Org.BouncyCastle.Cms
 				{
 					Asn1OctetString octs = Asn1OctetString.GetInstance(s.ID);
 
-					sid.SubjectKeyIdentifier = octs.GetEncoded();
+					sid.SubjectKeyIdentifier = octs.GetEncoded(Asn1Encodable.Der);
 				}
 				else
 				{
diff --git a/crypto/src/x509/store/X509CertStoreSelector.cs b/crypto/src/x509/store/X509CertStoreSelector.cs
index a153868d4..684edeb38 100644
--- a/crypto/src/x509/store/X509CertStoreSelector.cs
+++ b/crypto/src/x509/store/X509CertStoreSelector.cs
@@ -60,6 +60,9 @@ namespace Org.BouncyCastle.X509.Store
 			return new X509CertStoreSelector(this);
 		}
 
+        /// <remarks>
+		/// A DER encoding of an ASN.1 AuthorityKeyIdentifier value.
+        /// </remarks>
 		public byte[] AuthorityKeyIdentifier
 		{
 			get { return Arrays.Clone(authorityKeyIdentifier); }
@@ -141,7 +144,10 @@ namespace Org.BouncyCastle.X509.Store
 			set { subject = value; }
 		}
 
-		public byte[] SubjectKeyIdentifier
+        /// <remarks>
+		/// A DER encoding of an ASN.1 SubjectKeyIdentifier (OCTET STRING) value.
+        /// </remarks>
+        public byte[] SubjectKeyIdentifier
 		{
 			get { return Arrays.Clone(subjectKeyIdentifier); }
 			set { subjectKeyIdentifier = Arrays.Clone(value); }