diff options
author | Oren Novotny <oren@novotny.org> | 2016-12-04 19:25:04 -0500 |
---|---|---|
committer | Oren Novotny <oren@novotny.org> | 2016-12-04 19:25:04 -0500 |
commit | dd1b0b2f53c3d83c4be768997943a19f57cc5ece (patch) | |
tree | 9770618344d23fab1d3591cea0dacb065f660fda /crypto | |
parent | Convert projects over to cross-compiled net4, netstandard 1.0, netstandard 1.... (diff) | |
download | BouncyCastle.NET-ed25519-dd1b0b2f53c3d83c4be768997943a19f57cc5ece.tar.xz |
Fix issues compiling tests for .NET Core App (rename Main methods to MainOld) pcl-v1.8.1.2
Diffstat (limited to 'crypto')
293 files changed, 517 insertions, 364 deletions
diff --git a/crypto/test/src/asn1/test/AdditionalInformationSyntaxUnitTest.cs b/crypto/test/src/asn1/test/AdditionalInformationSyntaxUnitTest.cs index ac4ff9809..f60961c8b 100644 --- a/crypto/test/src/asn1/test/AdditionalInformationSyntaxUnitTest.cs +++ b/crypto/test/src/asn1/test/AdditionalInformationSyntaxUnitTest.cs @@ -59,12 +59,13 @@ namespace Org.BouncyCastle.Asn1.Tests { checkMandatoryField("information", information, syntax.Information); } - - public static void Main( +#if !LIB + public static void MainOld( string[] args) { RunTest(new AdditionalInformationSyntaxUnitTest()); } +#endif [Test] public void TestFunction() diff --git a/crypto/test/src/asn1/test/AdmissionSyntaxUnitTest.cs b/crypto/test/src/asn1/test/AdmissionSyntaxUnitTest.cs index 59464d212..e589b907b 100644 --- a/crypto/test/src/asn1/test/AdmissionSyntaxUnitTest.cs +++ b/crypto/test/src/asn1/test/AdmissionSyntaxUnitTest.cs @@ -82,11 +82,13 @@ namespace Org.BouncyCastle.Asn1.Tests } } - public static void Main( +#if !LIB + public static void MainOld( string[] args) { RunTest(new AdmissionSyntaxUnitTest()); } +#endif [Test] public void TestFunction() diff --git a/crypto/test/src/asn1/test/AdmissionsUnitTest.cs b/crypto/test/src/asn1/test/AdmissionsUnitTest.cs index edefeb830..b5ef094dd 100644 --- a/crypto/test/src/asn1/test/AdmissionsUnitTest.cs +++ b/crypto/test/src/asn1/test/AdmissionsUnitTest.cs @@ -72,12 +72,13 @@ namespace Org.BouncyCastle.Asn1.Tests checkMandatoryField("admissionAuthority", name, admissions.AdmissionAuthority); checkMandatoryField("namingAuthority", auth, admissions.NamingAuthority); } - - public static void Main( +#if !LIB + public static void MainOld( string[] args) { RunTest(new AdmissionsUnitTest()); } +#endif [Test] public void TestFunction() diff --git a/crypto/test/src/asn1/test/AllTests.cs b/crypto/test/src/asn1/test/AllTests.cs index 981b5a4df..7076b8d5f 100644 --- a/crypto/test/src/asn1/test/AllTests.cs +++ b/crypto/test/src/asn1/test/AllTests.cs @@ -8,7 +8,7 @@ namespace Org.BouncyCastle.Asn1.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/asn1/test/AttributeTableUnitTest.cs b/crypto/test/src/asn1/test/AttributeTableUnitTest.cs index 5dcf349cc..2321ba8bc 100644 --- a/crypto/test/src/asn1/test/AttributeTableUnitTest.cs +++ b/crypto/test/src/asn1/test/AttributeTableUnitTest.cs @@ -134,11 +134,13 @@ namespace Org.BouncyCastle.Asn1.Tests } } - public static void Main( +#if !LIB + public static void MainOld( string[] args) { RunTest(new AttributeTableUnitTest()); } +#endif [Test] public void TestFunction() diff --git a/crypto/test/src/asn1/test/BiometricDataUnitTest.cs b/crypto/test/src/asn1/test/BiometricDataUnitTest.cs index a542f71af..964689c52 100644 --- a/crypto/test/src/asn1/test/BiometricDataUnitTest.cs +++ b/crypto/test/src/asn1/test/BiometricDataUnitTest.cs @@ -116,11 +116,13 @@ namespace Org.BouncyCastle.Asn1.Tests } } - public static void Main( + #if !LIB + public static void MainOld( string[] args) { RunTest(new BiometricDataUnitTest()); } +#endif [Test] public void TestFunction() diff --git a/crypto/test/src/asn1/test/BitStringTest.cs b/crypto/test/src/asn1/test/BitStringTest.cs index 35b7811bc..5225bb3be 100644 --- a/crypto/test/src/asn1/test/BitStringTest.cs +++ b/crypto/test/src/asn1/test/BitStringTest.cs @@ -159,11 +159,13 @@ namespace Org.BouncyCastle.Asn1.Tests get { return "BitString"; } } - public static void Main( +#if !LIB + public static void MainOld( string[] args) { RunTest(new BitStringTest()); } +#endif [Test] public void TestFunction() diff --git a/crypto/test/src/asn1/test/CMSTest.cs b/crypto/test/src/asn1/test/CMSTest.cs index 1afb363af..f5977da71 100644 --- a/crypto/test/src/asn1/test/CMSTest.cs +++ b/crypto/test/src/asn1/test/CMSTest.cs @@ -286,7 +286,8 @@ namespace Org.BouncyCastle.Asn1.Tests get { return "CMS"; } } - public static void Main( +#if !LIB + public static void MainOld( string[] args) { ITest test = new CmsTest(); @@ -294,6 +295,7 @@ namespace Org.BouncyCastle.Asn1.Tests Console.WriteLine(result); } +#endif [Test] public void TestFunction() diff --git a/crypto/test/src/asn1/test/CertHashUnitTest.cs b/crypto/test/src/asn1/test/CertHashUnitTest.cs index 1e271a9c0..9ac5805d3 100644 --- a/crypto/test/src/asn1/test/CertHashUnitTest.cs +++ b/crypto/test/src/asn1/test/CertHashUnitTest.cs @@ -76,11 +76,13 @@ namespace Org.BouncyCastle.Asn1.Tests checkMandatoryField("certificateHash", digest, certHash.CertificateHash); } - public static void Main( +#if !LIB + public static void MainOld( string[] args) { RunTest(new CertHashUnitTest()); } +#endif [Test] public void TestFunction() diff --git a/crypto/test/src/asn1/test/CertificateTest.cs b/crypto/test/src/asn1/test/CertificateTest.cs index 7fcb1fffa..e4effc4a6 100644 --- a/crypto/test/src/asn1/test/CertificateTest.cs +++ b/crypto/test/src/asn1/test/CertificateTest.cs @@ -378,11 +378,13 @@ namespace Org.BouncyCastle.Asn1.Tests CheckAttributeCertificate(8, cert8); } - public static void Main( +#if !LIB + public static void MainOld( string[] args) { RunTest(new CertificateTest()); } +#endif [Test] public void TestFunction() diff --git a/crypto/test/src/asn1/test/CommitmentTypeIndicationUnitTest.cs b/crypto/test/src/asn1/test/CommitmentTypeIndicationUnitTest.cs index 20c2d18e3..2ecb3f440 100644 --- a/crypto/test/src/asn1/test/CommitmentTypeIndicationUnitTest.cs +++ b/crypto/test/src/asn1/test/CommitmentTypeIndicationUnitTest.cs @@ -90,11 +90,13 @@ namespace Org.BouncyCastle.Asn1.Tests } } - public static void Main( +#if !LIB + public static void MainOld( string[] args) { RunTest(new CommitmentTypeIndicationUnitTest()); } +#endif [Test] public void TestFunction() diff --git a/crypto/test/src/asn1/test/CommitmentTypeQualifierUnitTest.cs b/crypto/test/src/asn1/test/CommitmentTypeQualifierUnitTest.cs index 192ac52f6..65997c971 100644 --- a/crypto/test/src/asn1/test/CommitmentTypeQualifierUnitTest.cs +++ b/crypto/test/src/asn1/test/CommitmentTypeQualifierUnitTest.cs @@ -90,11 +90,13 @@ namespace Org.BouncyCastle.Asn1.Tests } } - public static void Main( +#if !LIB + public static void MainOld( string[] args) { RunTest(new CommitmentTypeQualifierUnitTest()); } +#endif [Test] public void TestFunction() diff --git a/crypto/test/src/asn1/test/ContentHintsUnitTest.cs b/crypto/test/src/asn1/test/ContentHintsUnitTest.cs index d7453c27e..8e953c203 100644 --- a/crypto/test/src/asn1/test/ContentHintsUnitTest.cs +++ b/crypto/test/src/asn1/test/ContentHintsUnitTest.cs @@ -76,11 +76,13 @@ namespace Org.BouncyCastle.Asn1.Tests checkOptionalField("description", description, hints.ContentDescription); } - public static void Main( +#if !LIB + public static void MainOld( string[] args) { RunTest(new ContentHintsUnitTest()); } +#endif [Test] public void TestFunction() diff --git a/crypto/test/src/asn1/test/CscaMasterListTest.cs b/crypto/test/src/asn1/test/CscaMasterListTest.cs index 814e98b2a..b3169ca87 100644 --- a/crypto/test/src/asn1/test/CscaMasterListTest.cs +++ b/crypto/test/src/asn1/test/CscaMasterListTest.cs @@ -40,11 +40,13 @@ namespace Org.BouncyCastle.Asn1.Tests return Streams.ReadAll(SimpleTest.GetTestDataAsStream("asn1." + name)); } - public static void Main( +#if !LIB + public static void MainOld( string[] args) { RunTest(new CscaMasterListTest()); } +#endif [Test] public void TestFunction() diff --git a/crypto/test/src/asn1/test/DERApplicationSpecificTest.cs b/crypto/test/src/asn1/test/DERApplicationSpecificTest.cs index e505acd9d..2d3849a2a 100644 --- a/crypto/test/src/asn1/test/DERApplicationSpecificTest.cs +++ b/crypto/test/src/asn1/test/DERApplicationSpecificTest.cs @@ -128,11 +128,13 @@ namespace Org.BouncyCastle.Asn1.Tests } } - public static void Main( +#if !LIB + public static void MainOld( string[] args) { RunTest(new DerApplicationSpecificTest()); } +#endif [Test] public void TestFunction() diff --git a/crypto/test/src/asn1/test/DERUTF8StringTest.cs b/crypto/test/src/asn1/test/DERUTF8StringTest.cs index be4dace79..b84f5b621 100644 --- a/crypto/test/src/asn1/test/DERUTF8StringTest.cs +++ b/crypto/test/src/asn1/test/DERUTF8StringTest.cs @@ -93,7 +93,8 @@ namespace Org.BouncyCastle.Asn1.Tests } } - public static void Main( +#if !LIB + public static void MainOld( string[] args) { DerUtf8StringTest test = new DerUtf8StringTest(); @@ -101,6 +102,7 @@ namespace Org.BouncyCastle.Asn1.Tests Console.WriteLine(result); } +#endif [Test] public void TestFunction() diff --git a/crypto/test/src/asn1/test/DataGroupHashUnitTest.cs b/crypto/test/src/asn1/test/DataGroupHashUnitTest.cs index dcebf4670..9832dc0dd 100644 --- a/crypto/test/src/asn1/test/DataGroupHashUnitTest.cs +++ b/crypto/test/src/asn1/test/DataGroupHashUnitTest.cs @@ -89,11 +89,13 @@ namespace Org.BouncyCastle.Asn1.Tests } } - public static void Main( +#if !LIB + public static void MainOld( string[] args) { RunTest(new DataGroupHashUnitTest()); } +#endif [Test] public void TestFunction() diff --git a/crypto/test/src/asn1/test/DeclarationOfMajorityUnitTest.cs b/crypto/test/src/asn1/test/DeclarationOfMajorityUnitTest.cs index bd1fb5a9e..37c6fb519 100644 --- a/crypto/test/src/asn1/test/DeclarationOfMajorityUnitTest.cs +++ b/crypto/test/src/asn1/test/DeclarationOfMajorityUnitTest.cs @@ -80,11 +80,13 @@ namespace Org.BouncyCastle.Asn1.Tests } } - public static void Main( +#if !LIB + public static void MainOld( string[] args) { RunTest(new DeclarationOfMajorityUnitTest()); } +#endif [Test] public void TestFunction() diff --git a/crypto/test/src/asn1/test/EncryptedPrivateKeyInfoTest.cs b/crypto/test/src/asn1/test/EncryptedPrivateKeyInfoTest.cs index a84df59cc..34e5495cf 100644 --- a/crypto/test/src/asn1/test/EncryptedPrivateKeyInfoTest.cs +++ b/crypto/test/src/asn1/test/EncryptedPrivateKeyInfoTest.cs @@ -132,7 +132,8 @@ namespace Org.BouncyCastle.Asn1.Tests return new SimpleTestResult(true, Name + ": Okay"); } - public static void Main( +#if !LIB + public static void MainOld( string[] args) { ITest test = new EncryptedPrivateKeyInfoTest(); @@ -140,6 +141,7 @@ namespace Org.BouncyCastle.Asn1.Tests Console.WriteLine(result); } +#endif [Test] public void TestFunction() diff --git a/crypto/test/src/asn1/test/EqualsAndHashCodeTest.cs b/crypto/test/src/asn1/test/EqualsAndHashCodeTest.cs index 91329fbd5..2495fe20b 100644 --- a/crypto/test/src/asn1/test/EqualsAndHashCodeTest.cs +++ b/crypto/test/src/asn1/test/EqualsAndHashCodeTest.cs @@ -79,13 +79,13 @@ namespace Org.BouncyCastle.Asn1.Tests { get { return "EqualsAndHashCode"; } } - - public static void Main( +#if !LIB + public static void MainOld( string[] args) { RunTest(new EqualsAndHashCodeTest()); } - +#endif [Test] public void TestFunction() { diff --git a/crypto/test/src/asn1/test/EssCertIDv2UnitTest.cs b/crypto/test/src/asn1/test/EssCertIDv2UnitTest.cs index 9aac777e1..60d0059ed 100644 --- a/crypto/test/src/asn1/test/EssCertIDv2UnitTest.cs +++ b/crypto/test/src/asn1/test/EssCertIDv2UnitTest.cs @@ -28,12 +28,13 @@ namespace Org.BouncyCastle.Asn1.Tests EssCertIDv2.GetInstance(asn1Object); } - - public static void Main( +#if !LIB + public static void MainOld( string[] args) { RunTest(new EssCertIDv2UnitTest()); } +#endif [Test] public void TestFunction() diff --git a/crypto/test/src/asn1/test/GeneralNameTest.cs b/crypto/test/src/asn1/test/GeneralNameTest.cs index e9c3b5861..95e0a903e 100644 --- a/crypto/test/src/asn1/test/GeneralNameTest.cs +++ b/crypto/test/src/asn1/test/GeneralNameTest.cs @@ -98,12 +98,13 @@ namespace Org.BouncyCastle.Asn1.Tests Fail("ipv6h failed"); } } - - public static void Main( +#if !LIB + public static void MainOld( string[] args) { RunTest(new GeneralNameTest()); } +#endif [Test] public void TestFunction() diff --git a/crypto/test/src/asn1/test/GeneralizedTimeTest.cs b/crypto/test/src/asn1/test/GeneralizedTimeTest.cs index 51995e195..af968397f 100644 --- a/crypto/test/src/asn1/test/GeneralizedTimeTest.cs +++ b/crypto/test/src/asn1/test/GeneralizedTimeTest.cs @@ -192,7 +192,7 @@ namespace Org.BouncyCastle.Asn1.Tests char sign = '+'; // Note: GetUtcOffset incorporates Daylight Savings offset - TimeSpan offset = TimeZone.CurrentTimeZone.GetUtcOffset(date); + TimeSpan offset = TimeZoneInfo.Local.GetUtcOffset(date); if (offset.CompareTo(TimeSpan.Zero) < 0) { sign = '-'; @@ -213,12 +213,13 @@ namespace Org.BouncyCastle.Asn1.Tests return time.ToString(); } - - public static void Main( +#if !LIB + public static void MainOld( string[] args) { RunTest(new GeneralizedTimeTest()); } +#endif [Test] public void TestFunction() diff --git a/crypto/test/src/asn1/test/GenerationTest.cs b/crypto/test/src/asn1/test/GenerationTest.cs index 862e66d22..840ae4707 100644 --- a/crypto/test/src/asn1/test/GenerationTest.cs +++ b/crypto/test/src/asn1/test/GenerationTest.cs @@ -307,12 +307,13 @@ namespace Org.BouncyCastle.Asn1.Tests { get { return "Generation"; } } - - public static void Main( +#if !LIB + public static void MainOld( string[] args) { RunTest(new GenerationTest()); } +#endif [Test] public void TestFunction() diff --git a/crypto/test/src/asn1/test/InputStreamTest.cs b/crypto/test/src/asn1/test/InputStreamTest.cs index 1d92759e0..9734c9805 100644 --- a/crypto/test/src/asn1/test/InputStreamTest.cs +++ b/crypto/test/src/asn1/test/InputStreamTest.cs @@ -67,12 +67,13 @@ namespace Org.BouncyCastle.Asn1.Tests } } } - - public static void Main( +#if !LIB + public static void MainOld( string[] args) { RunTest(new InputStreamTest()); } +#endif [Test] public void TestFunction() diff --git a/crypto/test/src/asn1/test/Iso4217CurrencyCodeUnitTest.cs b/crypto/test/src/asn1/test/Iso4217CurrencyCodeUnitTest.cs index bb6076a93..274ae25ce 100644 --- a/crypto/test/src/asn1/test/Iso4217CurrencyCodeUnitTest.cs +++ b/crypto/test/src/asn1/test/Iso4217CurrencyCodeUnitTest.cs @@ -139,11 +139,13 @@ namespace Org.BouncyCastle.Asn1.Tests } } - public static void Main( +#if !LIB + public static void MainOld( string[] args) { RunTest(new Iso4217CurrencyCodeUnitTest()); } +#endif [Test] public void TestFunction() diff --git a/crypto/test/src/asn1/test/IssuingDistributionPointTest.cs b/crypto/test/src/asn1/test/IssuingDistributionPointTest.cs index b5f5c88bb..5158f0610 100644 --- a/crypto/test/src/asn1/test/IssuingDistributionPointTest.cs +++ b/crypto/test/src/asn1/test/IssuingDistributionPointTest.cs @@ -115,13 +115,13 @@ namespace Org.BouncyCastle.Asn1.Tests return o1.Equals(o2); } - - public static void Main( +#if !LIB + public static void MainOld( string[] args) { RunTest(new IssuingDistributionPointUnitTest()); } - +#endif [Test] public void TestFunction() { diff --git a/crypto/test/src/asn1/test/KeyUsageTest.cs b/crypto/test/src/asn1/test/KeyUsageTest.cs index d7ed3655d..279446928 100644 --- a/crypto/test/src/asn1/test/KeyUsageTest.cs +++ b/crypto/test/src/asn1/test/KeyUsageTest.cs @@ -31,13 +31,13 @@ namespace Org.BouncyCastle.Asn1.Tests BitStringConstantTester.testFlagValueCorrect(7, KeyUsage.EncipherOnly); BitStringConstantTester.testFlagValueCorrect(8, KeyUsage.DecipherOnly); } - - public static void Main( +#if !LIB + public static void MainOld( string[] args) { RunTest(new KeyUsageTest()); } - +#endif [Test] public void TestFunction() { diff --git a/crypto/test/src/asn1/test/LDSSecurityObjectUnitTest.cs b/crypto/test/src/asn1/test/LDSSecurityObjectUnitTest.cs index 914eda0b8..fa4c242d3 100644 --- a/crypto/test/src/asn1/test/LDSSecurityObjectUnitTest.cs +++ b/crypto/test/src/asn1/test/LDSSecurityObjectUnitTest.cs @@ -191,13 +191,13 @@ namespace Org.BouncyCastle.Asn1.Tests Fail("version info found when none expected."); } } - - public static void Main( +#if !LIB + public static void MainOld( string[] args) { RunTest(new LDSSecurityObjectUnitTest()); } - +#endif [Test] public void TestFunction() { diff --git a/crypto/test/src/asn1/test/MiscTest.cs b/crypto/test/src/asn1/test/MiscTest.cs index 42f5dbd01..877925526 100644 --- a/crypto/test/src/asn1/test/MiscTest.cs +++ b/crypto/test/src/asn1/test/MiscTest.cs @@ -73,8 +73,8 @@ namespace Org.BouncyCastle.Asn1.Tests { get { return "Misc"; } } - - public static void Main( +#if !LIB + public static void MainOld( string[] args) { ITest test = new MiscTest(); @@ -82,6 +82,7 @@ namespace Org.BouncyCastle.Asn1.Tests Console.WriteLine(result); } +#endif [Test] public void TestFunction() diff --git a/crypto/test/src/asn1/test/MonetaryLimitUnitTest.cs b/crypto/test/src/asn1/test/MonetaryLimitUnitTest.cs index cdeb2eca5..5af508509 100644 --- a/crypto/test/src/asn1/test/MonetaryLimitUnitTest.cs +++ b/crypto/test/src/asn1/test/MonetaryLimitUnitTest.cs @@ -75,13 +75,13 @@ namespace Org.BouncyCastle.Asn1.Tests checkMandatoryField("amount", amount, limit.Amount.IntValue); checkMandatoryField("exponent", exponent, limit.Exponent.IntValue); } - - public static void Main( +#if !LIB + public static void MainOld( string[] args) { RunTest(new MonetaryLimitUnitTest()); } - +#endif [Test] public void TestFunction() { diff --git a/crypto/test/src/asn1/test/MonetaryValueUnitTest.cs b/crypto/test/src/asn1/test/MonetaryValueUnitTest.cs index c75d74505..dff75f2cd 100644 --- a/crypto/test/src/asn1/test/MonetaryValueUnitTest.cs +++ b/crypto/test/src/asn1/test/MonetaryValueUnitTest.cs @@ -82,7 +82,7 @@ namespace Org.BouncyCastle.Asn1.Tests } } - public static void Main( + public static void MainOld( string[] args) { RunTest(new MonetaryValueUnitTest()); diff --git a/crypto/test/src/asn1/test/NameOrPseudonymUnitTest.cs b/crypto/test/src/asn1/test/NameOrPseudonymUnitTest.cs index 45f66613b..f308c3f42 100644 --- a/crypto/test/src/asn1/test/NameOrPseudonymUnitTest.cs +++ b/crypto/test/src/asn1/test/NameOrPseudonymUnitTest.cs @@ -97,7 +97,7 @@ namespace Org.BouncyCastle.Asn1.Tests } } - public static void Main( + public static void MainOld( string[] args) { RunTest(new NameOrPseudonymUnitTest()); diff --git a/crypto/test/src/asn1/test/NamingAuthorityUnitTest.cs b/crypto/test/src/asn1/test/NamingAuthorityUnitTest.cs index 787b2c32d..31a1a539b 100644 --- a/crypto/test/src/asn1/test/NamingAuthorityUnitTest.cs +++ b/crypto/test/src/asn1/test/NamingAuthorityUnitTest.cs @@ -89,7 +89,7 @@ namespace Org.BouncyCastle.Asn1.Tests checkOptionalField("namingAuthorityText", namingAuthorityText, auth.NamingAuthorityText); } - public static void Main( + public static void MainOld( string[] args) { RunTest(new NamingAuthorityUnitTest()); diff --git a/crypto/test/src/asn1/test/NetscapeCertTypeTest.cs b/crypto/test/src/asn1/test/NetscapeCertTypeTest.cs index 8db5d990c..27babc2e3 100644 --- a/crypto/test/src/asn1/test/NetscapeCertTypeTest.cs +++ b/crypto/test/src/asn1/test/NetscapeCertTypeTest.cs @@ -28,7 +28,7 @@ namespace Org.BouncyCastle.Asn1.Tests BitStringConstantTester.testFlagValueCorrect(7, NetscapeCertType.ObjectSigningCA); } - public static void Main( + public static void MainOld( string[] args) { RunTest(new NetscapeCertTypeTest()); diff --git a/crypto/test/src/asn1/test/OCSPTest.cs b/crypto/test/src/asn1/test/OCSPTest.cs index 13f59d3d1..6fde822d3 100644 --- a/crypto/test/src/asn1/test/OCSPTest.cs +++ b/crypto/test/src/asn1/test/OCSPTest.cs @@ -163,7 +163,7 @@ namespace Org.BouncyCastle.Asn1.Tests get { return "Ocsp"; } } - public static void Main( + public static void MainOld( string[] args) { ITest test = new OcspTest(); diff --git a/crypto/test/src/asn1/test/OIDTest.cs b/crypto/test/src/asn1/test/OIDTest.cs index b0782db04..2007e4f25 100644 --- a/crypto/test/src/asn1/test/OIDTest.cs +++ b/crypto/test/src/asn1/test/OIDTest.cs @@ -128,8 +128,8 @@ namespace Org.BouncyCastle.Asn1.Tests onCheck("1.1", "1.1.1", true); onCheck("1.1", "1.1.2", true); } - - public static void Main( +#if !LIB + public static void MainOld( string[] args) { ITest test = new OidTest(); @@ -137,7 +137,7 @@ namespace Org.BouncyCastle.Asn1.Tests Console.WriteLine(result); } - +#endif [Test] public void TestFunction() { diff --git a/crypto/test/src/asn1/test/OtherCertIDUnitTest.cs b/crypto/test/src/asn1/test/OtherCertIDUnitTest.cs index a09c18e8a..6af7d6f09 100644 --- a/crypto/test/src/asn1/test/OtherCertIDUnitTest.cs +++ b/crypto/test/src/asn1/test/OtherCertIDUnitTest.cs @@ -83,7 +83,7 @@ namespace Org.BouncyCastle.Asn1.Tests checkOptionalField("issuerSerial", issuerSerial, certID.IssuerSerial); } - public static void Main( + public static void MainOld( string[] args) { RunTest(new OtherCertIDUnitTest()); diff --git a/crypto/test/src/asn1/test/OtherSigningCertificateUnitTest.cs b/crypto/test/src/asn1/test/OtherSigningCertificateUnitTest.cs index 4410d8e4c..4906cf043 100644 --- a/crypto/test/src/asn1/test/OtherSigningCertificateUnitTest.cs +++ b/crypto/test/src/asn1/test/OtherSigningCertificateUnitTest.cs @@ -77,7 +77,7 @@ namespace Org.BouncyCastle.Asn1.Tests checkMandatoryField("GetCerts()[0]", otherCertID, otherCert.GetCerts()[0]); } - public static void Main( + public static void MainOld( string[] args) { RunTest(new OtherSigningCertificateUnitTest()); diff --git a/crypto/test/src/asn1/test/PKCS10Test.cs b/crypto/test/src/asn1/test/PKCS10Test.cs index 28736b816..8a973eac1 100644 --- a/crypto/test/src/asn1/test/PKCS10Test.cs +++ b/crypto/test/src/asn1/test/PKCS10Test.cs @@ -75,7 +75,7 @@ namespace Org.BouncyCastle.Asn1.Tests return BasicPkcs10Test("Universal CR", req2); } - public static void Main( + public static void MainOld( string[] args) { ITest test = new Pkcs10Test(); diff --git a/crypto/test/src/asn1/test/PKCS12Test.cs b/crypto/test/src/asn1/test/PKCS12Test.cs index c20fa8cc6..8ebb27030 100644 --- a/crypto/test/src/asn1/test/PKCS12Test.cs +++ b/crypto/test/src/asn1/test/PKCS12Test.cs @@ -193,7 +193,7 @@ namespace Org.BouncyCastle.Asn1.Tests get { return "Pkcs12"; } } - public static void Main( + public static void MainOld( string[] args) { RunTest(new Pkcs12Test()); diff --git a/crypto/test/src/asn1/test/PKIFailureInfoTest.cs b/crypto/test/src/asn1/test/PKIFailureInfoTest.cs index 7d51dbb5f..c40227352 100644 --- a/crypto/test/src/asn1/test/PKIFailureInfoTest.cs +++ b/crypto/test/src/asn1/test/PKIFailureInfoTest.cs @@ -72,7 +72,7 @@ namespace Org.BouncyCastle.Asn1.Tests DoTestEncoding(); } - public static void Main( + public static void MainOld( string[] args) { RunTest(new PkiFailureInfoTest()); diff --git a/crypto/test/src/asn1/test/ParsingTest.cs b/crypto/test/src/asn1/test/ParsingTest.cs index bb219e2fc..324807262 100644 --- a/crypto/test/src/asn1/test/ParsingTest.cs +++ b/crypto/test/src/asn1/test/ParsingTest.cs @@ -95,7 +95,7 @@ namespace Org.BouncyCastle.Asn1.Tests } } - public static void Main( + public static void MainOld( string[] args) { RunTest(new ParsingTest()); diff --git a/crypto/test/src/asn1/test/PersonalDataUnitTest.cs b/crypto/test/src/asn1/test/PersonalDataUnitTest.cs index f92e619cf..625a382d4 100644 --- a/crypto/test/src/asn1/test/PersonalDataUnitTest.cs +++ b/crypto/test/src/asn1/test/PersonalDataUnitTest.cs @@ -110,7 +110,7 @@ namespace Org.BouncyCastle.Asn1.Tests checkOptionalField("postalAddress", postalAddress, data.PostalAddress); } - public static void Main( + public static void MainOld( string[] args) { RunTest(new PersonalDataUnitTest()); diff --git a/crypto/test/src/asn1/test/ProcurationSyntaxUnitTest.cs b/crypto/test/src/asn1/test/ProcurationSyntaxUnitTest.cs index 97d0e3eee..0f7c290f9 100644 --- a/crypto/test/src/asn1/test/ProcurationSyntaxUnitTest.cs +++ b/crypto/test/src/asn1/test/ProcurationSyntaxUnitTest.cs @@ -94,7 +94,7 @@ namespace Org.BouncyCastle.Asn1.Tests checkOptionalField("certRef", certRef, procuration.CertRef); } - public static void Main( + public static void MainOld( string[] args) { RunTest(new ProcurationSyntaxUnitTest()); diff --git a/crypto/test/src/asn1/test/ProfessionInfoUnitTest.cs b/crypto/test/src/asn1/test/ProfessionInfoUnitTest.cs index 6af2658ef..0450a21a7 100644 --- a/crypto/test/src/asn1/test/ProfessionInfoUnitTest.cs +++ b/crypto/test/src/asn1/test/ProfessionInfoUnitTest.cs @@ -104,7 +104,7 @@ namespace Org.BouncyCastle.Asn1.Tests checkOptionalField("addProfessionInfo", addProfInfo, profInfo.AddProfessionInfo); } - public static void Main( + public static void MainOld( string[] args) { RunTest(new ProfessionInfoUnitTest()); diff --git a/crypto/test/src/asn1/test/QCStatementUnitTest.cs b/crypto/test/src/asn1/test/QCStatementUnitTest.cs index 8d8ec9ec7..347186f8a 100644 --- a/crypto/test/src/asn1/test/QCStatementUnitTest.cs +++ b/crypto/test/src/asn1/test/QCStatementUnitTest.cs @@ -91,7 +91,7 @@ namespace Org.BouncyCastle.Asn1.Tests } } - public static void Main( + public static void MainOld( string[] args) { RunTest(new QCStatementUnitTest()); diff --git a/crypto/test/src/asn1/test/ReasonFlagsTest.cs b/crypto/test/src/asn1/test/ReasonFlagsTest.cs index ef404b3e1..66b5c4cc1 100644 --- a/crypto/test/src/asn1/test/ReasonFlagsTest.cs +++ b/crypto/test/src/asn1/test/ReasonFlagsTest.cs @@ -29,7 +29,7 @@ namespace Org.BouncyCastle.Asn1.Tests BitStringConstantTester.testFlagValueCorrect(8, ReasonFlags.AACompromise); } - public static void Main( + public static void MainOld( string[] args) { RunTest(new ReasonFlagsTest()); diff --git a/crypto/test/src/asn1/test/RegressionTest.cs b/crypto/test/src/asn1/test/RegressionTest.cs index 873ab4396..f78c0dd72 100644 --- a/crypto/test/src/asn1/test/RegressionTest.cs +++ b/crypto/test/src/asn1/test/RegressionTest.cs @@ -72,7 +72,7 @@ namespace Org.BouncyCastle.Asn1.Tests new X9Test(), }; - public static void Main( + public static void MainOld( string[] args) { for (int i = 0; i != tests.Length; i++) diff --git a/crypto/test/src/asn1/test/RequestedCertificateUnitTest.cs b/crypto/test/src/asn1/test/RequestedCertificateUnitTest.cs index 767504173..433b3fe6b 100644 --- a/crypto/test/src/asn1/test/RequestedCertificateUnitTest.cs +++ b/crypto/test/src/asn1/test/RequestedCertificateUnitTest.cs @@ -100,7 +100,7 @@ namespace Org.BouncyCastle.Asn1.Tests } } - public static void Main( + public static void MainOld( string[] args) { RunTest(new RequestedCertificateUnitTest()); diff --git a/crypto/test/src/asn1/test/RestrictionUnitTest.cs b/crypto/test/src/asn1/test/RestrictionUnitTest.cs index 5dd6438cb..b240418a4 100644 --- a/crypto/test/src/asn1/test/RestrictionUnitTest.cs +++ b/crypto/test/src/asn1/test/RestrictionUnitTest.cs @@ -61,7 +61,7 @@ namespace Org.BouncyCastle.Asn1.Tests checkMandatoryField("restriction", res, restriction.RestrictionString); } - public static void Main( + public static void MainOld( string[] args) { RunTest(new RestrictionUnitTest()); diff --git a/crypto/test/src/asn1/test/SMIMETest.cs b/crypto/test/src/asn1/test/SMIMETest.cs index adb90e093..df76c507a 100644 --- a/crypto/test/src/asn1/test/SMIMETest.cs +++ b/crypto/test/src/asn1/test/SMIMETest.cs @@ -70,7 +70,7 @@ namespace Org.BouncyCastle.Asn1.Tests get { return "SMIME"; } } - public static void Main( + public static void MainOld( string[] args) { ITest test = new SmimeTest(); diff --git a/crypto/test/src/asn1/test/SemanticsInformationUnitTest.cs b/crypto/test/src/asn1/test/SemanticsInformationUnitTest.cs index 8f1f85f19..0bfa49725 100644 --- a/crypto/test/src/asn1/test/SemanticsInformationUnitTest.cs +++ b/crypto/test/src/asn1/test/SemanticsInformationUnitTest.cs @@ -121,7 +121,7 @@ namespace Org.BouncyCastle.Asn1.Tests } } - public static void Main( + public static void MainOld( string[] args) { RunTest(new SemanticsInformationUnitTest()); diff --git a/crypto/test/src/asn1/test/SetTest.cs b/crypto/test/src/asn1/test/SetTest.cs index 57c46603d..c33d39989 100644 --- a/crypto/test/src/asn1/test/SetTest.cs +++ b/crypto/test/src/asn1/test/SetTest.cs @@ -100,7 +100,7 @@ namespace Org.BouncyCastle.Asn1.Tests s = new DerSet(v); } - public static void Main( + public static void MainOld( string[] args) { RunTest(new SetTest()); diff --git a/crypto/test/src/asn1/test/SignerLocationUnitTest.cs b/crypto/test/src/asn1/test/SignerLocationUnitTest.cs index bf20f1fda..a0104dc81 100644 --- a/crypto/test/src/asn1/test/SignerLocationUnitTest.cs +++ b/crypto/test/src/asn1/test/SignerLocationUnitTest.cs @@ -178,7 +178,7 @@ namespace Org.BouncyCastle.Asn1.Tests } } - public static void Main( + public static void MainOld( string[] args) { RunTest(new SignerLocationUnitTest()); diff --git a/crypto/test/src/asn1/test/StringTest.cs b/crypto/test/src/asn1/test/StringTest.cs index acfd380b2..52f61dc86 100644 --- a/crypto/test/src/asn1/test/StringTest.cs +++ b/crypto/test/src/asn1/test/StringTest.cs @@ -88,7 +88,7 @@ namespace Org.BouncyCastle.Asn1.Tests } } - public static void Main( + public static void MainOld( string[] args) { RunTest(new StringTest()); diff --git a/crypto/test/src/asn1/test/SubjectKeyIdentifierTest.cs b/crypto/test/src/asn1/test/SubjectKeyIdentifierTest.cs index 127c47a3a..84273dfc2 100644 --- a/crypto/test/src/asn1/test/SubjectKeyIdentifierTest.cs +++ b/crypto/test/src/asn1/test/SubjectKeyIdentifierTest.cs @@ -44,7 +44,7 @@ namespace Org.BouncyCastle.Asn1.Tests } } - public static void Main( + public static void MainOld( string[] args) { RunTest(new SubjectKeyIdentifierTest()); diff --git a/crypto/test/src/asn1/test/TagTest.cs b/crypto/test/src/asn1/test/TagTest.cs index 80ca2c0ea..6ede1b40b 100644 --- a/crypto/test/src/asn1/test/TagTest.cs +++ b/crypto/test/src/asn1/test/TagTest.cs @@ -102,7 +102,7 @@ namespace Org.BouncyCastle.Asn1.Tests } } - public static void Main( + public static void MainOld( string[] args) { RunTest(new TagTest()); diff --git a/crypto/test/src/asn1/test/TargetInformationTest.cs b/crypto/test/src/asn1/test/TargetInformationTest.cs index 7fa04cd01..022743aa8 100644 --- a/crypto/test/src/asn1/test/TargetInformationTest.cs +++ b/crypto/test/src/asn1/test/TargetInformationTest.cs @@ -41,7 +41,7 @@ namespace Org.BouncyCastle.Asn1.Tests } } - public static void Main( + public static void MainOld( string[] args) { RunTest(new TargetInformationTest()); diff --git a/crypto/test/src/asn1/test/TypeOfBiometricDataUnitTest.cs b/crypto/test/src/asn1/test/TypeOfBiometricDataUnitTest.cs index a59415c31..eb221ea20 100644 --- a/crypto/test/src/asn1/test/TypeOfBiometricDataUnitTest.cs +++ b/crypto/test/src/asn1/test/TypeOfBiometricDataUnitTest.cs @@ -135,7 +135,7 @@ namespace Org.BouncyCastle.Asn1.Tests } } - public static void Main( + public static void MainOld( string[] args) { RunTest(new TypeOfBiometricDataUnitTest()); diff --git a/crypto/test/src/asn1/test/UTCTimeTest.cs b/crypto/test/src/asn1/test/UTCTimeTest.cs index 07abbc911..a4a1c9941 100644 --- a/crypto/test/src/asn1/test/UTCTimeTest.cs +++ b/crypto/test/src/asn1/test/UTCTimeTest.cs @@ -105,7 +105,7 @@ namespace Org.BouncyCastle.Asn1.Tests } } - public static void Main( + public static void MainOld( string[] args) { RunTest(new UtcTimeTest()); diff --git a/crypto/test/src/asn1/test/X509ExtensionsTest.cs b/crypto/test/src/asn1/test/X509ExtensionsTest.cs index f1efd3a9b..468296c7f 100644 --- a/crypto/test/src/asn1/test/X509ExtensionsTest.cs +++ b/crypto/test/src/asn1/test/X509ExtensionsTest.cs @@ -100,7 +100,7 @@ namespace Org.BouncyCastle.Asn1.Tests } } - public static void Main( + public static void MainOld( string[] args) { RunTest(new X509ExtensionsTest()); diff --git a/crypto/test/src/asn1/test/X509NameTest.cs b/crypto/test/src/asn1/test/X509NameTest.cs index 9a564f72f..e8eda6851 100644 --- a/crypto/test/src/asn1/test/X509NameTest.cs +++ b/crypto/test/src/asn1/test/X509NameTest.cs @@ -654,7 +654,7 @@ namespace Org.BouncyCastle.Asn1.Tests return true; } - public static void Main( + public static void MainOld( string[] args) { ITest test = new X509NameTest(); diff --git a/crypto/test/src/asn1/test/X9Test.cs b/crypto/test/src/asn1/test/X9Test.cs index db2541f7c..f804a0adc 100644 --- a/crypto/test/src/asn1/test/X9Test.cs +++ b/crypto/test/src/asn1/test/X9Test.cs @@ -155,7 +155,7 @@ namespace Org.BouncyCastle.Asn1.Tests get { return "X9"; } } - public static void Main( + public static void MainOld( string[] args) { RunTest(new X9Test()); 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()); diff --git a/crypto/test/src/crypto/agreement/test/AllTests.cs b/crypto/test/src/crypto/agreement/test/AllTests.cs index 66853b285..f37721d23 100644 --- a/crypto/test/src/crypto/agreement/test/AllTests.cs +++ b/crypto/test/src/crypto/agreement/test/AllTests.cs @@ -11,7 +11,7 @@ namespace Org.BouncyCastle.Crypto.Agreement.Tests [TestFixture] 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/crypto/agreement/test/JPakeParticipantTest.cs b/crypto/test/src/crypto/agreement/test/JPakeParticipantTest.cs index c84264aa5..e4be1d836 100644 --- a/crypto/test/src/crypto/agreement/test/JPakeParticipantTest.cs +++ b/crypto/test/src/crypto/agreement/test/JPakeParticipantTest.cs @@ -29,7 +29,7 @@ namespace Org.BouncyCastle.Crypto.Agreement.Tests get { return "JPakeParticipant"; } } - public static void Main( + public static void MainOld( string[] args) { RunTest(new JPakeParticipantTest()); diff --git a/crypto/test/src/crypto/agreement/test/JPakePrimeOrderGroupTest.cs b/crypto/test/src/crypto/agreement/test/JPakePrimeOrderGroupTest.cs index 0f089f93c..86e42f34a 100644 --- a/crypto/test/src/crypto/agreement/test/JPakePrimeOrderGroupTest.cs +++ b/crypto/test/src/crypto/agreement/test/JPakePrimeOrderGroupTest.cs @@ -22,7 +22,7 @@ namespace Org.BouncyCastle.Crypto.Agreement.Tests get { return "JPakePrimeOrderGroup"; } } - public static void Main( + public static void MainOld( string[] args) { RunTest(new JPakePrimeOrderGroupTest()); diff --git a/crypto/test/src/crypto/agreement/test/JPakeUtilitiesTest.cs b/crypto/test/src/crypto/agreement/test/JPakeUtilitiesTest.cs index 04a52cc06..eca1adfd8 100644 --- a/crypto/test/src/crypto/agreement/test/JPakeUtilitiesTest.cs +++ b/crypto/test/src/crypto/agreement/test/JPakeUtilitiesTest.cs @@ -32,7 +32,7 @@ namespace Org.BouncyCastle.Crypto.Agreement.Tests get { return "JPakeUtilities"; } } - public static void Main( + public static void MainOld( string[] args) { RunTest(new JPakeUtilitiesTest()); diff --git a/crypto/test/src/crypto/io/test/AllTests.cs b/crypto/test/src/crypto/io/test/AllTests.cs index 2634b4ab1..c87c77234 100644 --- a/crypto/test/src/crypto/io/test/AllTests.cs +++ b/crypto/test/src/crypto/io/test/AllTests.cs @@ -8,7 +8,7 @@ namespace Org.BouncyCastle.Crypto.IO.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/crypto/prng/test/CtrDrbgTest.cs b/crypto/test/src/crypto/prng/test/CtrDrbgTest.cs index 44b08f3a6..6db1fc95e 100644 --- a/crypto/test/src/crypto/prng/test/CtrDrbgTest.cs +++ b/crypto/test/src/crypto/prng/test/CtrDrbgTest.cs @@ -23,7 +23,7 @@ namespace Org.BouncyCastle.Crypto.Prng.Test get { return "CTRDRBGTest"; } } - public static void Main(string[] args) + public static void MainOld(string[] args) { RunTest(new CtrDrbgTest()); } diff --git a/crypto/test/src/crypto/prng/test/HMacDrbgTest.cs b/crypto/test/src/crypto/prng/test/HMacDrbgTest.cs index a5ca30836..79a1f62f6 100644 --- a/crypto/test/src/crypto/prng/test/HMacDrbgTest.cs +++ b/crypto/test/src/crypto/prng/test/HMacDrbgTest.cs @@ -22,7 +22,7 @@ namespace Org.BouncyCastle.Crypto.Prng.Test get { return "HMacDRBG"; } } - public static void Main(string[] args) + public static void MainOld(string[] args) { RunTest(new HMacDrbgTest()); } diff --git a/crypto/test/src/crypto/prng/test/HashDrbgTest.cs b/crypto/test/src/crypto/prng/test/HashDrbgTest.cs index 892ca74da..f50cf3767 100644 --- a/crypto/test/src/crypto/prng/test/HashDrbgTest.cs +++ b/crypto/test/src/crypto/prng/test/HashDrbgTest.cs @@ -21,7 +21,7 @@ namespace Org.BouncyCastle.Crypto.Prng.Test get { return "HashDRBG"; } } - public static void Main(string[] args) + public static void MainOld(string[] args) { RunTest(new HashDrbgTest()); } diff --git a/crypto/test/src/crypto/prng/test/X931Test.cs b/crypto/test/src/crypto/prng/test/X931Test.cs index 1132ea34a..38e129b32 100644 --- a/crypto/test/src/crypto/prng/test/X931Test.cs +++ b/crypto/test/src/crypto/prng/test/X931Test.cs @@ -23,7 +23,7 @@ namespace Org.BouncyCastle.Crypto.Prng.Test get { return "X931"; } } - public static void Main(string[] args) + public static void MainOld(string[] args) { RunTest(new X931Test()); } diff --git a/crypto/test/src/crypto/test/AESFastTest.cs b/crypto/test/src/crypto/test/AESFastTest.cs index 5513a0e78..45e9c27ef 100644 --- a/crypto/test/src/crypto/test/AESFastTest.cs +++ b/crypto/test/src/crypto/test/AESFastTest.cs @@ -148,7 +148,7 @@ namespace Org.BouncyCastle.Crypto.Tests } } - public static void Main( + public static void MainOld( string[] args) { AesFastTest test = new AesFastTest(); diff --git a/crypto/test/src/crypto/test/AESLightTest.cs b/crypto/test/src/crypto/test/AESLightTest.cs index 0b5777ba1..8e5af07b0 100644 --- a/crypto/test/src/crypto/test/AESLightTest.cs +++ b/crypto/test/src/crypto/test/AESLightTest.cs @@ -148,7 +148,7 @@ namespace Org.BouncyCastle.Crypto.Tests } } - public static void Main( + public static void MainOld( string[] args) { AesLightTest test = new AesLightTest(); diff --git a/crypto/test/src/crypto/test/AESTest.cs b/crypto/test/src/crypto/test/AESTest.cs index 7b8fc34cf..03d7af7b8 100644 --- a/crypto/test/src/crypto/test/AESTest.cs +++ b/crypto/test/src/crypto/test/AESTest.cs @@ -158,7 +158,7 @@ namespace Org.BouncyCastle.Crypto.Tests return new SimpleTestResult(true, Name + ": Okay"); } - public static void Main( + public static void MainOld( string[] args) { AesTest test = new AesTest(); diff --git a/crypto/test/src/crypto/test/AESWrapTest.cs b/crypto/test/src/crypto/test/AESWrapTest.cs index 11b46098e..bb47a7af7 100644 --- a/crypto/test/src/crypto/test/AESWrapTest.cs +++ b/crypto/test/src/crypto/test/AESWrapTest.cs @@ -194,7 +194,7 @@ namespace Org.BouncyCastle.Crypto.Tests return new SimpleTestResult(true, Name + ": Okay"); } - public static void Main( + public static void MainOld( string[] args) { AesWrapTest test = new AesWrapTest(); diff --git a/crypto/test/src/crypto/test/AllTests.cs b/crypto/test/src/crypto/test/AllTests.cs index e7035a663..deb29ed72 100644 --- a/crypto/test/src/crypto/test/AllTests.cs +++ b/crypto/test/src/crypto/test/AllTests.cs @@ -13,7 +13,7 @@ namespace Org.BouncyCastle.Crypto.Tests public class AllTests { #if !LIB - public static void Main(string[] args) + public static void MainOld(string[] args) { Suite.Run(new NullListener(), NUnit.Core.TestFilter.Empty); } @@ -31,7 +31,7 @@ namespace Org.BouncyCastle.Crypto.Tests } #endif - [Test] + [Test] public void TestCrypto() { foreach (Org.BouncyCastle.Utilities.Test.ITest test in RegressionTest.tests) diff --git a/crypto/test/src/crypto/test/BCryptTest.cs b/crypto/test/src/crypto/test/BCryptTest.cs index 2d9771d17..1d71f62af 100644 --- a/crypto/test/src/crypto/test/BCryptTest.cs +++ b/crypto/test/src/crypto/test/BCryptTest.cs @@ -145,7 +145,7 @@ namespace Org.BouncyCastle.Crypto.Tests } } - public static void Main(string[] args) + public static void MainOld(string[] args) { RunTest(new BCryptTest()); } diff --git a/crypto/test/src/crypto/test/BlowfishTest.cs b/crypto/test/src/crypto/test/BlowfishTest.cs index 780dd3abd..3f5e79f6f 100644 --- a/crypto/test/src/crypto/test/BlowfishTest.cs +++ b/crypto/test/src/crypto/test/BlowfishTest.cs @@ -43,7 +43,7 @@ namespace Org.BouncyCastle.Crypto.Tests Assert.AreEqual(Name + ": Okay", resultText); } - public static void Main( + public static void MainOld( string[] args) { ITest test = new BlowfishTest(); diff --git a/crypto/test/src/crypto/test/CAST6Test.cs b/crypto/test/src/crypto/test/CAST6Test.cs index 7517b6737..8e2a3fa93 100644 --- a/crypto/test/src/crypto/test/CAST6Test.cs +++ b/crypto/test/src/crypto/test/CAST6Test.cs @@ -39,7 +39,7 @@ namespace Org.BouncyCastle.Crypto.Tests { } - public static void Main( + public static void MainOld( string[] args) { ITest test = new Cast6Test(); diff --git a/crypto/test/src/crypto/test/CCMTest.cs b/crypto/test/src/crypto/test/CCMTest.cs index 8c46e11e7..5cc9bc1b6 100644 --- a/crypto/test/src/crypto/test/CCMTest.cs +++ b/crypto/test/src/crypto/test/CCMTest.cs @@ -302,7 +302,7 @@ namespace Org.BouncyCastle.Crypto.Tests Assert.AreEqual(Name + ": Okay", resultText); } - public static void Main( + public static void MainOld( string[] args) { RunTest(new CcmTest()); diff --git a/crypto/test/src/crypto/test/CMacTest.cs b/crypto/test/src/crypto/test/CMacTest.cs index d71b69f98..2e76a188f 100644 --- a/crypto/test/src/crypto/test/CMacTest.cs +++ b/crypto/test/src/crypto/test/CMacTest.cs @@ -285,7 +285,7 @@ namespace Org.BouncyCastle.Crypto.Tests get { return "CMac"; } } - public static void Main( + public static void MainOld( string[] args) { RunTest(new CMacTest()); diff --git a/crypto/test/src/crypto/test/CTSTest.cs b/crypto/test/src/crypto/test/CTSTest.cs index 9d001bc68..90c9b2072 100644 --- a/crypto/test/src/crypto/test/CTSTest.cs +++ b/crypto/test/src/crypto/test/CTSTest.cs @@ -163,7 +163,7 @@ namespace Org.BouncyCastle.Crypto.Tests return new SimpleTestResult(true, Name + ": Okay"); } - public static void Main( + public static void MainOld( string[] args) { CTSTest test = new CTSTest(); diff --git a/crypto/test/src/crypto/test/CamelliaLightTest.cs b/crypto/test/src/crypto/test/CamelliaLightTest.cs index 2247178f2..2d9c74fc5 100644 --- a/crypto/test/src/crypto/test/CamelliaLightTest.cs +++ b/crypto/test/src/crypto/test/CamelliaLightTest.cs @@ -71,7 +71,7 @@ namespace Org.BouncyCastle.Crypto.Tests Assert.AreEqual(Name + ": Okay", resultText); } - public static void Main( + public static void MainOld( string[] args) { RunTest(new CamelliaLightTest()); diff --git a/crypto/test/src/crypto/test/CamelliaTest.cs b/crypto/test/src/crypto/test/CamelliaTest.cs index a134546b7..f78fc228d 100644 --- a/crypto/test/src/crypto/test/CamelliaTest.cs +++ b/crypto/test/src/crypto/test/CamelliaTest.cs @@ -71,7 +71,7 @@ namespace Org.BouncyCastle.Crypto.Tests Assert.AreEqual(Name + ": Okay", resultText); } - public static void Main( + public static void MainOld( string[] args) { RunTest(new CamelliaTest()); diff --git a/crypto/test/src/crypto/test/Cast5Test.cs b/crypto/test/src/crypto/test/Cast5Test.cs index ea2e0c540..bec1071f6 100644 --- a/crypto/test/src/crypto/test/Cast5Test.cs +++ b/crypto/test/src/crypto/test/Cast5Test.cs @@ -29,7 +29,7 @@ namespace Org.BouncyCastle.Crypto.Tests { } - public static void Main( + public static void MainOld( string[] args) { ITest test = new Cast5Test(); diff --git a/crypto/test/src/crypto/test/ChaChaTest.cs b/crypto/test/src/crypto/test/ChaChaTest.cs index 0b394c91e..187e1cd1e 100644 --- a/crypto/test/src/crypto/test/ChaChaTest.cs +++ b/crypto/test/src/crypto/test/ChaChaTest.cs @@ -302,7 +302,7 @@ namespace Org.BouncyCastle.Crypto.Tests } } - public static void Main( + public static void MainOld( string[] args) { RunTest(new ChaChaTest()); diff --git a/crypto/test/src/crypto/test/DESTest.cs b/crypto/test/src/crypto/test/DESTest.cs index cf1022eae..5a78adc94 100644 --- a/crypto/test/src/crypto/test/DESTest.cs +++ b/crypto/test/src/crypto/test/DESTest.cs @@ -197,7 +197,7 @@ namespace Org.BouncyCastle.Crypto.Tests get { return "DES"; } } - public static void Main( + public static void MainOld( string[] args) { RunTest(new DesTest()); diff --git a/crypto/test/src/crypto/test/DESedeTest.cs b/crypto/test/src/crypto/test/DESedeTest.cs index aa61844f2..8bedf4ff8 100644 --- a/crypto/test/src/crypto/test/DESedeTest.cs +++ b/crypto/test/src/crypto/test/DESedeTest.cs @@ -170,7 +170,7 @@ namespace Org.BouncyCastle.Crypto.Tests get { return "DESede"; } } - public static void Main( + public static void MainOld( string[] args) { RunTest(new DesEdeTest()); diff --git a/crypto/test/src/crypto/test/DHKEKGeneratorTest.cs b/crypto/test/src/crypto/test/DHKEKGeneratorTest.cs index eee408f97..967fcaf52 100644 --- a/crypto/test/src/crypto/test/DHKEKGeneratorTest.cs +++ b/crypto/test/src/crypto/test/DHKEKGeneratorTest.cs @@ -62,7 +62,7 @@ namespace Org.BouncyCastle.Crypto.Tests get { return "DHKekGenerator"; } } - public static void Main( + public static void MainOld( string[] args) { RunTest(new DHKekGeneratorTest()); diff --git a/crypto/test/src/crypto/test/DHTest.cs b/crypto/test/src/crypto/test/DHTest.cs index b460f41a5..54bdd3147 100644 --- a/crypto/test/src/crypto/test/DHTest.cs +++ b/crypto/test/src/crypto/test/DHTest.cs @@ -383,7 +383,7 @@ namespace Org.BouncyCastle.Crypto.Tests } } - public static void Main( + public static void MainOld( string[] args) { ITest test = new DHTest(); diff --git a/crypto/test/src/crypto/test/DSATest.cs b/crypto/test/src/crypto/test/DSATest.cs index 0e6367150..e679bd971 100644 --- a/crypto/test/src/crypto/test/DSATest.cs +++ b/crypto/test/src/crypto/test/DSATest.cs @@ -574,7 +574,7 @@ namespace Org.BouncyCastle.Crypto.Tests } } - public static void Main( + public static void MainOld( string[] args) { RunTest(new DsaTest()); diff --git a/crypto/test/src/crypto/test/DeterministicDSATest.cs b/crypto/test/src/crypto/test/DeterministicDSATest.cs index 914a770bd..63773e69a 100644 --- a/crypto/test/src/crypto/test/DeterministicDSATest.cs +++ b/crypto/test/src/crypto/test/DeterministicDSATest.cs @@ -494,7 +494,7 @@ namespace Org.BouncyCastle.Crypto.Tests TestECHMacDeterministic(); } - public static void Main( + public static void MainOld( string[] args) { RunTest(new DeterministicDsaTest()); diff --git a/crypto/test/src/crypto/test/DigestRandomNumberTest.cs b/crypto/test/src/crypto/test/DigestRandomNumberTest.cs index cee2e354e..1161e2bc5 100644 --- a/crypto/test/src/crypto/test/DigestRandomNumberTest.cs +++ b/crypto/test/src/crypto/test/DigestRandomNumberTest.cs @@ -154,7 +154,7 @@ namespace Org.BouncyCastle.Crypto.Tests Assert.AreEqual(Name + ": Okay", resultText); } - public static void Main( + public static void MainOld( string[] args) { RunTest(new DigestRandomNumberTest()); diff --git a/crypto/test/src/crypto/test/EAXTest.cs b/crypto/test/src/crypto/test/EAXTest.cs index c6be118b2..38e58c0a8 100644 --- a/crypto/test/src/crypto/test/EAXTest.cs +++ b/crypto/test/src/crypto/test/EAXTest.cs @@ -335,7 +335,7 @@ namespace Org.BouncyCastle.Crypto.Tests } } - public static void Main( + public static void MainOld( string[] args) { RunTest(new EaxTest()); diff --git a/crypto/test/src/crypto/test/ECDHKEKGeneratorTest.cs b/crypto/test/src/crypto/test/ECDHKEKGeneratorTest.cs index 250b2ca22..08db81723 100644 --- a/crypto/test/src/crypto/test/ECDHKEKGeneratorTest.cs +++ b/crypto/test/src/crypto/test/ECDHKEKGeneratorTest.cs @@ -63,7 +63,7 @@ namespace Org.BouncyCastle.Crypto.Tests get { return "ECDHKekGenerator"; } } - public static void Main( + public static void MainOld( string[] args) { RunTest(new ECDHKekGeneratorTest()); diff --git a/crypto/test/src/crypto/test/ECGOST3410Test.cs b/crypto/test/src/crypto/test/ECGOST3410Test.cs index 37cb23ecf..5efa75169 100644 --- a/crypto/test/src/crypto/test/ECGOST3410Test.cs +++ b/crypto/test/src/crypto/test/ECGOST3410Test.cs @@ -325,7 +325,7 @@ namespace Org.BouncyCastle.Crypto.Tests ecGOST3410_CParam(); } - public static void Main( + public static void MainOld( string[] args) { ECGost3410Test test = new ECGost3410Test(); diff --git a/crypto/test/src/crypto/test/ECIESTest.cs b/crypto/test/src/crypto/test/ECIESTest.cs index e8cfd6df4..f17e6957a 100644 --- a/crypto/test/src/crypto/test/ECIESTest.cs +++ b/crypto/test/src/crypto/test/ECIESTest.cs @@ -235,7 +235,7 @@ namespace Org.BouncyCastle.Crypto.Tests DoTest(p1, p2); } - public static void Main( + public static void MainOld( string[] args) { RunTest(new EcIesTest()); diff --git a/crypto/test/src/crypto/test/ECNRTest.cs b/crypto/test/src/crypto/test/ECNRTest.cs index 5eae9f097..180b33560 100644 --- a/crypto/test/src/crypto/test/ECNRTest.cs +++ b/crypto/test/src/crypto/test/ECNRTest.cs @@ -98,7 +98,7 @@ namespace Org.BouncyCastle.Crypto.Tests ecNR239bitPrime(); } - public static void Main( + public static void MainOld( string[] args) { EcNrTest test = new EcNrTest(); diff --git a/crypto/test/src/crypto/test/ECTest.cs b/crypto/test/src/crypto/test/ECTest.cs index 5697f41eb..980d04d6c 100644 --- a/crypto/test/src/crypto/test/ECTest.cs +++ b/crypto/test/src/crypto/test/ECTest.cs @@ -923,7 +923,7 @@ namespace Org.BouncyCastle.Crypto.Tests TestECMqvRandom(); } - public static void Main( + public static void MainOld( string[] args) { RunTest(new ECTest()); diff --git a/crypto/test/src/crypto/test/ElGamalTest.cs b/crypto/test/src/crypto/test/ElGamalTest.cs index 1caa70387..02d723d08 100644 --- a/crypto/test/src/crypto/test/ElGamalTest.cs +++ b/crypto/test/src/crypto/test/ElGamalTest.cs @@ -269,7 +269,7 @@ namespace Org.BouncyCastle.Crypto.Tests TestInitCheck(); } - public static void Main( + public static void MainOld( string[] args) { RunTest(new ElGamalTest()); diff --git a/crypto/test/src/crypto/test/EqualsHashCodeTest.cs b/crypto/test/src/crypto/test/EqualsHashCodeTest.cs index 05cc9ad53..8933afbcf 100644 --- a/crypto/test/src/crypto/test/EqualsHashCodeTest.cs +++ b/crypto/test/src/crypto/test/EqualsHashCodeTest.cs @@ -253,7 +253,7 @@ namespace Org.BouncyCastle.Crypto.Tests TestDsa(); } - public static void Main( + public static void MainOld( string[] args) { RunTest(new EqualsHashCodeTest()); diff --git a/crypto/test/src/crypto/test/GCMTest.cs b/crypto/test/src/crypto/test/GCMTest.cs index 943ffdad4..078aa87c4 100644 --- a/crypto/test/src/crypto/test/GCMTest.cs +++ b/crypto/test/src/crypto/test/GCMTest.cs @@ -694,7 +694,7 @@ namespace Org.BouncyCastle.Crypto.Tests return value; } - public static void Main( + public static void MainOld( string[] args) { RunTest(new GcmTest()); diff --git a/crypto/test/src/crypto/test/GMacTest.cs b/crypto/test/src/crypto/test/GMacTest.cs index 383ff96b7..eff351b81 100644 --- a/crypto/test/src/crypto/test/GMacTest.cs +++ b/crypto/test/src/crypto/test/GMacTest.cs @@ -170,7 +170,7 @@ namespace Org.BouncyCastle.Crypto.Tests get { return "GMac"; } } - public static void Main( + public static void MainOld( string[] args) { RunTest(new GMacTest()); diff --git a/crypto/test/src/crypto/test/GOST28147MacTest.cs b/crypto/test/src/crypto/test/GOST28147MacTest.cs index 5f3188f48..e4129ce4f 100644 --- a/crypto/test/src/crypto/test/GOST28147MacTest.cs +++ b/crypto/test/src/crypto/test/GOST28147MacTest.cs @@ -85,7 +85,7 @@ namespace Org.BouncyCastle.Crypto.Tests get { return "Gost28147Mac"; } } - public static void Main( + public static void MainOld( string[] args) { ITest test = new Gost28147MacTest(); diff --git a/crypto/test/src/crypto/test/GOST28147Test.cs b/crypto/test/src/crypto/test/GOST28147Test.cs index 5b6753517..aa5cce281 100644 --- a/crypto/test/src/crypto/test/GOST28147Test.cs +++ b/crypto/test/src/crypto/test/GOST28147Test.cs @@ -314,7 +314,7 @@ namespace Org.BouncyCastle.Crypto.Tests get { return "Gost28147"; } } - public static void Main( + public static void MainOld( string[] args) { ITest test = new Gost28147Test(); diff --git a/crypto/test/src/crypto/test/GOST3410Test.cs b/crypto/test/src/crypto/test/GOST3410Test.cs index f54662770..b43f432b5 100644 --- a/crypto/test/src/crypto/test/GOST3410Test.cs +++ b/crypto/test/src/crypto/test/GOST3410Test.cs @@ -1584,7 +1584,7 @@ namespace Org.BouncyCastle.Crypto.Tests return new SimpleTestResult(true, "Gost3410: Okay"); } - public static void Main( + public static void MainOld( string[] args) { ITest test = new Gost3410Test(); diff --git a/crypto/test/src/crypto/test/GOST3411DigestTest.cs b/crypto/test/src/crypto/test/GOST3411DigestTest.cs index 329a158d6..64494287b 100644 --- a/crypto/test/src/crypto/test/GOST3411DigestTest.cs +++ b/crypto/test/src/crypto/test/GOST3411DigestTest.cs @@ -75,7 +75,7 @@ namespace Org.BouncyCastle.Crypto.Tests return new Gost3411Digest((Gost3411Digest)digest); } - public static void Main( + public static void MainOld( string[] args) { ITest test = new Gost3411DigestTest(); diff --git a/crypto/test/src/crypto/test/HCFamilyTest.cs b/crypto/test/src/crypto/test/HCFamilyTest.cs index 0904bc9eb..f5039ae06 100644 --- a/crypto/test/src/crypto/test/HCFamilyTest.cs +++ b/crypto/test/src/crypto/test/HCFamilyTest.cs @@ -184,7 +184,7 @@ namespace Org.BouncyCastle.Crypto.Tests } } - public static void Main(string[] args) + public static void MainOld(string[] args) { RunTest(new HCFamilyTest()); } diff --git a/crypto/test/src/crypto/test/HCFamilyVecTest.cs b/crypto/test/src/crypto/test/HCFamilyVecTest.cs index 00b0ee75c..5fcaabc90 100644 --- a/crypto/test/src/crypto/test/HCFamilyVecTest.cs +++ b/crypto/test/src/crypto/test/HCFamilyVecTest.cs @@ -168,7 +168,7 @@ namespace Org.BouncyCastle.Crypto.Tests } } - public static void Main( + public static void MainOld( string[] args) { RunTest(new HCFamilyVecTest()); diff --git a/crypto/test/src/crypto/test/HKDFGeneratorTest.cs b/crypto/test/src/crypto/test/HKDFGeneratorTest.cs index d6e2149df..ff9927e17 100644 --- a/crypto/test/src/crypto/test/HKDFGeneratorTest.cs +++ b/crypto/test/src/crypto/test/HKDFGeneratorTest.cs @@ -294,7 +294,7 @@ namespace Org.BouncyCastle.Crypto.Tests get { return "HKDF"; } } - public static void Main(string[] args) + public static void MainOld(string[] args) { RunTest(new HkdfGeneratorTest()); } diff --git a/crypto/test/src/crypto/test/IDEATest.cs b/crypto/test/src/crypto/test/IDEATest.cs index fbbd1ae17..daea4689c 100644 --- a/crypto/test/src/crypto/test/IDEATest.cs +++ b/crypto/test/src/crypto/test/IDEATest.cs @@ -35,7 +35,7 @@ namespace Org.BouncyCastle.Crypto.Tests { } - public static void Main( + public static void MainOld( string[] args) { ITest test = new IdeaTest(); diff --git a/crypto/test/src/crypto/test/ISAACTest.cs b/crypto/test/src/crypto/test/ISAACTest.cs index 1782bbc98..e961aa326 100644 --- a/crypto/test/src/crypto/test/ISAACTest.cs +++ b/crypto/test/src/crypto/test/ISAACTest.cs @@ -180,7 +180,7 @@ namespace Org.BouncyCastle.Crypto.Tests } } - public static void Main( + public static void MainOld( string[] args) { RunTest(new IsaacTest()); diff --git a/crypto/test/src/crypto/test/ISO9796Test.cs b/crypto/test/src/crypto/test/ISO9796Test.cs index 562238bca..6afd1f988 100644 --- a/crypto/test/src/crypto/test/ISO9796Test.cs +++ b/crypto/test/src/crypto/test/ISO9796Test.cs @@ -952,7 +952,7 @@ namespace Org.BouncyCastle.Crypto.Tests DoFullMessageTest(); } - public static void Main( + public static void MainOld( string[] args) { RunTest(new ISO9796Test()); diff --git a/crypto/test/src/crypto/test/ISO9797Alg3MacTest.cs b/crypto/test/src/crypto/test/ISO9797Alg3MacTest.cs index 9d5d8b6b7..e1aa13d0c 100644 --- a/crypto/test/src/crypto/test/ISO9797Alg3MacTest.cs +++ b/crypto/test/src/crypto/test/ISO9797Alg3MacTest.cs @@ -79,7 +79,7 @@ namespace Org.BouncyCastle.Crypto.Tests } } - public static void Main( + public static void MainOld( string[] args) { ISO9797Alg3MacTest test = new ISO9797Alg3MacTest(); diff --git a/crypto/test/src/crypto/test/KDF1GeneratorTest.cs b/crypto/test/src/crypto/test/KDF1GeneratorTest.cs index 89c8d5453..9fb8bf20b 100644 --- a/crypto/test/src/crypto/test/KDF1GeneratorTest.cs +++ b/crypto/test/src/crypto/test/KDF1GeneratorTest.cs @@ -86,7 +86,7 @@ namespace Org.BouncyCastle.Crypto.Tests get { return "KDF1"; } } - public static void Main( + public static void MainOld( string[] args) { RunTest(new Kdf1GeneratorTest()); diff --git a/crypto/test/src/crypto/test/KDF2GeneratorTest.cs b/crypto/test/src/crypto/test/KDF2GeneratorTest.cs index e184e0b40..2eb1fe13a 100644 --- a/crypto/test/src/crypto/test/KDF2GeneratorTest.cs +++ b/crypto/test/src/crypto/test/KDF2GeneratorTest.cs @@ -98,7 +98,7 @@ namespace Org.BouncyCastle.Crypto.Tests get { return "KDF2"; } } - public static void Main( + public static void MainOld( string[] args) { RunTest(new Kdf2GeneratorTest()); diff --git a/crypto/test/src/crypto/test/KeccakDigestTest.cs b/crypto/test/src/crypto/test/KeccakDigestTest.cs index 961a5d2e3..9ae3ee820 100644 --- a/crypto/test/src/crypto/test/KeccakDigestTest.cs +++ b/crypto/test/src/crypto/test/KeccakDigestTest.cs @@ -357,7 +357,7 @@ namespace Org.BouncyCastle.Crypto.Tests return new KeccakDigest((KeccakDigest)digest); } - public static void Main( + public static void MainOld( string[] args) { RunTest(new KeccakDigestTest()); diff --git a/crypto/test/src/crypto/test/MD2DigestTest.cs b/crypto/test/src/crypto/test/MD2DigestTest.cs index 4f4da516b..9af339a7f 100644 --- a/crypto/test/src/crypto/test/MD2DigestTest.cs +++ b/crypto/test/src/crypto/test/MD2DigestTest.cs @@ -50,7 +50,7 @@ namespace Org.BouncyCastle.Crypto.Tests return new MD2Digest((MD2Digest)digest); } - public static void Main( + public static void MainOld( string[] args) { RunTest(new MD2DigestTest()); diff --git a/crypto/test/src/crypto/test/MD4DigestTest.cs b/crypto/test/src/crypto/test/MD4DigestTest.cs index 4fd4e0931..277e00467 100644 --- a/crypto/test/src/crypto/test/MD4DigestTest.cs +++ b/crypto/test/src/crypto/test/MD4DigestTest.cs @@ -42,7 +42,7 @@ namespace Org.BouncyCastle.Crypto.Tests return new MD4Digest((MD4Digest)digest); } - public static void Main( + public static void MainOld( string[] args) { RunTest(new MD4DigestTest()); diff --git a/crypto/test/src/crypto/test/MD5DigestTest.cs b/crypto/test/src/crypto/test/MD5DigestTest.cs index cc914165c..a19b4fcfe 100644 --- a/crypto/test/src/crypto/test/MD5DigestTest.cs +++ b/crypto/test/src/crypto/test/MD5DigestTest.cs @@ -42,7 +42,7 @@ namespace Org.BouncyCastle.Crypto.Tests return new MD5Digest((MD5Digest)digest); } - public static void Main( + public static void MainOld( string[] args) { RunTest(new MD5DigestTest()); diff --git a/crypto/test/src/crypto/test/MD5HMacTest.cs b/crypto/test/src/crypto/test/MD5HMacTest.cs index 101b8be3c..23eb8a69c 100644 --- a/crypto/test/src/crypto/test/MD5HMacTest.cs +++ b/crypto/test/src/crypto/test/MD5HMacTest.cs @@ -71,7 +71,7 @@ namespace Org.BouncyCastle.Crypto.Tests return new SimpleTestResult(true, Name + ": Okay"); } - public static void Main( + public static void MainOld( string[] args) { ITest test = new MD5HMacTest(); diff --git a/crypto/test/src/crypto/test/MGF1GeneratorTest.cs b/crypto/test/src/crypto/test/MGF1GeneratorTest.cs index ee67ffa1c..058daef7c 100644 --- a/crypto/test/src/crypto/test/MGF1GeneratorTest.cs +++ b/crypto/test/src/crypto/test/MGF1GeneratorTest.cs @@ -86,7 +86,7 @@ namespace Org.BouncyCastle.Crypto.Tests get { return "MGF1"; } } - public static void Main( + public static void MainOld( string[] args) { RunTest(new Mgf1GeneratorTest()); diff --git a/crypto/test/src/crypto/test/MacTest.cs b/crypto/test/src/crypto/test/MacTest.cs index 9a58f8a8c..08faa0594 100644 --- a/crypto/test/src/crypto/test/MacTest.cs +++ b/crypto/test/src/crypto/test/MacTest.cs @@ -180,7 +180,7 @@ namespace Org.BouncyCastle.Crypto.Tests return new SimpleTestResult(true, Name + ": Okay"); } - public static void Main( + public static void MainOld( string[] args) { MacTest test = new MacTest(); diff --git a/crypto/test/src/crypto/test/ModeTest.cs b/crypto/test/src/crypto/test/ModeTest.cs index c67dce094..84b334d5e 100644 --- a/crypto/test/src/crypto/test/ModeTest.cs +++ b/crypto/test/src/crypto/test/ModeTest.cs @@ -88,7 +88,7 @@ namespace Org.BouncyCastle.Crypto.Tests return new SimpleTestResult(true, Name + ": Okay"); } - public static void Main( + public static void MainOld( string[] args) { ITest test = new ModeTest(); diff --git a/crypto/test/src/crypto/test/NaccacheSternTest.cs b/crypto/test/src/crypto/test/NaccacheSternTest.cs index 9168adced..85d315e44 100644 --- a/crypto/test/src/crypto/test/NaccacheSternTest.cs +++ b/crypto/test/src/crypto/test/NaccacheSternTest.cs @@ -339,7 +339,7 @@ namespace Org.BouncyCastle.Crypto.Tests Assert.AreEqual(Name + ": Okay", resultText); } - public static void Main( + public static void MainOld( string[] args) { ITest test = new NaccacheSternTest(); diff --git a/crypto/test/src/crypto/test/NoekeonTest.cs b/crypto/test/src/crypto/test/NoekeonTest.cs index b6fff70ce..b23fa4b30 100644 --- a/crypto/test/src/crypto/test/NoekeonTest.cs +++ b/crypto/test/src/crypto/test/NoekeonTest.cs @@ -42,7 +42,7 @@ namespace Org.BouncyCastle.Crypto.Tests get { return "Noekeon"; } } - public static void Main( + public static void MainOld( string[] args) { RunTest(new NoekeonTest()); diff --git a/crypto/test/src/crypto/test/NonMemoableDigestTest.cs b/crypto/test/src/crypto/test/NonMemoableDigestTest.cs index e6b329e88..66428f25e 100644 --- a/crypto/test/src/crypto/test/NonMemoableDigestTest.cs +++ b/crypto/test/src/crypto/test/NonMemoableDigestTest.cs @@ -102,7 +102,7 @@ namespace Org.BouncyCastle.Crypto.Tests } } - public static void Main( + public static void MainOld( string[] args) { RunTest(new NonMemoableDigestTest()); diff --git a/crypto/test/src/crypto/test/NullTest.cs b/crypto/test/src/crypto/test/NullTest.cs index 16a51808f..76bfbf90f 100644 --- a/crypto/test/src/crypto/test/NullTest.cs +++ b/crypto/test/src/crypto/test/NullTest.cs @@ -71,7 +71,7 @@ namespace Org.BouncyCastle.Crypto.Tests } } - public static void Main( + public static void MainOld( string[] args) { RunTest(new NullTest()); diff --git a/crypto/test/src/crypto/test/OAEPTest.cs b/crypto/test/src/crypto/test/OAEPTest.cs index ee48a183d..437ee7484 100644 --- a/crypto/test/src/crypto/test/OAEPTest.cs +++ b/crypto/test/src/crypto/test/OAEPTest.cs @@ -781,7 +781,7 @@ namespace Org.BouncyCastle.Crypto.Tests OaepVecTest(1027, 6, pubParam, privParam, seed_1027_6, input_1027_6, output_1027_6); } - public static void Main( + public static void MainOld( string[] args) { RunTest(new OaepTest()); diff --git a/crypto/test/src/crypto/test/OCBTest.cs b/crypto/test/src/crypto/test/OCBTest.cs index 9f898fbe2..5e141da3a 100644 --- a/crypto/test/src/crypto/test/OCBTest.cs +++ b/crypto/test/src/crypto/test/OCBTest.cs @@ -498,7 +498,7 @@ namespace Org.BouncyCastle.Crypto.Tests return value; } - public static void Main( + public static void MainOld( string[] args) { RunTest(new OcbTest()); diff --git a/crypto/test/src/crypto/test/OpenBsdBCryptTest.cs b/crypto/test/src/crypto/test/OpenBsdBCryptTest.cs index 8501588ee..bf10fe144 100644 --- a/crypto/test/src/crypto/test/OpenBsdBCryptTest.cs +++ b/crypto/test/src/crypto/test/OpenBsdBCryptTest.cs @@ -131,7 +131,7 @@ namespace Org.BouncyCastle.Crypto.Tests } } - public static void Main(string[] args) + public static void MainOld(string[] args) { RunTest(new OpenBsdBCryptTest()); } diff --git a/crypto/test/src/crypto/test/PSSBlindTest.cs b/crypto/test/src/crypto/test/PSSBlindTest.cs index d887a8f08..b886bbf53 100644 --- a/crypto/test/src/crypto/test/PSSBlindTest.cs +++ b/crypto/test/src/crypto/test/PSSBlindTest.cs @@ -382,7 +382,7 @@ namespace Org.BouncyCastle.Crypto.Tests } } - public static void Main( + public static void MainOld( string[] args) { RunTest(new PssBlindTest()); diff --git a/crypto/test/src/crypto/test/PSSTest.cs b/crypto/test/src/crypto/test/PSSTest.cs index 8578d254f..e85738f37 100644 --- a/crypto/test/src/crypto/test/PSSTest.cs +++ b/crypto/test/src/crypto/test/PSSTest.cs @@ -357,7 +357,7 @@ namespace Org.BouncyCastle.Crypto.Tests } } - public static void Main( + public static void MainOld( string[] args) { RunTest(new PssTest()); diff --git a/crypto/test/src/crypto/test/PaddingTest.cs b/crypto/test/src/crypto/test/PaddingTest.cs index ed53d9228..e01e56ccb 100644 --- a/crypto/test/src/crypto/test/PaddingTest.cs +++ b/crypto/test/src/crypto/test/PaddingTest.cs @@ -152,7 +152,7 @@ namespace Org.BouncyCastle.Crypto.Tests get { return "PaddingTest"; } } - public static void Main( + public static void MainOld( string[] args) { RunTest(new PaddingTest()); diff --git a/crypto/test/src/crypto/test/Pkcs12Test.cs b/crypto/test/src/crypto/test/Pkcs12Test.cs index 29d5a3942..b5eac07e9 100644 --- a/crypto/test/src/crypto/test/Pkcs12Test.cs +++ b/crypto/test/src/crypto/test/Pkcs12Test.cs @@ -84,7 +84,7 @@ namespace Org.BouncyCastle.Crypto.Tests Run3(10, password2, Hex.Decode("263216FCC2FAB31C"), 1000, Hex.Decode("5EC4C7A80DF652294C3925B6489A7AB857C83476")); } - public static void Main( + public static void MainOld( string[] args) { RunTest(new Pkcs12Test()); diff --git a/crypto/test/src/crypto/test/Pkcs5Test.cs b/crypto/test/src/crypto/test/Pkcs5Test.cs index fdf1e7a66..8147da263 100644 --- a/crypto/test/src/crypto/test/Pkcs5Test.cs +++ b/crypto/test/src/crypto/test/Pkcs5Test.cs @@ -218,7 +218,7 @@ namespace Org.BouncyCastle.Crypto.Tests } } - public static void Main( + public static void MainOld( string[] args) { RunTest(new Pkcs5Test()); diff --git a/crypto/test/src/crypto/test/Poly1305Test.cs b/crypto/test/src/crypto/test/Poly1305Test.cs index 17c4289aa..eee9bcca5 100644 --- a/crypto/test/src/crypto/test/Poly1305Test.cs +++ b/crypto/test/src/crypto/test/Poly1305Test.cs @@ -493,7 +493,7 @@ namespace Org.BouncyCastle.Crypto.Tests } } - public static void Main( + public static void MainOld( string[] args) { RunTest(new Poly1305Test()); diff --git a/crypto/test/src/crypto/test/RC2Test.cs b/crypto/test/src/crypto/test/RC2Test.cs index 177c1817d..8b1e16fc4 100644 --- a/crypto/test/src/crypto/test/RC2Test.cs +++ b/crypto/test/src/crypto/test/RC2Test.cs @@ -38,7 +38,7 @@ namespace Org.BouncyCastle.Crypto.Tests { } - public static void Main( + public static void MainOld( string[] args) { ITest test = new RC2Test(); diff --git a/crypto/test/src/crypto/test/RC2WrapTest.cs b/crypto/test/src/crypto/test/RC2WrapTest.cs index fc27acd2c..f18e623cd 100644 --- a/crypto/test/src/crypto/test/RC2WrapTest.cs +++ b/crypto/test/src/crypto/test/RC2WrapTest.cs @@ -103,7 +103,7 @@ namespace Org.BouncyCastle.Crypto.Tests get { return "RC2Wrap"; } } - public static void Main( + public static void MainOld( string[] args) { ITest test = new RC2WrapTest(); diff --git a/crypto/test/src/crypto/test/RC4Test.cs b/crypto/test/src/crypto/test/RC4Test.cs index 7c1ac9162..0994cbee6 100644 --- a/crypto/test/src/crypto/test/RC4Test.cs +++ b/crypto/test/src/crypto/test/RC4Test.cs @@ -39,7 +39,7 @@ namespace Org.BouncyCastle.Crypto.Tests return new SimpleTestResult(true, Name + ": Okay"); } - public static void Main( + public static void MainOld( string[] args) { ITest test = new RC4Test(); diff --git a/crypto/test/src/crypto/test/RC5Test.cs b/crypto/test/src/crypto/test/RC5Test.cs index e50878a0e..1a408d9a9 100644 --- a/crypto/test/src/crypto/test/RC5Test.cs +++ b/crypto/test/src/crypto/test/RC5Test.cs @@ -181,7 +181,7 @@ namespace Org.BouncyCastle.Crypto.Tests return new SimpleTestResult(true, Name + ": Okay"); } - public static void Main( + public static void MainOld( string[] args) { RC5Test test = new RC5Test(); diff --git a/crypto/test/src/crypto/test/RC6Test.cs b/crypto/test/src/crypto/test/RC6Test.cs index 4f59ec4e9..b95528fa5 100644 --- a/crypto/test/src/crypto/test/RC6Test.cs +++ b/crypto/test/src/crypto/test/RC6Test.cs @@ -34,7 +34,7 @@ namespace Org.BouncyCastle.Crypto.Tests { } - public static void Main( + public static void MainOld( string[] args) { ITest test = new RC6Test(); diff --git a/crypto/test/src/crypto/test/RFC3211WrapTest.cs b/crypto/test/src/crypto/test/RFC3211WrapTest.cs index bdef7c999..c129bc896 100644 --- a/crypto/test/src/crypto/test/RFC3211WrapTest.cs +++ b/crypto/test/src/crypto/test/RFC3211WrapTest.cs @@ -199,7 +199,7 @@ namespace Org.BouncyCastle.Crypto.Tests } } - public static void Main( + public static void MainOld( string[] args) { RunTest(new Rfc3211WrapTest()); diff --git a/crypto/test/src/crypto/test/RSABlindedTest.cs b/crypto/test/src/crypto/test/RSABlindedTest.cs index 80d6e8e49..d90a9973b 100644 --- a/crypto/test/src/crypto/test/RSABlindedTest.cs +++ b/crypto/test/src/crypto/test/RSABlindedTest.cs @@ -429,7 +429,7 @@ namespace Org.BouncyCastle.Crypto.Tests } } - public static void Main( + public static void MainOld( string[] args) { ITest test = new RsaBlindedTest(); diff --git a/crypto/test/src/crypto/test/RegressionTest.cs b/crypto/test/src/crypto/test/RegressionTest.cs index ba6c341d4..60c9d0f8f 100644 --- a/crypto/test/src/crypto/test/RegressionTest.cs +++ b/crypto/test/src/crypto/test/RegressionTest.cs @@ -130,7 +130,7 @@ namespace Org.BouncyCastle.Crypto.Tests new ShakeDigestTest(), }; - public static void Main(string[] args) + public static void MainOld(string[] args) { foreach (ITest test in tests) { diff --git a/crypto/test/src/crypto/test/RijndaelTest.cs b/crypto/test/src/crypto/test/RijndaelTest.cs index f714c83eb..dc94a33af 100644 --- a/crypto/test/src/crypto/test/RijndaelTest.cs +++ b/crypto/test/src/crypto/test/RijndaelTest.cs @@ -114,7 +114,7 @@ namespace Org.BouncyCastle.Crypto.Tests get { return "Rijndael"; } } - public static void Main( + public static void MainOld( string[] args) { ITest test = new RijndaelTest(); diff --git a/crypto/test/src/crypto/test/RipeMD128DigestTest.cs b/crypto/test/src/crypto/test/RipeMD128DigestTest.cs index ead4f06ad..6ef60e3e3 100644 --- a/crypto/test/src/crypto/test/RipeMD128DigestTest.cs +++ b/crypto/test/src/crypto/test/RipeMD128DigestTest.cs @@ -57,7 +57,7 @@ namespace Org.BouncyCastle.Crypto.Tests return new RipeMD128Digest((RipeMD128Digest)digest); } - public static void Main( + public static void MainOld( string[] args) { RunTest(new RipeMD128DigestTest()); diff --git a/crypto/test/src/crypto/test/RipeMD128HMacTest.cs b/crypto/test/src/crypto/test/RipeMD128HMacTest.cs index 2f6a2d979..84e035124 100644 --- a/crypto/test/src/crypto/test/RipeMD128HMacTest.cs +++ b/crypto/test/src/crypto/test/RipeMD128HMacTest.cs @@ -80,7 +80,7 @@ namespace Org.BouncyCastle.Crypto.Tests return new SimpleTestResult(true, Name + ": Okay"); } - public static void Main( + public static void MainOld( string[] args) { ITest test = new RipeMD128HMacTest(); diff --git a/crypto/test/src/crypto/test/RipeMD160DigestTest.cs b/crypto/test/src/crypto/test/RipeMD160DigestTest.cs index 15e53f2a0..62aba33dd 100644 --- a/crypto/test/src/crypto/test/RipeMD160DigestTest.cs +++ b/crypto/test/src/crypto/test/RipeMD160DigestTest.cs @@ -57,7 +57,7 @@ namespace Org.BouncyCastle.Crypto.Tests return new RipeMD160Digest((RipeMD160Digest)digest); } - public static void Main( + public static void MainOld( string[] args) { RunTest(new RipeMD160DigestTest()); diff --git a/crypto/test/src/crypto/test/RipeMD160HMacTest.cs b/crypto/test/src/crypto/test/RipeMD160HMacTest.cs index cc87a535f..2ddb2c7a3 100644 --- a/crypto/test/src/crypto/test/RipeMD160HMacTest.cs +++ b/crypto/test/src/crypto/test/RipeMD160HMacTest.cs @@ -81,7 +81,7 @@ namespace Org.BouncyCastle.Crypto.Tests return new SimpleTestResult(true, Name + ": Okay"); } - public static void Main( + public static void MainOld( string[] args) { ITest test = new RipeMD160HMacTest(); diff --git a/crypto/test/src/crypto/test/RipeMD256DigestTest.cs b/crypto/test/src/crypto/test/RipeMD256DigestTest.cs index 5b3e6b10b..5a8a083c8 100644 --- a/crypto/test/src/crypto/test/RipeMD256DigestTest.cs +++ b/crypto/test/src/crypto/test/RipeMD256DigestTest.cs @@ -57,7 +57,7 @@ namespace Org.BouncyCastle.Crypto.Tests return new RipeMD256Digest((RipeMD256Digest)digest); } - public static void Main( + public static void MainOld( string[] args) { RunTest(new RipeMD256DigestTest()); diff --git a/crypto/test/src/crypto/test/RipeMD320DigestTest.cs b/crypto/test/src/crypto/test/RipeMD320DigestTest.cs index 047d68aa7..249c1aa9c 100644 --- a/crypto/test/src/crypto/test/RipeMD320DigestTest.cs +++ b/crypto/test/src/crypto/test/RipeMD320DigestTest.cs @@ -57,7 +57,7 @@ namespace Org.BouncyCastle.Crypto.Tests return new RipeMD320Digest((RipeMD320Digest)digest); } - public static void Main( + public static void MainOld( string[] args) { RunTest(new RipeMD320DigestTest()); diff --git a/crypto/test/src/crypto/test/RsaTest.cs b/crypto/test/src/crypto/test/RsaTest.cs index c343f0ba5..c512da16f 100644 --- a/crypto/test/src/crypto/test/RsaTest.cs +++ b/crypto/test/src/crypto/test/RsaTest.cs @@ -576,7 +576,7 @@ namespace Org.BouncyCastle.Crypto.Tests } } - public static void Main( + public static void MainOld( string[] args) { ITest test = new RsaTest(); diff --git a/crypto/test/src/crypto/test/SCryptTest.cs b/crypto/test/src/crypto/test/SCryptTest.cs index c055ab718..796c973f5 100644 --- a/crypto/test/src/crypto/test/SCryptTest.cs +++ b/crypto/test/src/crypto/test/SCryptTest.cs @@ -86,7 +86,7 @@ namespace Org.BouncyCastle.Crypto.Tests return int.Parse(arg.Trim()); } - public static void Main( + public static void MainOld( string[] args) { RunTest(new SCryptTest()); diff --git a/crypto/test/src/crypto/test/SEEDTest.cs b/crypto/test/src/crypto/test/SEEDTest.cs index 2fcb242cc..230e16c61 100644 --- a/crypto/test/src/crypto/test/SEEDTest.cs +++ b/crypto/test/src/crypto/test/SEEDTest.cs @@ -48,7 +48,7 @@ namespace Org.BouncyCastle.Crypto.Tests get { return "SEED"; } } - public static void Main( + public static void MainOld( string[] args) { RunTest(new SeedTest()); diff --git a/crypto/test/src/crypto/test/SHA1DigestTest.cs b/crypto/test/src/crypto/test/SHA1DigestTest.cs index 318035b0c..0da6f4173 100644 --- a/crypto/test/src/crypto/test/SHA1DigestTest.cs +++ b/crypto/test/src/crypto/test/SHA1DigestTest.cs @@ -40,7 +40,7 @@ namespace Org.BouncyCastle.Crypto.Tests return new Sha1Digest((Sha1Digest)digest); } - public static void Main( + public static void MainOld( string[] args) { RunTest(new Sha1DigestTest()); diff --git a/crypto/test/src/crypto/test/SHA1HMacTest.cs b/crypto/test/src/crypto/test/SHA1HMacTest.cs index 865f5b58b..f7d7ffba4 100644 --- a/crypto/test/src/crypto/test/SHA1HMacTest.cs +++ b/crypto/test/src/crypto/test/SHA1HMacTest.cs @@ -73,7 +73,7 @@ namespace Org.BouncyCastle.Crypto.Tests return new SimpleTestResult(true, Name + ": Okay"); } - public static void Main( + public static void MainOld( string[] args) { ITest test = new Sha1HMacTest(); diff --git a/crypto/test/src/crypto/test/SHA224DigestTest.cs b/crypto/test/src/crypto/test/SHA224DigestTest.cs index 9469b651b..5d6ee1267 100644 --- a/crypto/test/src/crypto/test/SHA224DigestTest.cs +++ b/crypto/test/src/crypto/test/SHA224DigestTest.cs @@ -53,7 +53,7 @@ namespace Org.BouncyCastle.Crypto.Tests return new Sha224Digest((Sha224Digest)digest); } - public static void Main( + public static void MainOld( string[] args) { RunTest(new Sha224DigestTest()); diff --git a/crypto/test/src/crypto/test/SHA224HMacTest.cs b/crypto/test/src/crypto/test/SHA224HMacTest.cs index 06c6ea1cb..8cf0bec86 100644 --- a/crypto/test/src/crypto/test/SHA224HMacTest.cs +++ b/crypto/test/src/crypto/test/SHA224HMacTest.cs @@ -102,7 +102,7 @@ namespace Org.BouncyCastle.Crypto.Tests return new SimpleTestResult(true, Name + ": Okay"); } - public static void Main( + public static void MainOld( string[] args) { ITest test = new Sha224HMacTest(); diff --git a/crypto/test/src/crypto/test/SHA256DigestTest.cs b/crypto/test/src/crypto/test/SHA256DigestTest.cs index d2ae89e56..aa5589d42 100644 --- a/crypto/test/src/crypto/test/SHA256DigestTest.cs +++ b/crypto/test/src/crypto/test/SHA256DigestTest.cs @@ -54,7 +54,7 @@ namespace Org.BouncyCastle.Crypto.Tests return new Sha256Digest((Sha256Digest)digest); } - public static void Main( + public static void MainOld( string[] args) { RunTest(new Sha256DigestTest()); diff --git a/crypto/test/src/crypto/test/SHA256HMacTest.cs b/crypto/test/src/crypto/test/SHA256HMacTest.cs index a9016af21..103bdf1c8 100644 --- a/crypto/test/src/crypto/test/SHA256HMacTest.cs +++ b/crypto/test/src/crypto/test/SHA256HMacTest.cs @@ -102,7 +102,7 @@ namespace Org.BouncyCastle.Crypto.Tests return new SimpleTestResult(true, Name + ": Okay"); } - public static void Main( + public static void MainOld( string[] args) { ITest test = new Sha256HMacTest(); diff --git a/crypto/test/src/crypto/test/SHA384DigestTest.cs b/crypto/test/src/crypto/test/SHA384DigestTest.cs index 99363ac5a..d98ed19dc 100644 --- a/crypto/test/src/crypto/test/SHA384DigestTest.cs +++ b/crypto/test/src/crypto/test/SHA384DigestTest.cs @@ -53,7 +53,7 @@ namespace Org.BouncyCastle.Crypto.Tests return new Sha384Digest((Sha384Digest)digest); } - public static void Main( + public static void MainOld( string[] args) { RunTest(new Sha384DigestTest()); diff --git a/crypto/test/src/crypto/test/SHA384HMacTest.cs b/crypto/test/src/crypto/test/SHA384HMacTest.cs index 0caba12c4..0b6d17256 100644 --- a/crypto/test/src/crypto/test/SHA384HMacTest.cs +++ b/crypto/test/src/crypto/test/SHA384HMacTest.cs @@ -102,7 +102,7 @@ namespace Org.BouncyCastle.Crypto.Tests return new SimpleTestResult(true, Name + ": Okay"); } - public static void Main( + public static void MainOld( string[] args) { ITest test = new Sha384HMacTest(); diff --git a/crypto/test/src/crypto/test/SHA3DigestTest.cs b/crypto/test/src/crypto/test/SHA3DigestTest.cs index 71f51f43b..8faf184f9 100644 --- a/crypto/test/src/crypto/test/SHA3DigestTest.cs +++ b/crypto/test/src/crypto/test/SHA3DigestTest.cs @@ -229,7 +229,7 @@ namespace Org.BouncyCastle.Crypto.Tests return s; } - public static void Main( + public static void MainOld( string[] args) { RunTest(new Sha3DigestTest()); diff --git a/crypto/test/src/crypto/test/SHA512DigestTest.cs b/crypto/test/src/crypto/test/SHA512DigestTest.cs index d4f56e15e..c2020e82e 100644 --- a/crypto/test/src/crypto/test/SHA512DigestTest.cs +++ b/crypto/test/src/crypto/test/SHA512DigestTest.cs @@ -53,7 +53,7 @@ namespace Org.BouncyCastle.Crypto.Tests return new Sha512Digest((Sha512Digest)digest); } - public static void Main( + public static void MainOld( string[] args) { RunTest(new Sha512DigestTest()); diff --git a/crypto/test/src/crypto/test/SHA512HMacTest.cs b/crypto/test/src/crypto/test/SHA512HMacTest.cs index c091a7220..b42080e89 100644 --- a/crypto/test/src/crypto/test/SHA512HMacTest.cs +++ b/crypto/test/src/crypto/test/SHA512HMacTest.cs @@ -103,7 +103,7 @@ namespace Org.BouncyCastle.Crypto.Tests return new SimpleTestResult(true, Name + ": Okay"); } - public static void Main( + public static void MainOld( string[] args) { ITest test = new Sha512HMacTest(); diff --git a/crypto/test/src/crypto/test/SHA512t224DigestTest.cs b/crypto/test/src/crypto/test/SHA512t224DigestTest.cs index a3d68e1ab..81ef2498c 100644 --- a/crypto/test/src/crypto/test/SHA512t224DigestTest.cs +++ b/crypto/test/src/crypto/test/SHA512t224DigestTest.cs @@ -53,7 +53,7 @@ namespace Org.BouncyCastle.Crypto.Tests return new Sha512tDigest((Sha512tDigest)digest); } - public static void Main( + public static void MainOld( string[] args) { RunTest(new Sha512t224DigestTest()); diff --git a/crypto/test/src/crypto/test/SHA512t256DigestTest.cs b/crypto/test/src/crypto/test/SHA512t256DigestTest.cs index c957aa660..fec453a22 100644 --- a/crypto/test/src/crypto/test/SHA512t256DigestTest.cs +++ b/crypto/test/src/crypto/test/SHA512t256DigestTest.cs @@ -53,7 +53,7 @@ namespace Org.BouncyCastle.Crypto.Tests return new Sha512tDigest((Sha512tDigest)digest); } - public static void Main( + public static void MainOld( string[] args) { RunTest(new Sha512t256DigestTest()); diff --git a/crypto/test/src/crypto/test/SM3DigestTest.cs b/crypto/test/src/crypto/test/SM3DigestTest.cs index 113789897..c8b8f2ec9 100644 --- a/crypto/test/src/crypto/test/SM3DigestTest.cs +++ b/crypto/test/src/crypto/test/SM3DigestTest.cs @@ -57,7 +57,7 @@ namespace Org.BouncyCastle.Crypto.Tests return new SM3Digest((SM3Digest)digest); } - public static void Main( + public static void MainOld( string[] args) { RunTest(new SM3DigestTest()); diff --git a/crypto/test/src/crypto/test/SRP6Test.cs b/crypto/test/src/crypto/test/SRP6Test.cs index 6b64df924..643319a3f 100644 --- a/crypto/test/src/crypto/test/SRP6Test.cs +++ b/crypto/test/src/crypto/test/SRP6Test.cs @@ -242,7 +242,7 @@ namespace Org.BouncyCastle.Crypto.Tests } } - public static void Main(string[] args) + public static void MainOld(string[] args) { RunTest(new Srp6Test()); } diff --git a/crypto/test/src/crypto/test/Salsa20Test.cs b/crypto/test/src/crypto/test/Salsa20Test.cs index b4dc1ef2b..be7d44519 100644 --- a/crypto/test/src/crypto/test/Salsa20Test.cs +++ b/crypto/test/src/crypto/test/Salsa20Test.cs @@ -301,7 +301,7 @@ namespace Org.BouncyCastle.Crypto.Tests } } - public static void Main( + public static void MainOld( string[] args) { RunTest(new Salsa20Test()); diff --git a/crypto/test/src/crypto/test/SerpentTest.cs b/crypto/test/src/crypto/test/SerpentTest.cs index 08dbda591..b2b2dda7d 100644 --- a/crypto/test/src/crypto/test/SerpentTest.cs +++ b/crypto/test/src/crypto/test/SerpentTest.cs @@ -134,7 +134,7 @@ namespace Org.BouncyCastle.Crypto.Tests get { return "Serpent"; } } - public static void Main(string[] args) + public static void MainOld(string[] args) { RunTest(new SerpentTest()); } diff --git a/crypto/test/src/crypto/test/ShakeDigestTest.cs b/crypto/test/src/crypto/test/ShakeDigestTest.cs index d8b2d55d6..e200741b5 100644 --- a/crypto/test/src/crypto/test/ShakeDigestTest.cs +++ b/crypto/test/src/crypto/test/ShakeDigestTest.cs @@ -277,7 +277,7 @@ namespace Org.BouncyCastle.Crypto.Tests return s; } - public static void Main( + public static void MainOld( string[] args) { RunTest(new ShakeDigestTest()); diff --git a/crypto/test/src/crypto/test/ShortenedDigestTest.cs b/crypto/test/src/crypto/test/ShortenedDigestTest.cs index 4956b5b39..c2b59c1bb 100644 --- a/crypto/test/src/crypto/test/ShortenedDigestTest.cs +++ b/crypto/test/src/crypto/test/ShortenedDigestTest.cs @@ -81,7 +81,7 @@ namespace Org.BouncyCastle.Crypto.Tests get { return "ShortenedDigest"; } } - public static void Main( + public static void MainOld( string[] args) { RunTest(new ShortenedDigestTest()); diff --git a/crypto/test/src/crypto/test/SipHashTest.cs b/crypto/test/src/crypto/test/SipHashTest.cs index 82dfce82c..97a1dd874 100644 --- a/crypto/test/src/crypto/test/SipHashTest.cs +++ b/crypto/test/src/crypto/test/SipHashTest.cs @@ -140,7 +140,7 @@ namespace Org.BouncyCastle.Crypto.Tests } } - public static void Main(string[] args) + public static void MainOld(string[] args) { RunTest(new SipHashTest()); } diff --git a/crypto/test/src/crypto/test/SkeinDigestTest.cs b/crypto/test/src/crypto/test/SkeinDigestTest.cs index b6f1c542b..b38de9159 100644 --- a/crypto/test/src/crypto/test/SkeinDigestTest.cs +++ b/crypto/test/src/crypto/test/SkeinDigestTest.cs @@ -285,7 +285,7 @@ namespace Org.BouncyCastle.Crypto.Tests // } } - public static void Main( + public static void MainOld( string[] args) { RunTest(new SkeinDigestTest()); diff --git a/crypto/test/src/crypto/test/SkeinMacTest.cs b/crypto/test/src/crypto/test/SkeinMacTest.cs index 852c3b2c7..5e68a1931 100644 --- a/crypto/test/src/crypto/test/SkeinMacTest.cs +++ b/crypto/test/src/crypto/test/SkeinMacTest.cs @@ -156,7 +156,7 @@ namespace Org.BouncyCastle.Crypto.Tests } - public static void Main( + public static void MainOld( string[] args) { RunTest(new SkeinMacTest()); diff --git a/crypto/test/src/crypto/test/SkipjackTest.cs b/crypto/test/src/crypto/test/SkipjackTest.cs index d9fe6e4b4..a8ec2d907 100644 --- a/crypto/test/src/crypto/test/SkipjackTest.cs +++ b/crypto/test/src/crypto/test/SkipjackTest.cs @@ -26,7 +26,7 @@ namespace Org.BouncyCastle.Crypto.Tests { } - public static void Main( + public static void MainOld( string[] args) { ITest test = new SkipjackTest(); diff --git a/crypto/test/src/crypto/test/StreamCipherResetTest.cs b/crypto/test/src/crypto/test/StreamCipherResetTest.cs index 49760a24b..2692ff0b4 100644 --- a/crypto/test/src/crypto/test/StreamCipherResetTest.cs +++ b/crypto/test/src/crypto/test/StreamCipherResetTest.cs @@ -118,7 +118,7 @@ namespace Org.BouncyCastle.Crypto.Tests } } - public static void Main(string[] args) + public static void MainOld(string[] args) { RunTest(new StreamCipherResetTest()); } diff --git a/crypto/test/src/crypto/test/TEATest.cs b/crypto/test/src/crypto/test/TEATest.cs index 525941dbf..3c8a9ef80 100644 --- a/crypto/test/src/crypto/test/TEATest.cs +++ b/crypto/test/src/crypto/test/TEATest.cs @@ -42,7 +42,7 @@ namespace Org.BouncyCastle.Crypto.Tests get { return "TEA"; } } - public static void Main( + public static void MainOld( string[] args) { RunTest(new TeaTest()); diff --git a/crypto/test/src/crypto/test/Threefish1024Test.cs b/crypto/test/src/crypto/test/Threefish1024Test.cs index 64f9aa29f..01d2761d0 100644 --- a/crypto/test/src/crypto/test/Threefish1024Test.cs +++ b/crypto/test/src/crypto/test/Threefish1024Test.cs @@ -57,7 +57,7 @@ namespace Org.BouncyCastle.Crypto.Tests get { return "Threefish-1024"; } } - public static void Main( + public static void MainOld( string[] args) { RunTest(new Threefish1024Test()); diff --git a/crypto/test/src/crypto/test/Threefish256Test.cs b/crypto/test/src/crypto/test/Threefish256Test.cs index e44299a31..863f5de40 100644 --- a/crypto/test/src/crypto/test/Threefish256Test.cs +++ b/crypto/test/src/crypto/test/Threefish256Test.cs @@ -42,7 +42,7 @@ namespace Org.BouncyCastle.Crypto.Tests get { return "Threefish-256"; } } - public static void Main( + public static void MainOld( string[] args) { RunTest(new Threefish256Test()); diff --git a/crypto/test/src/crypto/test/Threefish512Test.cs b/crypto/test/src/crypto/test/Threefish512Test.cs index 8f4ec6345..4d9b18395 100644 --- a/crypto/test/src/crypto/test/Threefish512Test.cs +++ b/crypto/test/src/crypto/test/Threefish512Test.cs @@ -47,7 +47,7 @@ namespace Org.BouncyCastle.Crypto.Tests get { return "Threefish-512"; } } - public static void Main( + public static void MainOld( string[] args) { RunTest(new Threefish512Test()); diff --git a/crypto/test/src/crypto/test/TigerDigestTest.cs b/crypto/test/src/crypto/test/TigerDigestTest.cs index b351c4b5e..bedcb242b 100644 --- a/crypto/test/src/crypto/test/TigerDigestTest.cs +++ b/crypto/test/src/crypto/test/TigerDigestTest.cs @@ -65,7 +65,7 @@ namespace Org.BouncyCastle.Crypto.Tests return new TigerDigest((TigerDigest)digest); } - public static void Main( + public static void MainOld( string[] args) { RunTest(new TigerDigestTest()); diff --git a/crypto/test/src/crypto/test/TnepresTest.cs b/crypto/test/src/crypto/test/TnepresTest.cs index 07308dbff..34407790a 100644 --- a/crypto/test/src/crypto/test/TnepresTest.cs +++ b/crypto/test/src/crypto/test/TnepresTest.cs @@ -139,7 +139,7 @@ namespace Org.BouncyCastle.Crypto.Tests get { return "Tnepres"; } } - public static void Main(string[] args) + public static void MainOld(string[] args) { RunTest(new TnepresTest()); } diff --git a/crypto/test/src/crypto/test/TwofishTest.cs b/crypto/test/src/crypto/test/TwofishTest.cs index 9425d2e60..c6efe5707 100644 --- a/crypto/test/src/crypto/test/TwofishTest.cs +++ b/crypto/test/src/crypto/test/TwofishTest.cs @@ -34,7 +34,7 @@ namespace Org.BouncyCastle.Crypto.Tests { } - public static void Main( + public static void MainOld( string[] args) { ITest test = new TwofishTest(); diff --git a/crypto/test/src/crypto/test/VMPCKSA3Test.cs b/crypto/test/src/crypto/test/VMPCKSA3Test.cs index a25105b77..d0c87d596 100644 --- a/crypto/test/src/crypto/test/VMPCKSA3Test.cs +++ b/crypto/test/src/crypto/test/VMPCKSA3Test.cs @@ -95,7 +95,7 @@ namespace Org.BouncyCastle.Crypto.Tests return output; } - public static void Main( + public static void MainOld( string[] args) { RunTest(new VmpcKsa3Test()); diff --git a/crypto/test/src/crypto/test/VMPCMacTest.cs b/crypto/test/src/crypto/test/VMPCMacTest.cs index b9a5e3a93..68fe4c7c7 100644 --- a/crypto/test/src/crypto/test/VMPCMacTest.cs +++ b/crypto/test/src/crypto/test/VMPCMacTest.cs @@ -20,7 +20,7 @@ namespace Org.BouncyCastle.Crypto.Tests get { return "VMPC-MAC"; } } - public static void Main( + public static void MainOld( string[] args) { RunTest(new VmpcMacTest()); diff --git a/crypto/test/src/crypto/test/VMPCTest.cs b/crypto/test/src/crypto/test/VMPCTest.cs index 6186c4733..72ec75814 100644 --- a/crypto/test/src/crypto/test/VMPCTest.cs +++ b/crypto/test/src/crypto/test/VMPCTest.cs @@ -95,7 +95,7 @@ namespace Org.BouncyCastle.Crypto.Tests return output; } - public static void Main( + public static void MainOld( string[] args) { RunTest(new VmpcTest()); diff --git a/crypto/test/src/crypto/test/WhirlpoolDigestTest.cs b/crypto/test/src/crypto/test/WhirlpoolDigestTest.cs index 1445b8977..45b1b2636 100644 --- a/crypto/test/src/crypto/test/WhirlpoolDigestTest.cs +++ b/crypto/test/src/crypto/test/WhirlpoolDigestTest.cs @@ -102,7 +102,7 @@ namespace Org.BouncyCastle.Crypto.Tests return new WhirlpoolDigest((WhirlpoolDigest)digest); } - public static void Main( + public static void MainOld( string[] args) { RunTest(new WhirlpoolDigestTest()); diff --git a/crypto/test/src/crypto/test/X931SignerTest.cs b/crypto/test/src/crypto/test/X931SignerTest.cs index d03cbc8e4..e34fe1349 100644 --- a/crypto/test/src/crypto/test/X931SignerTest.cs +++ b/crypto/test/src/crypto/test/X931SignerTest.cs @@ -129,7 +129,7 @@ namespace Org.BouncyCastle.Crypto.Tests } } - public static void Main(string[] args) + public static void MainOld(string[] args) { RunTest(new X931SignerTest()); } diff --git a/crypto/test/src/crypto/test/XSalsa20Test.cs b/crypto/test/src/crypto/test/XSalsa20Test.cs index 74ed04e88..7b7cd96c4 100644 --- a/crypto/test/src/crypto/test/XSalsa20Test.cs +++ b/crypto/test/src/crypto/test/XSalsa20Test.cs @@ -166,7 +166,7 @@ namespace Org.BouncyCastle.Crypto.Tests } } - public static void Main( + public static void MainOld( string[] args) { RunTest(new XSalsa20Test()); diff --git a/crypto/test/src/crypto/test/XTEATest.cs b/crypto/test/src/crypto/test/XTEATest.cs index a1ea65298..298a873f2 100644 --- a/crypto/test/src/crypto/test/XTEATest.cs +++ b/crypto/test/src/crypto/test/XTEATest.cs @@ -42,7 +42,7 @@ namespace Org.BouncyCastle.Crypto.Tests get { return "XTEA"; } } - public static void Main( + public static void MainOld( string[] args) { RunTest(new XteaTest()); diff --git a/crypto/test/src/crypto/tls/test/DtlsTestCase.cs b/crypto/test/src/crypto/tls/test/DtlsTestCase.cs index 5e43337f4..9161ebcac 100644 --- a/crypto/test/src/crypto/tls/test/DtlsTestCase.cs +++ b/crypto/test/src/crypto/tls/test/DtlsTestCase.cs @@ -1,4 +1,5 @@ -using System; +#if !PORTABLE +using System; using System.IO; using System.Threading; @@ -18,7 +19,7 @@ namespace Org.BouncyCastle.Crypto.Tls.Tests throw new InvalidOperationException("Non-DTLS version"); } - [Test, TestCaseSource(typeof(DtlsTestSuite), "Suite")] + [Test, TestCaseSource(typeof(DtlsTestSuite), nameof(DtlsTestSuite.Suite))] public void RunTest(TlsTestConfig config) { CheckDtlsVersion(config.clientMinimumVersion); @@ -145,10 +146,11 @@ namespace Org.BouncyCastle.Crypto.Tls.Tests if (!isShutdown) { isShutdown = true; - serverThread.Interrupt(); + serverThread.Interrupt(); serverThread.Join(); } } } } } +#endif \ No newline at end of file diff --git a/crypto/test/src/crypto/tls/test/MockDatagramAssociation.cs b/crypto/test/src/crypto/tls/test/MockDatagramAssociation.cs index 48df36ca9..4591afa15 100644 --- a/crypto/test/src/crypto/tls/test/MockDatagramAssociation.cs +++ b/crypto/test/src/crypto/tls/test/MockDatagramAssociation.cs @@ -1,7 +1,5 @@ using System; using System.Collections; -using System.IO; -using System.Net; using System.Threading; using Org.BouncyCastle.Utilities; @@ -68,7 +66,11 @@ namespace Org.BouncyCastle.Crypto.Tls.Tests { Monitor.Wait(receiveQueue, waitMillis); } +#if !PORTABLE catch (ThreadInterruptedException) +#else + catch (Exception) +#endif { // TODO Keep waiting until full wait expired? } diff --git a/crypto/test/src/crypto/tls/test/NetworkStream.cs b/crypto/test/src/crypto/tls/test/NetworkStream.cs index 04de81e13..10cfe5443 100644 --- a/crypto/test/src/crypto/tls/test/NetworkStream.cs +++ b/crypto/test/src/crypto/tls/test/NetworkStream.cs @@ -34,10 +34,17 @@ namespace Org.BouncyCastle.Crypto.Tls.Tests get { return mInner.CanWrite; } } - public override void Close() +#if PORTABLE + protected override void Dispose(bool disposing) { lock (this) mClosed = true; } +#else + public override void Close() + { + lock (this) mClosed = true; + } +#endif public override void Flush() { diff --git a/crypto/test/src/crypto/tls/test/PipedStream.cs b/crypto/test/src/crypto/tls/test/PipedStream.cs index 6b2c15059..a5bcc1041 100644 --- a/crypto/test/src/crypto/tls/test/PipedStream.cs +++ b/crypto/test/src/crypto/tls/test/PipedStream.cs @@ -11,7 +11,7 @@ namespace Org.BouncyCastle.Crypto.Tls.Tests private bool mClosed = false; private PipedStream mOther = null; - private long mReadPos = 0; + private int mReadPos = 0; internal PipedStream() { @@ -41,7 +41,10 @@ namespace Org.BouncyCastle.Crypto.Tls.Tests get { return true; } } - public override void Close() + + +#if PORTABLE + protected override void Dispose(bool disposing) { lock (this) { @@ -49,6 +52,16 @@ namespace Org.BouncyCastle.Crypto.Tls.Tests Monitor.PulseAll(this); } } +#else + public override void Close() + { + lock (this) + { + mClosed = true; + Monitor.PulseAll(this); + } + } +#endif public override void Flush() { @@ -81,7 +94,7 @@ namespace Org.BouncyCastle.Crypto.Tls.Tests { WaitForData(); int len = (int)System.Math.Min(count, mOther.mBuf.Position - mReadPos); - Array.Copy(mOther.mBuf.GetBuffer(), mReadPos, buffer, offset, len); + Array.Copy(mOther.mBuf.ToArray(), mReadPos, buffer, offset, len); mReadPos += len; return len; } @@ -93,7 +106,7 @@ namespace Org.BouncyCastle.Crypto.Tls.Tests { WaitForData(); bool eof = (mReadPos >= mOther.mBuf.Position); - return eof ? -1 : mOther.mBuf.GetBuffer()[mReadPos++]; + return eof ? -1 : mOther.mBuf.ToArray()[mReadPos++]; } } diff --git a/crypto/test/src/crypto/tls/test/PskTlsClientTest.cs b/crypto/test/src/crypto/tls/test/PskTlsClientTest.cs index 7072c7105..6c59810e8 100644 --- a/crypto/test/src/crypto/tls/test/PskTlsClientTest.cs +++ b/crypto/test/src/crypto/tls/test/PskTlsClientTest.cs @@ -1,4 +1,5 @@ -using System; +#if !LIB +using System; using System.IO; using System.Net.Sockets; using System.Text; @@ -20,7 +21,7 @@ namespace Org.BouncyCastle.Crypto.Tls.Tests { private static readonly SecureRandom secureRandom = new SecureRandom(); - public static void Main(string[] args) + public static void MainOld(string[] args) { string hostname = "localhost"; int port = 5556; @@ -70,10 +71,11 @@ namespace Org.BouncyCastle.Crypto.Tls.Tests internal static TlsClientProtocol OpenTlsConnection(string hostname, int port, TlsClient client) { TcpClient tcp = new TcpClient(hostname, port); - + TlsClientProtocol protocol = new TlsClientProtocol(tcp.GetStream(), secureRandom); protocol.Connect(client); return protocol; } } } +#endif \ No newline at end of file diff --git a/crypto/test/src/crypto/tls/test/TlsClientTest.cs b/crypto/test/src/crypto/tls/test/TlsClientTest.cs index c9a5ef9ad..d30fbdee2 100644 --- a/crypto/test/src/crypto/tls/test/TlsClientTest.cs +++ b/crypto/test/src/crypto/tls/test/TlsClientTest.cs @@ -1,4 +1,5 @@ using System; +#if !LIB using System.IO; using System.Net.Sockets; using System.Text; @@ -17,7 +18,7 @@ namespace Org.BouncyCastle.Crypto.Tls.Tests { private static readonly SecureRandom secureRandom = new SecureRandom(); - public static void Main(string[] args) + public static void MainOld(string[] args) { string hostname = "localhost"; int port = 5556; @@ -64,3 +65,4 @@ namespace Org.BouncyCastle.Crypto.Tls.Tests } } } +#endif \ No newline at end of file diff --git a/crypto/test/src/crypto/tls/test/TlsServerTest.cs b/crypto/test/src/crypto/tls/test/TlsServerTest.cs index 77adf22f7..df31e1c0e 100644 --- a/crypto/test/src/crypto/tls/test/TlsServerTest.cs +++ b/crypto/test/src/crypto/tls/test/TlsServerTest.cs @@ -1,4 +1,5 @@ -using System; +#if !LIB +using System; using System.IO; using System.Net; using System.Net.Sockets; @@ -19,7 +20,7 @@ namespace Org.BouncyCastle.Crypto.Tls.Tests { private static readonly SecureRandom secureRandom = new SecureRandom(); - public static void Main(string[] args) + public static void MainOld(string[] args) { int port = 5556; @@ -76,3 +77,4 @@ namespace Org.BouncyCastle.Crypto.Tls.Tests } } } +#endif \ No newline at end of file diff --git a/crypto/test/src/crypto/tls/test/TlsTestCase.cs b/crypto/test/src/crypto/tls/test/TlsTestCase.cs index 7fb5db6ce..3d35970f3 100644 --- a/crypto/test/src/crypto/tls/test/TlsTestCase.cs +++ b/crypto/test/src/crypto/tls/test/TlsTestCase.cs @@ -153,7 +153,7 @@ namespace Org.BouncyCastle.Crypto.Tls.Tests { Monitor.Wait(this); } - catch (ThreadInterruptedException) + catch (Exception) { } } diff --git a/crypto/test/src/crypto/tls/test/TlsTestServerImpl.cs b/crypto/test/src/crypto/tls/test/TlsTestServerImpl.cs index 9edd2e524..3a2344b88 100644 --- a/crypto/test/src/crypto/tls/test/TlsTestServerImpl.cs +++ b/crypto/test/src/crypto/tls/test/TlsTestServerImpl.cs @@ -214,7 +214,7 @@ namespace Org.BouncyCastle.Crypto.Tls.Tests { output.WriteLine(line); } - catch (ThreadInterruptedException) + catch (Exception) { /* * For some reason the NUnit plugin in Visual Studio started throwing these during alert logging diff --git a/crypto/test/src/crypto/tls/test/TlsTestUtilities.cs b/crypto/test/src/crypto/tls/test/TlsTestUtilities.cs index a76858ce6..a15e867a4 100644 --- a/crypto/test/src/crypto/tls/test/TlsTestUtilities.cs +++ b/crypto/test/src/crypto/tls/test/TlsTestUtilities.cs @@ -45,7 +45,7 @@ namespace Org.BouncyCastle.Crypto.Tls.Tests byte[] der = c.GetEncoded(); byte[] sha1 = Sha256DigestOf(der); byte[] hexBytes = Hex.Encode(sha1); - string hex = Encoding.ASCII.GetString(hexBytes).ToUpper(CultureInfo.InvariantCulture); + string hex = Encoding.ASCII.GetString(hexBytes).ToUpperInvariant(); StringBuilder fp = new StringBuilder(); int i = 0; diff --git a/crypto/test/src/math/ec/test/AllTests.cs b/crypto/test/src/math/ec/test/AllTests.cs index 0517ac713..2b0d349ec 100644 --- a/crypto/test/src/math/ec/test/AllTests.cs +++ b/crypto/test/src/math/ec/test/AllTests.cs @@ -8,7 +8,7 @@ namespace Org.BouncyCastle.Math.EC.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/math/ec/test/ECPointPerformanceTest.cs b/crypto/test/src/math/ec/test/ECPointPerformanceTest.cs index 2bcd5b502..fed2c8d42 100644 --- a/crypto/test/src/math/ec/test/ECPointPerformanceTest.cs +++ b/crypto/test/src/math/ec/test/ECPointPerformanceTest.cs @@ -201,7 +201,7 @@ namespace Org.BouncyCastle.Math.EC.Tests } } - public static void Main(string[] args) + public static void MainOld(string[] args) { new ECPointPerformanceTest().TestMultiply(); } diff --git a/crypto/test/src/math/ec/test/F2mProofer.cs b/crypto/test/src/math/ec/test/F2mProofer.cs index 727d32c55..9c4fa85d3 100644 --- a/crypto/test/src/math/ec/test/F2mProofer.cs +++ b/crypto/test/src/math/ec/test/F2mProofer.cs @@ -136,7 +136,7 @@ // + "| -compare <className1> <className2>]"); // } // -// public static void Main(string[] args) +// public static void MainOld(string[] args) // { // if (args.Length == 0) // { diff --git a/crypto/test/src/math/test/AllTests.cs b/crypto/test/src/math/test/AllTests.cs index 53feff954..69db45e04 100644 --- a/crypto/test/src/math/test/AllTests.cs +++ b/crypto/test/src/math/test/AllTests.cs @@ -8,7 +8,7 @@ namespace Org.BouncyCastle.Math.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/ocsp/test/AllTests.cs b/crypto/test/src/ocsp/test/AllTests.cs index 5e799cd09..d374776f3 100644 --- a/crypto/test/src/ocsp/test/AllTests.cs +++ b/crypto/test/src/ocsp/test/AllTests.cs @@ -10,7 +10,7 @@ namespace Org.BouncyCastle.Ocsp.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/ocsp/test/OCSPTest.cs b/crypto/test/src/ocsp/test/OCSPTest.cs index 823de90f9..5b775eac2 100644 --- a/crypto/test/src/ocsp/test/OCSPTest.cs +++ b/crypto/test/src/ocsp/test/OCSPTest.cs @@ -835,7 +835,7 @@ namespace Org.BouncyCastle.Ocsp.Tests doTestIrregularVersionReq(); } - public static void Main( + public static void MainOld( string[] args) { RunTest(new OcspTest()); diff --git a/crypto/test/src/openpgp/test/PGPArmoredTest.cs b/crypto/test/src/openpgp/test/PGPArmoredTest.cs index aa13477ed..b06275840 100644 --- a/crypto/test/src/openpgp/test/PGPArmoredTest.cs +++ b/crypto/test/src/openpgp/test/PGPArmoredTest.cs @@ -248,7 +248,7 @@ namespace Org.BouncyCastle.Bcpg.OpenPgp.Tests get { return "PGPArmoredTest"; } } - public static void Main( + public static void MainOld( string[] args) { RunTest(new PgpArmoredTest()); diff --git a/crypto/test/src/openpgp/test/PGPClearSignedSignatureTest.cs b/crypto/test/src/openpgp/test/PGPClearSignedSignatureTest.cs index 668f8cce2..fe161e8f1 100644 --- a/crypto/test/src/openpgp/test/PGPClearSignedSignatureTest.cs +++ b/crypto/test/src/openpgp/test/PGPClearSignedSignatureTest.cs @@ -428,7 +428,7 @@ namespace Org.BouncyCastle.Bcpg.OpenPgp.Tests generateTest(crNlMessage, "\\r\\n"); } - public static void Main( + public static void MainOld( string[] args) { RunTest(new PgpClearSignedSignatureTest()); diff --git a/crypto/test/src/openpgp/test/PGPCompressionTest.cs b/crypto/test/src/openpgp/test/PGPCompressionTest.cs index fdcf7222c..eddfa1e7c 100644 --- a/crypto/test/src/openpgp/test/PGPCompressionTest.cs +++ b/crypto/test/src/openpgp/test/PGPCompressionTest.cs @@ -108,7 +108,7 @@ namespace Org.BouncyCastle.Bcpg.OpenPgp.Tests get { return "PGPCompressionTest"; } } - public static void Main( + public static void MainOld( string[] args) { RunTest(new PgpCompressionTest()); diff --git a/crypto/test/src/openpgp/test/PGPDSAElGamalTest.cs b/crypto/test/src/openpgp/test/PGPDSAElGamalTest.cs index b86324954..e200cec21 100644 --- a/crypto/test/src/openpgp/test/PGPDSAElGamalTest.cs +++ b/crypto/test/src/openpgp/test/PGPDSAElGamalTest.cs @@ -475,7 +475,7 @@ namespace Org.BouncyCastle.Bcpg.OpenPgp.Tests get { return "PGPDSAElGamalTest"; } } - public static void Main( + public static void MainOld( string[] args) { RunTest(new PgpDsaElGamalTest()); diff --git a/crypto/test/src/openpgp/test/PGPDSATest.cs b/crypto/test/src/openpgp/test/PGPDSATest.cs index 7808ed6cd..55e346a6a 100644 --- a/crypto/test/src/openpgp/test/PGPDSATest.cs +++ b/crypto/test/src/openpgp/test/PGPDSATest.cs @@ -580,7 +580,7 @@ namespace Org.BouncyCastle.Bcpg.OpenPgp.Tests get { return "PGPDSATest"; } } - public static void Main( + public static void MainOld( string[] args) { RunTest(new PgpDsaTest()); diff --git a/crypto/test/src/openpgp/test/PGPNoPrivateKeyTest.cs b/crypto/test/src/openpgp/test/PGPNoPrivateKeyTest.cs index 8f702b67b..35e85a2c8 100644 --- a/crypto/test/src/openpgp/test/PGPNoPrivateKeyTest.cs +++ b/crypto/test/src/openpgp/test/PGPNoPrivateKeyTest.cs @@ -152,7 +152,7 @@ namespace Org.BouncyCastle.Bcpg.OpenPgp.Tests get { return "PGPNoPrivateKeyTest"; } } - public static void Main( + public static void MainOld( string[] args) { RunTest(new PgpNoPrivateKeyTest()); diff --git a/crypto/test/src/openpgp/test/PGPPBETest.cs b/crypto/test/src/openpgp/test/PGPPBETest.cs index 29b786a83..b14506438 100644 --- a/crypto/test/src/openpgp/test/PGPPBETest.cs +++ b/crypto/test/src/openpgp/test/PGPPBETest.cs @@ -157,11 +157,16 @@ namespace Org.BouncyCastle.Bcpg.OpenPgp.Tests TestDateTime); ldOut.Write(text, 0, text.Length); - ldOut.Close(); +#if PORTABLE + ldOut.Dispose(); - comOut.Close(); + comOut.Dispose(); +#else + ldOut.Close(); - // + comOut.Close(); +#endif + // // encrypt - with stream close // MemoryStream cbOut = new UncloseableMemoryStream(); @@ -173,7 +178,11 @@ namespace Org.BouncyCastle.Bcpg.OpenPgp.Tests byte[] bOutData = bOut.ToArray(); Stream cOut = cPk.Open(new UncloseableStream(cbOut), bOutData.Length); cOut.Write(bOutData, 0, bOutData.Length); +#if PORTABLE + cOut.Dispose(); +#else cOut.Close(); +#endif data = DecryptMessage(cbOut.ToArray()); if (!Arrays.AreEqual(data, text)) @@ -321,11 +330,17 @@ namespace Org.BouncyCastle.Bcpg.OpenPgp.Tests ldOut.Write(msg, 0, msg.Length); - ldOut.Close(); +#if PORTABLE + ldOut.Dispose(); + + comOut.Dispose(); +#else + ldOut.Close(); comOut.Close(); - - cbOut = new MemoryStream(); +#endif + + cbOut = new MemoryStream(); cPk = new PgpEncryptedDataGenerator(SymmetricKeyAlgorithmTag.Cast5, true, rand); cPk.AddMethod(pass, HashAlgorithmTag.Sha1); @@ -335,7 +350,11 @@ namespace Org.BouncyCastle.Bcpg.OpenPgp.Tests data = bOut.ToArray(); cOut.Write(data, 0, data.Length); - cOut.Close(); +#if PORTABLE + cOut.Dispose(); +#else + cOut.Close(); +#endif data = DecryptMessage(cbOut.ToArray()); if (!AreEqual(data, msg)) @@ -356,18 +375,25 @@ namespace Org.BouncyCastle.Bcpg.OpenPgp.Tests private class UncloseableMemoryStream : MemoryStream { - public override void Close() +#if PORTABLE + protected override void Dispose(bool disposing) + { + throw new Exception("Dispose() called on underlying stream"); + } +#else + public override void Close() { throw new Exception("Close() called on underlying stream"); } - } +#endif + } public override string Name { get { return "PGPPBETest"; } } - public static void Main( + public static void MainOld( string[] args) { RunTest(new PgpPbeTest()); diff --git a/crypto/test/src/openpgp/test/PGPPacketTest.cs b/crypto/test/src/openpgp/test/PGPPacketTest.cs index b82f8526f..f8a13eeeb 100644 --- a/crypto/test/src/openpgp/test/PGPPacketTest.cs +++ b/crypto/test/src/openpgp/test/PGPPacketTest.cs @@ -63,7 +63,7 @@ namespace Org.BouncyCastle.Bcpg.OpenPgp.Tests get { return "PGPPacketTest"; } } - public static void Main( + public static void MainOld( string[] args) { RunTest(new PgpPacketTest()); diff --git a/crypto/test/src/openpgp/test/PGPRSATest.cs b/crypto/test/src/openpgp/test/PGPRSATest.cs index 82b569bbb..8944546fc 100644 --- a/crypto/test/src/openpgp/test/PGPRSATest.cs +++ b/crypto/test/src/openpgp/test/PGPRSATest.cs @@ -387,7 +387,11 @@ namespace Org.BouncyCastle.Bcpg.OpenPgp.Tests cOut.Write(bytes, 0, bytes.Length); +#if PORTABLE + cOut.Dispose(); +#else cOut.Close(); +#endif byte[] encData = bcOut.ToArray(); @@ -735,8 +739,12 @@ namespace Org.BouncyCastle.Bcpg.OpenPgp.Tests Stream cOut = cPk.Open(new UncloseableStream(cbOut), shortText.Length); cOut.Write(shortText, 0, shortText.Length); - + +#if PORTABLE + cOut.Dispose(); +#else cOut.Close(); +#endif pgpF = new PgpObjectFactory(cbOut.ToArray()); @@ -772,7 +780,11 @@ namespace Org.BouncyCastle.Bcpg.OpenPgp.Tests cOut.Write(text, 0, text.Length); +#if PORTABLE + cOut.Dispose(); +#else cOut.Close(); +#endif pgpF = new PgpObjectFactory(cbOut.ToArray()); @@ -981,11 +993,19 @@ namespace Org.BouncyCastle.Bcpg.OpenPgp.Tests sGen.Update((byte)ch); } +#if PORTABLE + lOut.Dispose(); +#else lOut.Close(); +#endif sGen.Generate().Encode(bcOut); - + +#if PORTABLE + bcOut.Dispose(); +#else bcOut.Close(); +#endif // // verify generated signature @@ -1056,12 +1076,20 @@ namespace Org.BouncyCastle.Bcpg.OpenPgp.Tests lOut.WriteByte((byte) ch); sGen.Update((byte)ch); } - + +#if PORTABLE + lOut.Dispose(); +#else lOut.Close(); +#endif sGen.Generate().Encode(bcOut); +#if PORTABLE + bcOut.Dispose(); +#else bcOut.Close(); +#endif // // verify generated signature @@ -1157,12 +1185,21 @@ namespace Org.BouncyCastle.Bcpg.OpenPgp.Tests lOut.WriteByte((byte)ch); sGen.Update((byte)ch); } - + +#if PORTABLE + lOut.Dispose(); +#else lOut.Close(); +#endif sGen.Generate().Encode(bcOut); +#if PORTABLE + bcOut.Dispose(); +#else bcOut.Close(); +#endif + // // verify generated signature @@ -1205,10 +1242,17 @@ namespace Org.BouncyCastle.Bcpg.OpenPgp.Tests private class UncloseableMemoryStream : MemoryStream { - public override void Close() +#if PORTABLE + protected override void Dispose(bool disposing) { - throw new Exception("Close() called on underlying stream"); + throw new Exception("Dispose() called on underlying stream"); } +#else + public override void Close() + { + throw new Exception("Close() called on underlying stream"); + } +#endif } public override string Name @@ -1216,7 +1260,7 @@ namespace Org.BouncyCastle.Bcpg.OpenPgp.Tests get { return "PGPRSATest"; } } - public static void Main( + public static void MainOld( string[] args) { RunTest(new PgpRsaTest()); diff --git a/crypto/test/src/openpgp/test/PGPSignatureTest.cs b/crypto/test/src/openpgp/test/PGPSignatureTest.cs index 40fee7a5f..6aca68134 100644 --- a/crypto/test/src/openpgp/test/PGPSignatureTest.cs +++ b/crypto/test/src/openpgp/test/PGPSignatureTest.cs @@ -1028,7 +1028,7 @@ namespace Org.BouncyCastle.Bcpg.OpenPgp.Tests get { return "PGPSignatureTest"; } } - public static void Main( + public static void MainOld( string[] args) { RunTest(new PgpSignatureTest()); diff --git a/crypto/test/src/openpgp/test/PgpECDHTest.cs b/crypto/test/src/openpgp/test/PgpECDHTest.cs index b7c500bd0..fb65d1de6 100644 --- a/crypto/test/src/openpgp/test/PgpECDHTest.cs +++ b/crypto/test/src/openpgp/test/PgpECDHTest.cs @@ -263,7 +263,7 @@ namespace Org.BouncyCastle.Bcpg.OpenPgp.Tests get { return "PgpECDHTest"; } } - public static void Main( + public static void MainOld( string[] args) { RunTest(new PgpECDHTest()); diff --git a/crypto/test/src/openpgp/test/PgpECDsaTest.cs b/crypto/test/src/openpgp/test/PgpECDsaTest.cs index 6259ef627..5bcc3ba68 100644 --- a/crypto/test/src/openpgp/test/PgpECDsaTest.cs +++ b/crypto/test/src/openpgp/test/PgpECDsaTest.cs @@ -188,7 +188,7 @@ namespace Org.BouncyCastle.Bcpg.OpenPgp.Tests get { return "PgpECDsaTest"; } } - public static void Main( + public static void MainOld( string[] args) { RunTest(new PgpECDsaTest()); diff --git a/crypto/test/src/openpgp/test/PgpECMessageTest.cs b/crypto/test/src/openpgp/test/PgpECMessageTest.cs index ac8283721..4a11dbdcc 100644 --- a/crypto/test/src/openpgp/test/PgpECMessageTest.cs +++ b/crypto/test/src/openpgp/test/PgpECMessageTest.cs @@ -179,7 +179,7 @@ namespace Org.BouncyCastle.Bcpg.OpenPgp.Tests get { return "PgpECMessageTest"; } } - public static void Main( + public static void MainOld( string[] args) { RunTest(new PgpECMessageTest()); diff --git a/crypto/test/src/openpgp/test/PgpKeyRingTest.cs b/crypto/test/src/openpgp/test/PgpKeyRingTest.cs index 5f38609cf..c65b5ee3d 100644 --- a/crypto/test/src/openpgp/test/PgpKeyRingTest.cs +++ b/crypto/test/src/openpgp/test/PgpKeyRingTest.cs @@ -2374,7 +2374,7 @@ namespace Org.BouncyCastle.Bcpg.OpenPgp.Tests get { return "PgpKeyRingTest"; } } - public static void Main( + public static void MainOld( string[] args) { RunTest(new PgpKeyRingTest()); diff --git a/crypto/test/src/openpgp/test/PgpMarkerTest.cs b/crypto/test/src/openpgp/test/PgpMarkerTest.cs index 89be7cd52..a4f95dfc1 100644 --- a/crypto/test/src/openpgp/test/PgpMarkerTest.cs +++ b/crypto/test/src/openpgp/test/PgpMarkerTest.cs @@ -85,7 +85,7 @@ namespace Org.BouncyCastle.Bcpg.OpenPgp.Tests get { return "PgpMarkerTest"; } } - public static void Main( + public static void MainOld( string[] args) { RunTest(new PgpMarkerTest()); diff --git a/crypto/test/src/openpgp/test/PgpParsingTest.cs b/crypto/test/src/openpgp/test/PgpParsingTest.cs index 78fca7570..34fc0af5f 100644 --- a/crypto/test/src/openpgp/test/PgpParsingTest.cs +++ b/crypto/test/src/openpgp/test/PgpParsingTest.cs @@ -23,7 +23,7 @@ namespace Org.BouncyCastle.Bcpg.OpenPgp.Tests get { return "PgpParsingTest"; } } - public static void Main( + public static void MainOld( string[] args) { RunTest(new PgpParsingTest()); diff --git a/crypto/test/src/openpgp/test/PgpUnicodeTest.cs b/crypto/test/src/openpgp/test/PgpUnicodeTest.cs index 534e8a471..7f1bc62d1 100644 --- a/crypto/test/src/openpgp/test/PgpUnicodeTest.cs +++ b/crypto/test/src/openpgp/test/PgpUnicodeTest.cs @@ -2,7 +2,6 @@ using System.IO; using System.Text; -using NUnit.Core; using NUnit.Framework; using Org.BouncyCastle.Math; @@ -123,7 +122,8 @@ namespace Org.BouncyCastle.Bcpg.OpenPgp.Tests return new PgpSecretKeyRingBundle(SimpleTest.GetTestDataAsStream("openpgp.unicode." + keyName)); } - public static void Main(string[] args) +#if !LIB + public static void MainOld(string[] args) { Suite.Run(new NullListener(), NUnit.Core.TestFilter.Empty); } @@ -138,5 +138,6 @@ namespace Org.BouncyCastle.Bcpg.OpenPgp.Tests return suite; } } +#endif } } diff --git a/crypto/test/src/openpgp/test/RegressionTest.cs b/crypto/test/src/openpgp/test/RegressionTest.cs index 329960bd8..7a68be55e 100644 --- a/crypto/test/src/openpgp/test/RegressionTest.cs +++ b/crypto/test/src/openpgp/test/RegressionTest.cs @@ -26,7 +26,7 @@ namespace Org.BouncyCastle.Bcpg.OpenPgp.Tests new PgpParsingTest(), }; - public static void Main( + public static void MainOld( string[] args) { foreach (ITest test in tests) diff --git a/crypto/test/src/openssl/test/AllTests.cs b/crypto/test/src/openssl/test/AllTests.cs index 0cc2dcd85..b1898cbc7 100644 --- a/crypto/test/src/openssl/test/AllTests.cs +++ b/crypto/test/src/openssl/test/AllTests.cs @@ -36,7 +36,7 @@ namespace Org.BouncyCastle.OpenSsl.Tests } #if !LIB - 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/openssl/test/ReaderTest.cs b/crypto/test/src/openssl/test/ReaderTest.cs index c0be5c848..9a45968cb 100644 --- a/crypto/test/src/openssl/test/ReaderTest.cs +++ b/crypto/test/src/openssl/test/ReaderTest.cs @@ -1,6 +1,6 @@ using System; using System.IO; - +using System.Reflection; using NUnit.Framework; using Org.BouncyCastle.Asn1.Cms; @@ -320,7 +320,7 @@ namespace Org.BouncyCastle.OpenSsl.Tests Fail("Didn't find OpenSSL key"); } - if (!expectedPrivKeyType.IsInstanceOfType(kp.Private)) + if (!expectedPrivKeyType.GetTypeInfo().IsInstanceOfType(kp.Private)) { Fail("Returned key not of correct type"); } @@ -362,7 +362,7 @@ namespace Org.BouncyCastle.OpenSsl.Tests return new PemReader(tr, pGet); } - public static void Main( + public static void MainOld( string[] args) { RunTest(new ReaderTest()); diff --git a/crypto/test/src/openssl/test/WriterTest.cs b/crypto/test/src/openssl/test/WriterTest.cs index 0d7887771..a66fd22ed 100644 --- a/crypto/test/src/openssl/test/WriterTest.cs +++ b/crypto/test/src/openssl/test/WriterTest.cs @@ -168,7 +168,7 @@ namespace Org.BouncyCastle.OpenSsl.Tests } } - public static void Main( + public static void MainOld( string[] args) { RunTest(new WriterTest()); diff --git a/crypto/test/src/pkcs/test/EncryptedPrivateKeyInfoTest.cs b/crypto/test/src/pkcs/test/EncryptedPrivateKeyInfoTest.cs index 23639b112..f08d89b1e 100644 --- a/crypto/test/src/pkcs/test/EncryptedPrivateKeyInfoTest.cs +++ b/crypto/test/src/pkcs/test/EncryptedPrivateKeyInfoTest.cs @@ -78,7 +78,7 @@ namespace Org.BouncyCastle.Pkcs.Tests } } - public static void Main( + public static void MainOld( string[] args) { RunTest(new EncryptedPrivateKeyInfoTest()); diff --git a/crypto/test/src/pkcs/test/PKCS10Test.cs b/crypto/test/src/pkcs/test/PKCS10Test.cs index d0227b9de..009f6b141 100644 --- a/crypto/test/src/pkcs/test/PKCS10Test.cs +++ b/crypto/test/src/pkcs/test/PKCS10Test.cs @@ -71,7 +71,7 @@ namespace Org.BouncyCastle.Pkcs.Tests } } - public static void Main( + public static void MainOld( string[] args) { RunTest(new Pkcs10Test()); diff --git a/crypto/test/src/pkcs/test/PKCS12StoreTest.cs b/crypto/test/src/pkcs/test/PKCS12StoreTest.cs index cd9dfcfad..1e7272f0f 100644 --- a/crypto/test/src/pkcs/test/PKCS12StoreTest.cs +++ b/crypto/test/src/pkcs/test/PKCS12StoreTest.cs @@ -904,7 +904,7 @@ namespace Org.BouncyCastle.Pkcs.Tests doTestPkcs12Store(); } - public static void Main( + public static void MainOld( string[] args) { RunTest(new Pkcs12StoreTest()); diff --git a/crypto/test/src/security/test/TestMacUtil.cs b/crypto/test/src/security/test/TestMacUtil.cs index 1eb6f35b0..d11fc4b96 100644 --- a/crypto/test/src/security/test/TestMacUtil.cs +++ b/crypto/test/src/security/test/TestMacUtil.cs @@ -14,14 +14,13 @@ namespace Org.BouncyCastle.Security.Tests [Test] public void TestCultureIndependence() { - Thread t = Thread.CurrentThread; - CultureInfo ci = t.CurrentCulture; + CultureInfo ci = CultureInfo.CurrentCulture; try { /* * In Hungarian, the "CS" in "HMACSHA256" is linguistically a single character, so "HMAC" is not a prefix. */ - t.CurrentCulture = new CultureInfo("hu-HU"); + CultureInfo.CurrentCulture = new CultureInfo("hu-HU"); IMac mac = MacUtilities.GetMac("HMACSHA256"); Assert.NotNull(mac); } @@ -31,7 +30,7 @@ namespace Org.BouncyCastle.Security.Tests } finally { - t.CurrentCulture = ci; + CultureInfo.CurrentCulture = ci; } } } diff --git a/crypto/test/src/security/test/TestParameterUtil.cs b/crypto/test/src/security/test/TestParameterUtil.cs index fe494212a..265a66ba9 100644 --- a/crypto/test/src/security/test/TestParameterUtil.cs +++ b/crypto/test/src/security/test/TestParameterUtil.cs @@ -1,5 +1,5 @@ using System; - +using System.Reflection; using NUnit.Framework; using Org.BouncyCastle.Asn1; @@ -67,7 +67,7 @@ namespace Org.BouncyCastle.Security.Tests Type expectedType, byte[] expectedBytes) { - Assert.IsTrue(expectedType.IsInstanceOfType(key)); + Assert.IsTrue(expectedType.GetTypeInfo().IsInstanceOfType(key)); Assert.IsTrue(Arrays.AreEqual(expectedBytes, key.GetKey())); } } diff --git a/crypto/test/src/security/test/TestSignerUtil.cs b/crypto/test/src/security/test/TestSignerUtil.cs index 18b856e3f..d815d53a5 100644 --- a/crypto/test/src/security/test/TestSignerUtil.cs +++ b/crypto/test/src/security/test/TestSignerUtil.cs @@ -120,7 +120,7 @@ namespace Org.BouncyCastle.Security.Tests { ISigner signer = SignerUtilities.GetSigner(algorithm); - string upper = algorithm.ToUpper(CultureInfo.InvariantCulture); + string upper = algorithm.ToUpperInvariant(); int withPos = upper.LastIndexOf("WITH"); string cipherName = withPos < 0 diff --git a/crypto/test/src/test/AESSICTest.cs b/crypto/test/src/test/AESSICTest.cs index f8de35efd..c4748c06a 100644 --- a/crypto/test/src/test/AESSICTest.cs +++ b/crypto/test/src/test/AESSICTest.cs @@ -130,7 +130,7 @@ namespace Org.BouncyCastle.Tests } } - public static void Main( + public static void MainOld( string[] args) { RunTest(new AesSicTest()); diff --git a/crypto/test/src/test/AESTest.cs b/crypto/test/src/test/AESTest.cs index 5a1ce8046..f42daedfe 100644 --- a/crypto/test/src/test/AESTest.cs +++ b/crypto/test/src/test/AESTest.cs @@ -354,7 +354,7 @@ namespace Org.BouncyCastle.Tests TestGcm(); } - public static void Main( + public static void MainOld( string[] args) { RunTest(new AesTest()); diff --git a/crypto/test/src/test/AttrCertSelectorTest.cs b/crypto/test/src/test/AttrCertSelectorTest.cs index 37c1e66d2..3f414e7b9 100644 --- a/crypto/test/src/test/AttrCertSelectorTest.cs +++ b/crypto/test/src/test/AttrCertSelectorTest.cs @@ -205,7 +205,7 @@ namespace Org.BouncyCastle.Tests TestSelector(); } - public static void Main( + public static void MainOld( string[] args) { RunTest(new AttrCertSelectorTest()); diff --git a/crypto/test/src/test/AttrCertTest.cs b/crypto/test/src/test/AttrCertTest.cs index d701d007e..b119bafa0 100644 --- a/crypto/test/src/test/AttrCertTest.cs +++ b/crypto/test/src/test/AttrCertTest.cs @@ -604,7 +604,7 @@ namespace Org.BouncyCastle.Tests doTestGenerateWithPrincipal(); } - public static void Main( + public static void MainOld( string[] args) { RunTest(new AttrCertTest()); diff --git a/crypto/test/src/test/BlockCipherTest.cs b/crypto/test/src/test/BlockCipherTest.cs index e6f92b84e..ddb0e1a7e 100644 --- a/crypto/test/src/test/BlockCipherTest.cs +++ b/crypto/test/src/test/BlockCipherTest.cs @@ -466,7 +466,7 @@ namespace Org.BouncyCastle.Tests rand = new FixedSecureRandom(); - string[] parts = algorithm.ToUpper(CultureInfo.InvariantCulture).Split('/'); + string[] parts = algorithm.ToUpperInvariant().Split('/'); string baseAlgorithm = parts[0]; string mode = parts.Length > 1 ? parts[1] : null; @@ -498,7 +498,7 @@ namespace Org.BouncyCastle.Tests inCipher = CipherUtilities.GetCipher(algorithm); outCipher = CipherUtilities.GetCipher(algorithm); - if (!inCipher.AlgorithmName.ToUpper(CultureInfo.InvariantCulture).StartsWith(baseAlgorithm)) + if (!inCipher.AlgorithmName.ToUpperInvariant().StartsWith(baseAlgorithm)) { Fail("wrong cipher returned!"); } @@ -1075,7 +1075,7 @@ namespace Org.BouncyCastle.Tests doTestExceptions(); } - public static void Main( + public static void MainOld( string[] args) { RunTest(new BlockCipherTest()); diff --git a/crypto/test/src/test/CMacTest.cs b/crypto/test/src/test/CMacTest.cs index f80caca7d..5688c04e1 100644 --- a/crypto/test/src/test/CMacTest.cs +++ b/crypto/test/src/test/CMacTest.cs @@ -260,7 +260,7 @@ namespace Org.BouncyCastle.Tests get { return "CMac"; } } - public static void Main(string[] args) + public static void MainOld(string[] args) { RunTest(new CMacTest()); } diff --git a/crypto/test/src/test/CRL5Test.cs b/crypto/test/src/test/CRL5Test.cs index ebd74af69..73a7b985d 100644 --- a/crypto/test/src/test/CRL5Test.cs +++ b/crypto/test/src/test/CRL5Test.cs @@ -248,7 +248,7 @@ namespace Org.BouncyCastle.Tests TestDirectCrl(); } - public static void Main( + public static void MainOld( string[] args) { RunTest(new Crl5Test()); diff --git a/crypto/test/src/test/CamelliaTest.cs b/crypto/test/src/test/CamelliaTest.cs index f8e3520a3..1272c9f80 100644 --- a/crypto/test/src/test/CamelliaTest.cs +++ b/crypto/test/src/test/CamelliaTest.cs @@ -195,7 +195,7 @@ namespace Org.BouncyCastle.Tests TestWrapOids(); } - public static void Main( + public static void MainOld( string[] args) { RunTest(new CamelliaTest()); diff --git a/crypto/test/src/test/CertPathBuilderTest.cs b/crypto/test/src/test/CertPathBuilderTest.cs index e31bde866..c2f037c45 100644 --- a/crypto/test/src/test/CertPathBuilderTest.cs +++ b/crypto/test/src/test/CertPathBuilderTest.cs @@ -146,7 +146,7 @@ namespace Org.BouncyCastle.Tests get { return "CertPathBuilder"; } } - public static void Main( + public static void MainOld( string[] args) { RunTest(new CertPathBuilderTest()); diff --git a/crypto/test/src/test/CertPathTest.cs b/crypto/test/src/test/CertPathTest.cs index f1a7c94f6..164a9a63f 100644 --- a/crypto/test/src/test/CertPathTest.cs +++ b/crypto/test/src/test/CertPathTest.cs @@ -244,7 +244,7 @@ namespace Org.BouncyCastle.Tests get { return "CertPath"; } } - public static void Main( + public static void MainOld( string[] args) { RunTest(new CertPathTest()); diff --git a/crypto/test/src/test/CertPathValidatorTest.cs b/crypto/test/src/test/CertPathValidatorTest.cs index f83ac850a..df2ba4c8f 100644 --- a/crypto/test/src/test/CertPathValidatorTest.cs +++ b/crypto/test/src/test/CertPathValidatorTest.cs @@ -257,7 +257,7 @@ namespace Org.BouncyCastle.Tests get { return "CertPathValidator"; } } - public static void Main( + public static void MainOld( string[] args) { RunTest(new CertPathValidatorTest()); diff --git a/crypto/test/src/test/CertTest.cs b/crypto/test/src/test/CertTest.cs index 72e17e458..8632bac68 100644 --- a/crypto/test/src/test/CertTest.cs +++ b/crypto/test/src/test/CertTest.cs @@ -2527,7 +2527,7 @@ namespace Org.BouncyCastle.Tests checkCertificate(18, emptyDNCert); } - public static void Main( + public static void MainOld( string[] args) { RunTest(new CertTest()); diff --git a/crypto/test/src/test/CipherStreamTest.cs b/crypto/test/src/test/CipherStreamTest.cs index 0809dfe80..671778ae9 100644 --- a/crypto/test/src/test/CipherStreamTest.cs +++ b/crypto/test/src/test/CipherStreamTest.cs @@ -440,7 +440,7 @@ namespace Org.BouncyCastle.Tests get { return "CipherStreamTest"; } } - public static void Main( + public static void MainOld( string[] args) { RunTest(new CipherStreamTest()); diff --git a/crypto/test/src/test/DESedeTest.cs b/crypto/test/src/test/DESedeTest.cs index d84b994f0..aea5d145e 100644 --- a/crypto/test/src/test/DESedeTest.cs +++ b/crypto/test/src/test/DESedeTest.cs @@ -281,7 +281,7 @@ namespace Org.BouncyCastle.Tests wrapTest("TDEA", 1, kek1, iv1, in1, out1); } - public static void Main( + public static void MainOld( string[] args) { RunTest(new DesEdeTest()); diff --git a/crypto/test/src/test/DHTest.cs b/crypto/test/src/test/DHTest.cs index 18a0d84d6..9657ee6b4 100644 --- a/crypto/test/src/test/DHTest.cs +++ b/crypto/test/src/test/DHTest.cs @@ -642,7 +642,7 @@ namespace Org.BouncyCastle.Tests TestExceptions(); } - public static void Main( + public static void MainOld( string[] args) { RunTest(new DHTest()); diff --git a/crypto/test/src/test/DSATest.cs b/crypto/test/src/test/DSATest.cs index a8b8bec3b..d7382d256 100644 --- a/crypto/test/src/test/DSATest.cs +++ b/crypto/test/src/test/DSATest.cs @@ -855,7 +855,7 @@ namespace Org.BouncyCastle.Tests get { return "DSA/ECDSA"; } } - public static void Main( + public static void MainOld( string[] args) { RunTest(new DsaTest()); diff --git a/crypto/test/src/test/DigestTest.cs b/crypto/test/src/test/DigestTest.cs index 5d840ee66..b0493db1f 100644 --- a/crypto/test/src/test/DigestTest.cs +++ b/crypto/test/src/test/DigestTest.cs @@ -158,7 +158,7 @@ namespace Org.BouncyCastle.Tests } } - public static void Main( + public static void MainOld( string[] args) { RunTest(new DigestTest()); diff --git a/crypto/test/src/test/ECDSA5Test.cs b/crypto/test/src/test/ECDSA5Test.cs index 3bf746edb..40ea21c0a 100644 --- a/crypto/test/src/test/ECDSA5Test.cs +++ b/crypto/test/src/test/ECDSA5Test.cs @@ -291,7 +291,7 @@ namespace Org.BouncyCastle.Tests TestGeneration(); } - public static void Main( + public static void MainOld( string[] args) { RunTest(new ECDsa5Test()); diff --git a/crypto/test/src/test/ECEncodingTest.cs b/crypto/test/src/test/ECEncodingTest.cs index 8d993c15e..972029e35 100644 --- a/crypto/test/src/test/ECEncodingTest.cs +++ b/crypto/test/src/test/ECEncodingTest.cs @@ -225,7 +225,7 @@ namespace Org.BouncyCastle.Tests key.Parameters); } - public static void Main( + public static void MainOld( string[] args) { RunTest(new ECEncodingTest()); diff --git a/crypto/test/src/test/ECNRTest.cs b/crypto/test/src/test/ECNRTest.cs index 8a24443c2..ff1176505 100644 --- a/crypto/test/src/test/ECNRTest.cs +++ b/crypto/test/src/test/ECNRTest.cs @@ -195,7 +195,7 @@ namespace Org.BouncyCastle.Tests TestECNR521bitPrime(); } - public static void Main( + public static void MainOld( string[] args) { RunTest(new ECNRTest()); diff --git a/crypto/test/src/test/ElGamalTest.cs b/crypto/test/src/test/ElGamalTest.cs index 9a87ea9b1..feecad23d 100644 --- a/crypto/test/src/test/ElGamalTest.cs +++ b/crypto/test/src/test/ElGamalTest.cs @@ -325,7 +325,7 @@ namespace Org.BouncyCastle.Tests TestRandom256(); } - public static void Main( + public static void MainOld( string[] args) { RunTest(new ElGamalTest()); diff --git a/crypto/test/src/test/EncryptedPrivateKeyInfoTest.cs b/crypto/test/src/test/EncryptedPrivateKeyInfoTest.cs index baac5ff7f..f2506cd99 100644 --- a/crypto/test/src/test/EncryptedPrivateKeyInfoTest.cs +++ b/crypto/test/src/test/EncryptedPrivateKeyInfoTest.cs @@ -137,7 +137,7 @@ namespace Org.BouncyCastle.Tests get { return "EncryptedPrivateKeyInfoTest"; } } - public static void Main( + public static void MainOld( string[] args) { RunTest(new EncryptedPrivateKeyInfoTest()); diff --git a/crypto/test/src/test/FIPSDESTest.cs b/crypto/test/src/test/FIPSDESTest.cs index 1f40e1591..f1efe2527 100644 --- a/crypto/test/src/test/FIPSDESTest.cs +++ b/crypto/test/src/test/FIPSDESTest.cs @@ -185,7 +185,7 @@ namespace Org.BouncyCastle.Tests return new SimpleTestResult(true, Name + ": Okay"); } - public static void Main( + public static void MainOld( string[] args) { ITest test = new FipsDesTest(); diff --git a/crypto/test/src/test/GOST28147Test.cs b/crypto/test/src/test/GOST28147Test.cs index 0adfad334..fcdfaaf28 100644 --- a/crypto/test/src/test/GOST28147Test.cs +++ b/crypto/test/src/test/GOST28147Test.cs @@ -228,7 +228,7 @@ namespace Org.BouncyCastle.Tests } } - public static void Main( + public static void MainOld( string[] args) { RunTest(new Gost28147Test()); diff --git a/crypto/test/src/test/GOST3410Test.cs b/crypto/test/src/test/GOST3410Test.cs index db232c5a1..931332cfb 100644 --- a/crypto/test/src/test/GOST3410Test.cs +++ b/crypto/test/src/test/GOST3410Test.cs @@ -363,7 +363,7 @@ namespace Org.BouncyCastle.Tests parametersTest(); } - public static void Main( + public static void MainOld( string[] args) { RunTest(new Gost3410Test()); diff --git a/crypto/test/src/test/HMacTest.cs b/crypto/test/src/test/HMacTest.cs index e4f5cb9c1..ef8bba8bd 100644 --- a/crypto/test/src/test/HMacTest.cs +++ b/crypto/test/src/test/HMacTest.cs @@ -172,7 +172,7 @@ namespace Org.BouncyCastle.Tests get { return "HMac"; } } - public static void Main( + public static void MainOld( string[] args) { RunTest(new HMacTest()); diff --git a/crypto/test/src/test/IESTest.cs b/crypto/test/src/test/IESTest.cs index 193fe1ae9..812b05f97 100644 --- a/crypto/test/src/test/IESTest.cs +++ b/crypto/test/src/test/IESTest.cs @@ -228,7 +228,7 @@ namespace Org.BouncyCastle.Tests // } } - public static void Main( + public static void MainOld( string[] args) { RunTest(new IesTest()); diff --git a/crypto/test/src/test/MacTest.cs b/crypto/test/src/test/MacTest.cs index d4b3188bd..86b64d905 100644 --- a/crypto/test/src/test/MacTest.cs +++ b/crypto/test/src/test/MacTest.cs @@ -199,7 +199,7 @@ namespace Org.BouncyCastle.Tests get { return "Mac"; } } - public static void Main( + public static void MainOld( string[] args) { RunTest(new MacTest()); diff --git a/crypto/test/src/test/MqvTest.cs b/crypto/test/src/test/MqvTest.cs index ef36e1a23..ec5c610ca 100644 --- a/crypto/test/src/test/MqvTest.cs +++ b/crypto/test/src/test/MqvTest.cs @@ -90,7 +90,7 @@ namespace Org.BouncyCastle.Tests } } - public static void Main( + public static void MainOld( string[] args) { RunTest(new MqvTest()); diff --git a/crypto/test/src/test/NamedCurveTest.cs b/crypto/test/src/test/NamedCurveTest.cs index bc8684aa5..4c91f64fe 100644 --- a/crypto/test/src/test/NamedCurveTest.cs +++ b/crypto/test/src/test/NamedCurveTest.cs @@ -364,7 +364,7 @@ namespace Org.BouncyCastle.Tests } } - public static void Main( + public static void MainOld( string[] args) { RunTest(new NamedCurveTest()); diff --git a/crypto/test/src/test/NistCertPathTest.cs b/crypto/test/src/test/NistCertPathTest.cs index 0f42e24d0..d070e36d4 100644 --- a/crypto/test/src/test/NistCertPathTest.cs +++ b/crypto/test/src/test/NistCertPathTest.cs @@ -5175,7 +5175,7 @@ namespace Org.BouncyCastle.Tests End_Certificate_RL_09_01_crt }; - public static void Main( + public static void MainOld( string[] args) { RunTest(new NistCertPathTest()); diff --git a/crypto/test/src/test/NoekeonTest.cs b/crypto/test/src/test/NoekeonTest.cs index c3745da1c..8f4cbfe5c 100644 --- a/crypto/test/src/test/NoekeonTest.cs +++ b/crypto/test/src/test/NoekeonTest.cs @@ -140,7 +140,7 @@ namespace Org.BouncyCastle.Tests } } - public static void Main( + public static void MainOld( string[] args) { RunTest(new NoekeonTest()); diff --git a/crypto/test/src/test/PBETest.cs b/crypto/test/src/test/PBETest.cs index ee61a027c..366af552d 100644 --- a/crypto/test/src/test/PBETest.cs +++ b/crypto/test/src/test/PBETest.cs @@ -510,7 +510,7 @@ namespace Org.BouncyCastle.Tests get { return "PbeTest"; } } - public static void Main( + public static void MainOld( string[] args) { RunTest(new PbeTest()); diff --git a/crypto/test/src/test/PKCS10CertRequestTest.cs b/crypto/test/src/test/PKCS10CertRequestTest.cs index 9bad0a678..7c96baea1 100644 --- a/crypto/test/src/test/PKCS10CertRequestTest.cs +++ b/crypto/test/src/test/PKCS10CertRequestTest.cs @@ -453,7 +453,7 @@ namespace Org.BouncyCastle.Tests nullPointerTest(); } - public static void Main( + public static void MainOld( string[] args) { RunTest(new Pkcs10CertRequestTest()); diff --git a/crypto/test/src/test/PSSTest.cs b/crypto/test/src/test/PSSTest.cs index 677289e7c..c4c41da8f 100644 --- a/crypto/test/src/test/PSSTest.cs +++ b/crypto/test/src/test/PSSTest.cs @@ -236,7 +236,7 @@ namespace Org.BouncyCastle.Tests get { return "PSS"; } } - public static void Main( + public static void MainOld( string[] args) { RunTest(new PssTest()); diff --git a/crypto/test/src/test/PkixNameConstraintsTest.cs b/crypto/test/src/test/PkixNameConstraintsTest.cs index a20fc33c4..f26b88a5e 100644 --- a/crypto/test/src/test/PkixNameConstraintsTest.cs +++ b/crypto/test/src/test/PkixNameConstraintsTest.cs @@ -416,7 +416,7 @@ namespace Org.BouncyCastle.Tests } } - public static void Main( + public static void MainOld( string[] args) { RunTest(new PkixNameConstraintsTest()); diff --git a/crypto/test/src/test/PkixPolicyMappingTest.cs b/crypto/test/src/test/PkixPolicyMappingTest.cs index 47e2c3120..dc56d0487 100644 --- a/crypto/test/src/test/PkixPolicyMappingTest.cs +++ b/crypto/test/src/test/PkixPolicyMappingTest.cs @@ -402,7 +402,7 @@ namespace Org.BouncyCastle.Tests } } - public static void Main( + public static void MainOld( string[] args) { RunTest(new PkixPolicyMappingTest()); diff --git a/crypto/test/src/test/PkixTest.cs b/crypto/test/src/test/PkixTest.cs index 882319610..c30c01c93 100644 --- a/crypto/test/src/test/PkixTest.cs +++ b/crypto/test/src/test/PkixTest.cs @@ -231,7 +231,7 @@ namespace Org.BouncyCastle.Tests get { return "PkixTest"; } } - public static void Main( + public static void MainOld( string[] args) { RunTest(new PkixTest()); diff --git a/crypto/test/src/test/RSATest.cs b/crypto/test/src/test/RSATest.cs index a765ff138..0c57bb4f7 100644 --- a/crypto/test/src/test/RSATest.cs +++ b/crypto/test/src/test/RSATest.cs @@ -665,7 +665,7 @@ namespace Org.BouncyCastle.Tests get { return "RSATest"; } } - public static void Main( + public static void MainOld( string[] args) { ITest test = new RsaTest(); diff --git a/crypto/test/src/test/RegressionTest.cs b/crypto/test/src/test/RegressionTest.cs index 0ffde72e4..9b55dffa6 100644 --- a/crypto/test/src/test/RegressionTest.cs +++ b/crypto/test/src/test/RegressionTest.cs @@ -66,7 +66,7 @@ namespace Org.BouncyCastle.Tests new Crl5Test(), }; - public static void Main( + public static void MainOld( string[] args) { for (int i = 0; i != tests.Length; i++) diff --git a/crypto/test/src/test/SEEDTest.cs b/crypto/test/src/test/SEEDTest.cs index 2b380d5b7..cc8ee5757 100644 --- a/crypto/test/src/test/SEEDTest.cs +++ b/crypto/test/src/test/SEEDTest.cs @@ -181,7 +181,7 @@ namespace Org.BouncyCastle.Tests TestWrapOids(); } - public static void Main( + public static void MainOld( string[] args) { RunTest(new SeedTest()); diff --git a/crypto/test/src/test/SigTest.cs b/crypto/test/src/test/SigTest.cs index 803a24493..dcf98066e 100644 --- a/crypto/test/src/test/SigTest.cs +++ b/crypto/test/src/test/SigTest.cs @@ -361,7 +361,7 @@ namespace Org.BouncyCastle.Tests get { return "SigTest"; } } - public static void Main( + public static void MainOld( string[] args) { RunTest(new SigTest()); diff --git a/crypto/test/src/test/WrapTest.cs b/crypto/test/src/test/WrapTest.cs index bb49446e7..039fb6ede 100644 --- a/crypto/test/src/test/WrapTest.cs +++ b/crypto/test/src/test/WrapTest.cs @@ -74,7 +74,7 @@ namespace Org.BouncyCastle.Tests get { return "WrapTest"; } } - public static void Main( + public static void MainOld( string[] args) { ITest test = new WrapTest(); diff --git a/crypto/test/src/test/X509CertificatePairTest.cs b/crypto/test/src/test/X509CertificatePairTest.cs index a83de4cf0..ed694fef7 100644 --- a/crypto/test/src/test/X509CertificatePairTest.cs +++ b/crypto/test/src/test/X509CertificatePairTest.cs @@ -132,7 +132,7 @@ namespace Org.BouncyCastle.Tests get { return "X509CertificatePair"; } } - public static void Main( + public static void MainOld( string[] args) { RunTest(new X509CertificatePairTest()); diff --git a/crypto/test/src/test/X509StoreTest.cs b/crypto/test/src/test/X509StoreTest.cs index 37673b8b4..739772494 100644 --- a/crypto/test/src/test/X509StoreTest.cs +++ b/crypto/test/src/test/X509StoreTest.cs @@ -318,7 +318,7 @@ namespace Org.BouncyCastle.Tests get { return "IX509Store"; } } - public static void Main( + public static void MainOld( string[] args) { RunTest(new X509StoreTest()); diff --git a/crypto/test/src/tsp/test/AllTests.cs b/crypto/test/src/tsp/test/AllTests.cs index 58d096d54..b1c5698a7 100644 --- a/crypto/test/src/tsp/test/AllTests.cs +++ b/crypto/test/src/tsp/test/AllTests.cs @@ -10,7 +10,7 @@ namespace Org.BouncyCastle.Tsp.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/util/io/pem/test/AllTests.cs b/crypto/test/src/util/io/pem/test/AllTests.cs index 921c40cb8..db66c4ca4 100644 --- a/crypto/test/src/util/io/pem/test/AllTests.cs +++ b/crypto/test/src/util/io/pem/test/AllTests.cs @@ -22,7 +22,7 @@ namespace Org.BouncyCastle.Utilities.IO.Pem.Tests public class AllTests { #if !LIB - 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/util/test/PortableExtensions.cs b/crypto/test/src/util/test/PortableExtensions.cs new file mode 100644 index 000000000..1e37abf41 --- /dev/null +++ b/crypto/test/src/util/test/PortableExtensions.cs @@ -0,0 +1,22 @@ + +#if PORTABLE +using System; +using System.IO; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Net.Sockets; + +namespace Org.BouncyCastle +{ + static class PortableExtensions + { + public static void Close(this Stream stream) => stream.Dispose(); + public static void Close(this TextWriter writer) => writer.Dispose(); + public static void Close(this TextReader reader) => reader.Dispose(); + public static void Close(this TcpClient client) => client.Dispose(); + } +} + +#endif diff --git a/crypto/test/src/util/test/SimpleTest.cs b/crypto/test/src/util/test/SimpleTest.cs index fea680832..1639431cc 100644 --- a/crypto/test/src/util/test/SimpleTest.cs +++ b/crypto/test/src/util/test/SimpleTest.cs @@ -96,8 +96,8 @@ namespace Org.BouncyCastle.Utilities.Test string name) { string fullName = GetFullName(name); - - return Assembly.GetExecutingAssembly().GetManifestResourceStream(fullName); + + return typeof(SimpleTest).GetTypeInfo().Assembly.GetManifestResourceStream(fullName); } internal static string[] GetTestDataEntries( @@ -106,7 +106,7 @@ namespace Org.BouncyCastle.Utilities.Test string fullPrefix = GetFullName(prefix); ArrayList result = new ArrayList(); - string[] fullNames = Assembly.GetExecutingAssembly().GetManifestResourceNames(); + string[] fullNames = typeof(SimpleTest).GetTypeInfo().Assembly.GetManifestResourceNames(); foreach (string fullName in fullNames) { if (fullName.StartsWith(fullPrefix)) @@ -121,25 +121,13 @@ namespace Org.BouncyCastle.Utilities.Test private static string GetFullName( string name) { -#if SEPARATE_UNIT_TESTS - return "UnitTests.data." + name; -#elif PORTABLE - return "crypto.tests." + name; -#else return "crypto.test.data." + name; -#endif } private static string GetShortName( string fullName) { -#if SEPARATE_UNIT_TESTS - return fullName.Substring("UnitTests.data.".Length); -#elif PORTABLE - return fullName.Substring("crypto.tests.".Length); -#else return fullName.Substring("crypto.test.data.".Length); -#endif } #if NETCF_1_0 || NETCF_2_0 diff --git a/crypto/test/src/x509/test/TestCertificateGen.cs b/crypto/test/src/x509/test/TestCertificateGen.cs index e91a102f1..448bb8794 100644 --- a/crypto/test/src/x509/test/TestCertificateGen.cs +++ b/crypto/test/src/x509/test/TestCertificateGen.cs @@ -726,7 +726,7 @@ namespace Org.BouncyCastle.X509.Tests } } - public static void Main(string[] args) + public static void MainOld(string[] args) { RunTest(new TestCertificateGen()); } |