diff options
author | David Hook <dgh@bouncycastle.org> | 2019-01-15 08:05:41 +1100 |
---|---|---|
committer | David Hook <dgh@bouncycastle.org> | 2019-01-15 08:05:41 +1100 |
commit | 6ca2f2f9b941289f42d0ef0d2ef8f0cfa1e4ac86 (patch) | |
tree | 3c1d88a79669f1cf55de9a5731d63066f442de5c /crypto/src/cmp/ProtectedPkiMessageBuilder.cs | |
parent | Merge remote-tracking branch 'origin/master' (diff) | |
download | BouncyCastle.NET-ed25519-6ca2f2f9b941289f42d0ef0d2ef8f0cfa1e4ac86.tar.xz |
refactor of PKMacBuilder
Diffstat (limited to 'crypto/src/cmp/ProtectedPkiMessageBuilder.cs')
-rw-r--r-- | crypto/src/cmp/ProtectedPkiMessageBuilder.cs | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/crypto/src/cmp/ProtectedPkiMessageBuilder.cs b/crypto/src/cmp/ProtectedPkiMessageBuilder.cs index 22a004669..e660f844a 100644 --- a/crypto/src/cmp/ProtectedPkiMessageBuilder.cs +++ b/crypto/src/cmp/ProtectedPkiMessageBuilder.cs @@ -1,11 +1,13 @@ using System; using System.Collections; +using Org.BouncyCastle.Asn1.Crmf; using Org.BouncyCastle.Asn1; using Org.BouncyCastle.Asn1.Cmp; using Org.BouncyCastle.Asn1.X509; using Org.BouncyCastle.Crypto; using Org.BouncyCastle.Crypto.Operators; using Org.BouncyCastle.X509; +using Org.BouncyCastle.Crmf; namespace Org.BouncyCastle.Cmp { @@ -153,14 +155,13 @@ namespace Org.BouncyCastle.Cmp signer.Stream.Write(encoded, 0, encoded.Length); Object result = signer.GetResult(); - if (result is DefaultSignatureResult) { - return ((DefaultSignatureResult) result).Collect(); + return ((DefaultSignatureResult)result).Collect(); } - else if (result is DefaultMacAndDigestResult) + else if (result is IBlockResult) { - return ((DefaultMacAndDigestResult) result).MacResult; + return ((IBlockResult)result).Collect(); } else if (result is byte[]) { |