summary refs log tree commit diff
path: root/crypto/src/tsp
diff options
context:
space:
mode:
authorPeter Dettman <peter.dettman@bouncycastle.org>2017-09-05 13:45:53 +0700
committerPeter Dettman <peter.dettman@bouncycastle.org>2017-09-05 13:45:53 +0700
commiteb47e16892193eb281614458d96ba8ca1712f28f (patch)
treeab347c288f3c66c5ad1712c1d936a196be46af5e /crypto/src/tsp
parentTolerate unexpected ec_point_formats in ServerHello (diff)
downloadBouncyCastle.NET-ed25519-eb47e16892193eb281614458d96ba8ca1712f28f.tar.xz
Add OIW OIDs in various lookup tables
- replace some OID literals with named ones
- see https://github.com/bcgit/bc-csharp/issues/74
Diffstat (limited to 'crypto/src/tsp')
-rw-r--r--crypto/src/tsp/TSPUtil.cs54
1 files changed, 29 insertions, 25 deletions
diff --git a/crypto/src/tsp/TSPUtil.cs b/crypto/src/tsp/TSPUtil.cs
index 1026914f4..dc8ed3c21 100644
--- a/crypto/src/tsp/TSPUtil.cs
+++ b/crypto/src/tsp/TSPUtil.cs
@@ -28,32 +28,36 @@ namespace Org.BouncyCastle.Tsp
 
 		static TspUtil()
 		{
-			digestLengths.Add(PkcsObjectIdentifiers.MD5.Id, 16);
-			digestLengths.Add(OiwObjectIdentifiers.IdSha1.Id, 20);
-			digestLengths.Add(NistObjectIdentifiers.IdSha224.Id, 28);
-			digestLengths.Add(NistObjectIdentifiers.IdSha256.Id, 32);
-			digestLengths.Add(NistObjectIdentifiers.IdSha384.Id, 48);
-			digestLengths.Add(NistObjectIdentifiers.IdSha512.Id, 64);
-			digestLengths.Add(TeleTrusTObjectIdentifiers.RipeMD128.Id, 16);
-			digestLengths.Add(TeleTrusTObjectIdentifiers.RipeMD160.Id, 20);
-			digestLengths.Add(TeleTrusTObjectIdentifiers.RipeMD256.Id, 32);
-			digestLengths.Add(CryptoProObjectIdentifiers.GostR3411.Id, 32);
-
-			digestNames.Add(PkcsObjectIdentifiers.MD5.Id, "MD5");
-			digestNames.Add(OiwObjectIdentifiers.IdSha1.Id, "SHA1");
-			digestNames.Add(NistObjectIdentifiers.IdSha224.Id, "SHA224");
-			digestNames.Add(NistObjectIdentifiers.IdSha256.Id, "SHA256");
-			digestNames.Add(NistObjectIdentifiers.IdSha384.Id, "SHA384");
-			digestNames.Add(NistObjectIdentifiers.IdSha512.Id, "SHA512");
+            digestLengths.Add(PkcsObjectIdentifiers.MD5.Id, 16);
+            digestLengths.Add(OiwObjectIdentifiers.IdSha1.Id, 20);
+            digestLengths.Add(NistObjectIdentifiers.IdSha224.Id, 28);
+            digestLengths.Add(NistObjectIdentifiers.IdSha256.Id, 32);
+            digestLengths.Add(NistObjectIdentifiers.IdSha384.Id, 48);
+            digestLengths.Add(NistObjectIdentifiers.IdSha512.Id, 64);
+            digestLengths.Add(TeleTrusTObjectIdentifiers.RipeMD128.Id, 16);
+            digestLengths.Add(TeleTrusTObjectIdentifiers.RipeMD160.Id, 20);
+            digestLengths.Add(TeleTrusTObjectIdentifiers.RipeMD256.Id, 32);
+            digestLengths.Add(CryptoProObjectIdentifiers.GostR3411.Id, 32);
+
+            digestNames.Add(PkcsObjectIdentifiers.MD5.Id, "MD5");
+            digestNames.Add(OiwObjectIdentifiers.IdSha1.Id, "SHA1");
+            digestNames.Add(NistObjectIdentifiers.IdSha224.Id, "SHA224");
+            digestNames.Add(NistObjectIdentifiers.IdSha256.Id, "SHA256");
+            digestNames.Add(NistObjectIdentifiers.IdSha384.Id, "SHA384");
+            digestNames.Add(NistObjectIdentifiers.IdSha512.Id, "SHA512");
+            digestNames.Add(PkcsObjectIdentifiers.MD5WithRsaEncryption, "MD5");
 			digestNames.Add(PkcsObjectIdentifiers.Sha1WithRsaEncryption.Id, "SHA1");
-			digestNames.Add(PkcsObjectIdentifiers.Sha224WithRsaEncryption.Id, "SHA224");
-			digestNames.Add(PkcsObjectIdentifiers.Sha256WithRsaEncryption.Id, "SHA256");
-			digestNames.Add(PkcsObjectIdentifiers.Sha384WithRsaEncryption.Id, "SHA384");
-			digestNames.Add(PkcsObjectIdentifiers.Sha512WithRsaEncryption.Id, "SHA512");
-			digestNames.Add(TeleTrusTObjectIdentifiers.RipeMD128.Id, "RIPEMD128");
-			digestNames.Add(TeleTrusTObjectIdentifiers.RipeMD160.Id, "RIPEMD160");
-			digestNames.Add(TeleTrusTObjectIdentifiers.RipeMD256.Id, "RIPEMD256");
-			digestNames.Add(CryptoProObjectIdentifiers.GostR3411.Id, "GOST3411");
+            digestNames.Add(PkcsObjectIdentifiers.Sha224WithRsaEncryption.Id, "SHA224");
+            digestNames.Add(PkcsObjectIdentifiers.Sha256WithRsaEncryption.Id, "SHA256");
+            digestNames.Add(PkcsObjectIdentifiers.Sha384WithRsaEncryption.Id, "SHA384");
+            digestNames.Add(PkcsObjectIdentifiers.Sha512WithRsaEncryption.Id, "SHA512");
+            digestNames.Add(TeleTrusTObjectIdentifiers.RipeMD128.Id, "RIPEMD128");
+            digestNames.Add(TeleTrusTObjectIdentifiers.RipeMD160.Id, "RIPEMD160");
+            digestNames.Add(TeleTrusTObjectIdentifiers.RipeMD256.Id, "RIPEMD256");
+            digestNames.Add(CryptoProObjectIdentifiers.GostR3411.Id, "GOST3411");
+            digestNames.Add(OiwObjectIdentifiers.DsaWithSha1.Id, "SHA1");
+            digestNames.Add(OiwObjectIdentifiers.Sha1WithRsa.Id, "SHA1");
+            digestNames.Add(OiwObjectIdentifiers.MD5WithRsa, "MD5");
 		}