summary refs log tree commit diff
diff options
context:
space:
mode:
authorU-GEMALTO\10056220 <10056220@FHMLAP-62YYK12.gemalto.com>2019-03-27 12:45:08 +0000
committerPeter Dettman <peter.dettman@bouncycastle.org>2021-02-02 15:01:29 +0700
commit9da8104c2904f3db2ec8d4d4bd38ff8f27ce8d9c (patch)
tree4925134a6786b48b29d0da209bfeb43d50bc1741
parentdirect signature for PSS (diff)
downloadBouncyCastle.NET-ed25519-9da8104c2904f3db2ec8d4d4bd38ff8f27ce8d9c.tar.xz
Add support for dashed digest algorithm names
This commit adds support for digest algorithm names containing a dash in it
e.g. SHA-256withRSA
-rw-r--r--crypto/src/cms/CMSSignedGenerator.cs4
1 files changed, 4 insertions, 0 deletions
diff --git a/crypto/src/cms/CMSSignedGenerator.cs b/crypto/src/cms/CMSSignedGenerator.cs
index b618ae3d4..0c3c11dbc 100644
--- a/crypto/src/cms/CMSSignedGenerator.cs
+++ b/crypto/src/cms/CMSSignedGenerator.cs
@@ -56,12 +56,16 @@ namespace Org.BouncyCastle.Cms
             algorithms["SHA-1WITHRSA"] = PkcsObjectIdentifiers.Sha1WithRsaEncryption;
             algorithms["SHA224WITHRSAENCRYPTION"] = PkcsObjectIdentifiers.Sha224WithRsaEncryption;
             algorithms["SHA224WITHRSA"] = PkcsObjectIdentifiers.Sha224WithRsaEncryption;
+            algorithms["SHA-224WITHRSA"] = PkcsObjectIdentifiers.Sha224WithRsaEncryption;
             algorithms["SHA256WITHRSAENCRYPTION"] = PkcsObjectIdentifiers.Sha256WithRsaEncryption;
             algorithms["SHA256WITHRSA"] = PkcsObjectIdentifiers.Sha256WithRsaEncryption;
+            algorithms["SHA-256WITHRSA"] = PkcsObjectIdentifiers.Sha256WithRsaEncryption;
             algorithms["SHA384WITHRSAENCRYPTION"] = PkcsObjectIdentifiers.Sha384WithRsaEncryption;
             algorithms["SHA384WITHRSA"] = PkcsObjectIdentifiers.Sha384WithRsaEncryption;
+            algorithms["SHA-384WITHRSA"] = PkcsObjectIdentifiers.Sha384WithRsaEncryption;
             algorithms["SHA512WITHRSAENCRYPTION"] = PkcsObjectIdentifiers.Sha512WithRsaEncryption;
             algorithms["SHA512WITHRSA"] = PkcsObjectIdentifiers.Sha512WithRsaEncryption;
+            algorithms["SHA-512WITHRSA"] = PkcsObjectIdentifiers.Sha512WithRsaEncryption;
             algorithms["SHA1WITHRSAANDMGF1"] = PkcsObjectIdentifiers.IdRsassaPss;
             algorithms["SHA224WITHRSAANDMGF1"] = PkcsObjectIdentifiers.IdRsassaPss;
             algorithms["SHA256WITHRSAANDMGF1"] = PkcsObjectIdentifiers.IdRsassaPss;