summary refs log tree commit diff
path: root/crypto/src/cms/KeyAgreeRecipientInformation.cs
diff options
context:
space:
mode:
Diffstat (limited to 'crypto/src/cms/KeyAgreeRecipientInformation.cs')
-rw-r--r--crypto/src/cms/KeyAgreeRecipientInformation.cs4
1 files changed, 2 insertions, 2 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);