diff options
Diffstat (limited to 'crypto')
-rw-r--r-- | crypto/src/asn1/crmf/PopoPrivKey.cs | 6 | ||||
-rw-r--r-- | crypto/src/crmf/CertificateRequestMessageBuilder.cs | 4 |
2 files changed, 7 insertions, 3 deletions
diff --git a/crypto/src/asn1/crmf/PopoPrivKey.cs b/crypto/src/asn1/crmf/PopoPrivKey.cs index 95a4484de..e7cef784c 100644 --- a/crypto/src/asn1/crmf/PopoPrivKey.cs +++ b/crypto/src/asn1/crmf/PopoPrivKey.cs @@ -47,6 +47,12 @@ namespace Org.BouncyCastle.Asn1.Crmf return new PopoPrivKey(Asn1TaggedObject.GetInstance(tagged, true)); } + public PopoPrivKey(PKMacValue pkMacValue) + { + this.tagNo = agreeMAC; + this.obj = pkMacValue; + } + public PopoPrivKey(SubsequentMessage msg) { this.tagNo = subsequentMessage; diff --git a/crypto/src/crmf/CertificateRequestMessageBuilder.cs b/crypto/src/crmf/CertificateRequestMessageBuilder.cs index 363bfd136..d09084fb3 100644 --- a/crypto/src/crmf/CertificateRequestMessageBuilder.cs +++ b/crypto/src/crmf/CertificateRequestMessageBuilder.cs @@ -251,9 +251,7 @@ namespace Org.BouncyCastle.Crmf } else if (_agreeMac != null) { - v.Add(new ProofOfPossession(ProofOfPossession.TYPE_KEY_AGREEMENT, - PopoPrivKey.GetInstance(new DerTaggedObject(false, PopoPrivKey.agreeMAC, _agreeMac), true))); - + v.Add(new ProofOfPossession(ProofOfPossession.TYPE_KEY_AGREEMENT, new PopoPrivKey(_agreeMac))); } else if (_popRaVerified != null) { |