From 8f4750af87f97879f739ef95d8ba44ae3afcd909 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?G=C3=ADsli=20Konr=C3=A1=C3=B0=20Bj=C3=B6rnsson?= Date: Tue, 28 Sep 2021 16:43:13 +0000 Subject: [PATCH] Delete CryptoTests.cs --- .../CryptoTests.cs | 88 ------------------- 1 file changed, 88 deletions(-) delete mode 100644 src/Solid.Identity.Protocols.WsTrust.Tests/CryptoTests.cs diff --git a/src/Solid.Identity.Protocols.WsTrust.Tests/CryptoTests.cs b/src/Solid.Identity.Protocols.WsTrust.Tests/CryptoTests.cs deleted file mode 100644 index 91e3ca6..0000000 --- a/src/Solid.Identity.Protocols.WsTrust.Tests/CryptoTests.cs +++ /dev/null @@ -1,88 +0,0 @@ -//using Microsoft.Extensions.DependencyInjection; -//using Microsoft.IdentityModel.Tokens; -//using Solid.Identity.Protocols.WsSecurity.Tokens; -//using System; -//using System.Collections.Generic; -//using System.Linq; -//using System.Security.Cryptography; -//using System.Security.Cryptography.X509Certificates; -//using System.Text; -//using System.Threading.Tasks; -//using Xunit; - -//namespace Solid.Identity.Protocols.WsTrust.Tests -//{ -// public class CryptoTests -// { -// private CryptoProviderFactory _factory; - -// public CryptoTests() -// { -// var services = new ServiceCollection() -// .AddLogging() -// .BuildServiceProvider() -// ; -// var options = new WsTrustOptions() -// .AddRsaSha1Support() -// .AddSha1Support() -// .AddHmacSha1Support() -// ; -// CryptoProviderFactory.Default.CustomCryptoProvider = new CustomCryptoProvider(options, services); -// _factory = CryptoProviderFactory.Default; -// } - -// [Theory] -// [InlineData("http://www.w3.org/2000/09/xmldsig#sha1")] -// [InlineData("SHA1")] -// public void ShouldGetHashAlgorithm(string algorithm) -// { -// Assert.True(_factory.IsSupportedAlgorithm(algorithm)); -// // throw exception if it can't create -// _ = _factory.CreateHashAlgorithm(algorithm); -// } - -// [Theory] -// [InlineData("http://www.w3.org/2000/09/xmldsig#rsa-sha1")] -// [InlineData("RS1")] -// public void ShouldGetAsymmetricSignatureProvider(string algorithm) -// { -// var certificate = new X509Certificate2(Convert.FromBase64String(Certificates.SigningCertificteBase64)); -// var key = new X509SecurityKey(certificate); - -// Assert.True(_factory.IsSupportedAlgorithm(algorithm)); -// // throw exception if it can't create -// _ = _factory.CreateForSigning(key, algorithm); -// _ = _factory.CreateForVerifying(key, algorithm); -// } - -// [Theory] -// [InlineData("http://www.w3.org/2000/09/xmldsig#hmac-sha1")] -// [InlineData("H1")] -// public void ShouldGetSymmetricSignatureProvider(string algorithm) -// { -// var bytes = new byte[16]; -// var random = RandomNumberGenerator.Create(); -// random.GetNonZeroBytes(bytes); -// var key = new SymmetricSecurityKey(bytes); - -// Assert.True(_factory.IsSupportedAlgorithm(algorithm)); -// // throw exception if it can't create -// _ = _factory.CreateForSigning(key, algorithm); -// _ = _factory.CreateForVerifying(key, algorithm); -// } - -// [Theory] -// [InlineData("http://www.w3.org/2000/09/xmldsig#hmac-sha1")] -// [InlineData("H1")] -// public void ShouldGetKeyedHashAlgorithm(string algorithm) -// { -// var bytes = new byte[16]; -// var random = RandomNumberGenerator.Create(); -// random.GetNonZeroBytes(bytes); - -// Assert.True(_factory.IsSupportedAlgorithm(algorithm)); -// // throw exception if it can't create -// _ = _factory.CreateKeyedHashAlgorithm(bytes, algorithm); -// } -// } -//}