diff --git a/crypto/test/src/cms/test/AllTests.cs b/crypto/test/src/cms/test/AllTests.cs
index b47374914..e11b79ebe 100644
--- a/crypto/test/src/cms/test/AllTests.cs
+++ b/crypto/test/src/cms/test/AllTests.cs
@@ -10,7 +10,7 @@ namespace Org.BouncyCastle.Cms.Tests
{
public class AllTests
{
- public static void Main(string[] args)
+ public static void MainOld(string[] args)
{
Suite.Run(new NullListener(), NUnit.Core.TestFilter.Empty);
}
diff --git a/crypto/test/src/cms/test/AuthenticatedDataTest.cs b/crypto/test/src/cms/test/AuthenticatedDataTest.cs
index 0ad34a95b..f53af600f 100644
--- a/crypto/test/src/cms/test/AuthenticatedDataTest.cs
+++ b/crypto/test/src/cms/test/AuthenticatedDataTest.cs
@@ -124,7 +124,7 @@ namespace Org.BouncyCastle.Cms.Tests
// super(name);
// }
//
-// public static void main(string args[])
+// public static void MainOld(string args[])
// {
// junit.textui.TestRunner.run(AuthenticatedDataTest.class);
// }
diff --git a/crypto/test/src/cms/test/CMSTestUtil.cs b/crypto/test/src/cms/test/CMSTestUtil.cs
index 69f7c2983..ca94959d7 100644
--- a/crypto/test/src/cms/test/CMSTestUtil.cs
+++ b/crypto/test/src/cms/test/CMSTestUtil.cs
@@ -207,11 +207,11 @@ namespace Org.BouncyCastle.Cms.Tests
{
if (i + 64 < data.Length)
{
- buf.Append(Encoding.Default.GetString(data, i, 64));
+ buf.Append(Encoding.ASCII.GetString(data, i, 64));
}
else
{
- buf.Append(Encoding.Default.GetString(data, i, data.Length - i));
+ buf.Append(Encoding.ASCII.GetString(data, i, data.Length - i));
}
buf.Append('\n');
}
diff --git a/crypto/test/src/cms/test/EnvelopedDataStreamTest.cs b/crypto/test/src/cms/test/EnvelopedDataStreamTest.cs
index 8512f6622..39776e852 100644
--- a/crypto/test/src/cms/test/EnvelopedDataStreamTest.cs
+++ b/crypto/test/src/cms/test/EnvelopedDataStreamTest.cs
@@ -361,7 +361,7 @@ namespace Org.BouncyCastle.Cms.Tests
[Test]
public void TestKeyTransAes128()
{
- byte[] data = Encoding.Default.GetBytes("WallaWallaWashington");
+ byte[] data = Encoding.ASCII.GetBytes("WallaWallaWashington");
CmsEnvelopedDataStreamGenerator edGen = new CmsEnvelopedDataStreamGenerator();
@@ -399,7 +399,7 @@ namespace Org.BouncyCastle.Cms.Tests
[Test]
public void TestAesKek()
{
- byte[] data = Encoding.Default.GetBytes("WallaWallaWashington");
+ byte[] data = Encoding.ASCII.GetBytes("WallaWallaWashington");
KeyParameter kek = CmsTestUtil.MakeAes192Key();
CmsEnvelopedDataStreamGenerator edGen = new CmsEnvelopedDataStreamGenerator();
@@ -440,7 +440,7 @@ namespace Org.BouncyCastle.Cms.Tests
[Test]
public void TestTwoAesKek()
{
- byte[] data = Encoding.Default.GetBytes("WallaWallaWashington");
+ byte[] data = Encoding.ASCII.GetBytes("WallaWallaWashington");
KeyParameter kek1 = CmsTestUtil.MakeAes192Key();
KeyParameter kek2 = CmsTestUtil.MakeAes192Key();
diff --git a/crypto/test/src/cms/test/EnvelopedDataTest.cs b/crypto/test/src/cms/test/EnvelopedDataTest.cs
index be588ef42..375c9a54b 100644
--- a/crypto/test/src/cms/test/EnvelopedDataTest.cs
+++ b/crypto/test/src/cms/test/EnvelopedDataTest.cs
@@ -1,5 +1,6 @@
using System;
using System.Collections;
+using System.Reflection;
using System.Text;
using NUnit.Framework;
@@ -401,7 +402,7 @@ namespace Org.BouncyCastle.Cms.Tests
if (asn1Params != null)
{
- Assert.IsTrue(asn1Params.IsInstanceOfType(ed.EncryptionAlgorithmID.Parameters));
+ Assert.IsTrue(asn1Params.GetTypeInfo().IsInstanceOfType(ed.EncryptionAlgorithmID.Parameters));
}
ArrayList c = new ArrayList(recipients.GetRecipients());
|