diff options
author | Peter Dettman <peter.dettman@bouncycastle.org> | 2015-11-10 19:42:21 +0700 |
---|---|---|
committer | Peter Dettman <peter.dettman@bouncycastle.org> | 2015-11-10 19:42:21 +0700 |
commit | 218a170ece285fd49f82326c752a3d0fb31881dd (patch) | |
tree | 2a680d86ba2786e758f0fc9c845691f55ffe0553 /crypto/test/src/asn1 | |
parent | Fix IV check for 64-bit blockSize (diff) | |
download | BouncyCastle.NET-ed25519-218a170ece285fd49f82326c752a3d0fb31881dd.tar.xz |
Address various compiler warnings
Diffstat (limited to 'crypto/test/src/asn1')
-rw-r--r-- | crypto/test/src/asn1/test/BitStringTest.cs | 18 | ||||
-rw-r--r-- | crypto/test/src/asn1/test/LDSSecurityObjectUnitTest.cs | 3 |
2 files changed, 5 insertions, 16 deletions
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())); |