diff --git a/crypto/test/src/asn1/test/BitStringTest.cs b/crypto/test/src/asn1/test/BitStringTest.cs
index fccaf8fa0..05be45941 100644
--- a/crypto/test/src/asn1/test/BitStringTest.cs
+++ b/crypto/test/src/asn1/test/BitStringTest.cs
@@ -31,12 +31,8 @@ namespace Org.BouncyCastle.Asn1.Tests
new DerBitString(null, 1);
Fail("exception not thrown");
}
- catch (ArgumentNullException e)
+ catch (ArgumentNullException)
{
- //if (!"data cannot be null".Equals(e.Message))
- //{
- // Fail("Unexpected exception");
- //}
}
try
@@ -44,12 +40,8 @@ namespace Org.BouncyCastle.Asn1.Tests
new DerBitString(new byte[0], 1);
Fail("exception not thrown");
}
- catch (ArgumentException e)
+ catch (ArgumentException)
{
- //if (!"zero length data with non-zero pad bits".Equals(e.Message))
- //{
- // Fail("Unexpected exception");
- //}
}
try
@@ -57,12 +49,8 @@ namespace Org.BouncyCastle.Asn1.Tests
new DerBitString(new byte[1], 8);
Fail("exception not thrown");
}
- catch (ArgumentException e)
+ catch (ArgumentException)
{
- //if (!"pad bits cannot be greater than 7 or less than 0".Equals(e.Message))
- //{
- // Fail("Unexpected exception");
- //}
}
DerBitString s2 = new DerBitString(0);
diff --git a/crypto/test/src/asn1/test/LDSSecurityObjectUnitTest.cs b/crypto/test/src/asn1/test/LDSSecurityObjectUnitTest.cs
index 042781632..914eda0b8 100644
--- a/crypto/test/src/asn1/test/LDSSecurityObjectUnitTest.cs
+++ b/crypto/test/src/asn1/test/LDSSecurityObjectUnitTest.cs
@@ -4,6 +4,7 @@ using NUnit.Framework;
using Org.BouncyCastle.Asn1;
using Org.BouncyCastle.Asn1.Icao;
+using Org.BouncyCastle.Asn1.Oiw;
using Org.BouncyCastle.Asn1.X509;
using Org.BouncyCastle.Math;
using Org.BouncyCastle.Utilities.Test;
@@ -29,7 +30,7 @@ namespace Org.BouncyCastle.Asn1.Tests
public override void PerformTest()
{
- AlgorithmIdentifier algoId = new AlgorithmIdentifier("1.3.14.3.2.26");
+ AlgorithmIdentifier algoId = new AlgorithmIdentifier(OiwObjectIdentifiers.IdSha1);
DataGroupHash[] datas = new DataGroupHash[2];
datas[0] = new DataGroupHash(1, new DerOctetString(GenerateHash()));
diff --git a/crypto/test/src/crypto/test/Pkcs5Test.cs b/crypto/test/src/crypto/test/Pkcs5Test.cs
index 8066e8e41..fdf1e7a66 100644
--- a/crypto/test/src/crypto/test/Pkcs5Test.cs
+++ b/crypto/test/src/crypto/test/Pkcs5Test.cs
@@ -115,7 +115,7 @@ namespace Org.BouncyCastle.Crypto.Tests
generator.Init(PbeParametersGenerator.Pkcs5PasswordToBytes(password), salt, iterationCount);
- DerObjectIdentifier algOid = scheme.ObjectID;
+ DerObjectIdentifier algOid = scheme.Algorithm;
byte[] iv;
if (algOid.Equals(PkcsObjectIdentifiers.RC2Cbc))
diff --git a/crypto/test/src/pkcs/test/PKCS12StoreTest.cs b/crypto/test/src/pkcs/test/PKCS12StoreTest.cs
index c6b39135e..cd9dfcfad 100644
--- a/crypto/test/src/pkcs/test/PKCS12StoreTest.cs
+++ b/crypto/test/src/pkcs/test/PKCS12StoreTest.cs
@@ -837,7 +837,7 @@ namespace Org.BouncyCastle.Pkcs.Tests
EncryptedPrivateKeyInfo encInfo = EncryptedPrivateKeyInfo.GetInstance(sb.BagValue);
// check the key encryption
- if (!encInfo.EncryptionAlgorithm.ObjectID.Equals(keyAlgorithm))
+ if (!encInfo.EncryptionAlgorithm.Algorithm.Equals(keyAlgorithm))
{
Fail("key encryption algorithm wrong");
}
@@ -845,7 +845,7 @@ namespace Org.BouncyCastle.Pkcs.Tests
// check the certificate encryption
EncryptedData cb = EncryptedData.GetInstance(c2.Content);
- if (!cb.EncryptionAlgorithm.ObjectID.Equals(certAlgorithm))
+ if (!cb.EncryptionAlgorithm.Algorithm.Equals(certAlgorithm))
{
Fail("cert encryption algorithm wrong");
}
diff --git a/crypto/test/src/test/CertTest.cs b/crypto/test/src/test/CertTest.cs
index 9bb4df7d1..72e17e458 100644
--- a/crypto/test/src/test/CertTest.cs
+++ b/crypto/test/src/test/CertTest.cs
@@ -2452,7 +2452,7 @@ namespace Org.BouncyCastle.Tests
DerSequence seq = new DerSequence(
tbsCertificate,
- new AlgorithmIdentifier(sig.ObjectID),
+ new AlgorithmIdentifier(sig.Algorithm),
certStruct.Signature);
try
diff --git a/crypto/test/src/test/PKCS10CertRequestTest.cs b/crypto/test/src/test/PKCS10CertRequestTest.cs
index ba62db32f..9bad0a678 100644
--- a/crypto/test/src/test/PKCS10CertRequestTest.cs
+++ b/crypto/test/src/test/PKCS10CertRequestTest.cs
@@ -193,7 +193,7 @@ namespace Org.BouncyCastle.Tests
Fail("Failed Verify check EC uncompressed encoded.");
}
- if (!req.SignatureAlgorithm.ObjectID.Equals(algOid))
+ if (!req.SignatureAlgorithm.Algorithm.Equals(algOid))
{
Fail("ECDSA oid incorrect.");
}
@@ -247,7 +247,7 @@ namespace Org.BouncyCastle.Tests
Fail("Failed Verify check EC encoded.");
}
- if (!req.SignatureAlgorithm.ObjectID.Equals(CryptoProObjectIdentifiers.GostR3411x94WithGostR3410x2001))
+ if (!req.SignatureAlgorithm.Algorithm.Equals(CryptoProObjectIdentifiers.GostR3411x94WithGostR3410x2001))
{
Fail("ECGOST oid incorrect.");
}
@@ -308,7 +308,7 @@ namespace Org.BouncyCastle.Tests
Fail("Failed verify check PSS encoded.");
}
- if (!req.SignatureAlgorithm.ObjectID.Equals(PkcsObjectIdentifiers.IdRsassaPss))
+ if (!req.SignatureAlgorithm.Algorithm.Equals(PkcsObjectIdentifiers.IdRsassaPss))
{
Fail("PSS oid incorrect.");
}
|