Skip to content

Commit

Permalink
R# cleanup og bedre datosjekk for sertifikater
Browse files Browse the repository at this point in the history
  • Loading branch information
Aleksander Aas Sjåfjell committed Sep 27, 2016
1 parent 23289b5 commit 9781f1b
Show file tree
Hide file tree
Showing 17 changed files with 115 additions and 139 deletions.
8 changes: 4 additions & 4 deletions Difi.Felles.Utility.Tester/CertificateChainValidatorTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,14 @@ namespace Difi.Felles.Utility.Tester
public class CertificateChainValidatorTests
{

public class ValidateCertificateChain : CertificateChainValidatorTests
public class ValidateCertificateChainMethod : CertificateChainValidatorTests
{
[Fact]
public void Valid_with_correct_root_and_intermediate()
{
//Arrange
var productionCertificate = SertifikatUtility.GetProduksjonsMottakerSertifikatOppslagstjenesten();
var certificateChainValidator = new CertificateChainValidator(CertificateChainUtility.ProduksjonsSertifikater());
var certificateChainValidator = new CertificateChainValidator(CertificateChainUtility.ProductionCertificates());

//Act
var result = certificateChainValidator.Validate(productionCertificate);
Expand All @@ -32,7 +32,7 @@ public void Fails_with_wrong_root_and_intermediate()
var productionCertificate = SertifikatUtility.GetProduksjonsMottakerSertifikatOppslagstjenesten();

//Act
var certificateChainValidator = new CertificateChainValidator(CertificateChainUtility.FunksjoneltTestmiljøSertifikater());
var certificateChainValidator = new CertificateChainValidator(CertificateChainUtility.TestCertificates());
var result = certificateChainValidator.Validate(productionCertificate);

//Assert
Expand All @@ -46,7 +46,7 @@ public void Fails_with_self_signed_certificate()
{
//Arrange
var selfSignedCertificate = SertifikatUtility.GetEnhetstesterSelvsignertSertifikat();
var certificateChainValidator = new CertificateChainValidator(CertificateChainUtility.ProduksjonsSertifikater());
var certificateChainValidator = new CertificateChainValidator(CertificateChainUtility.ProductionCertificates());

//Act
var result = certificateChainValidator.Validate(selfSignedCertificate);
Expand Down
2 changes: 1 addition & 1 deletion Difi.Felles.Utility.Tester/CertificateValidatorTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ namespace Difi.Felles.Utility.Tester

public class CertificateValidatorTests
{
public class ValidateCertificateAndChain : CertificateValidatorTests
public class ValidateCertificateAndChainMethod : CertificateValidatorTests
{
[Fact]
public void Returns_fail_if_certificate_error()
Expand Down
79 changes: 37 additions & 42 deletions Difi.Felles.Utility.Tester/Security/SignedXmlWithAgnosticIdTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,28 +11,33 @@
using Difi.Felles.Utility.Utilities;
using Xunit;


namespace Difi.Felles.Utility.Tester.Security
{

public class SignedXmlWithAgnosticIdTests
{

public class KonstruktørMethod : SignedXmlWithAgnosticIdTests
{
[Fact]
public void KonstruktørMedXmlDokumentOgSertifikat()
public void FeilerMedPrivatnøkkelSomIkkeErRsaIKKEIMPLEMENTERT()
{
//Arrange
var xmlDokument = XmlUtility.ToXmlDocument(TransportKvittering.TransportOkKvittertingFunksjoneltTestmiljø);
var sertifikat = CertificateUtility.GetAvsenderEnhetstesterSertifikat();
var signedXmlWithAgnosticId = new SignedXmlWithAgnosticId(xmlDokument, sertifikat);
//Denne testen er ikke skrevet fordi vi ikke har klart å lage et sertifikat som bruker
//DSACryptoProvider. Script `GenererSertifikatScripts.txt` inneholder info om hvordan.
//Feilmelding `bad data` kommer, så noe er galt. Jeg mener det likevel er viktig å påpeke
//at vi bør ha testdekning på dette. Kanskje kan fremtiden løse dette problemet?
// Aleksander 02.11.2015

//Act
var signingKey = signedXmlWithAgnosticId.SigningKey;
//////////////////////////////////////////////
//P12 container med privatekey og sertifikat som holder i 10 år, DSA kryptering
//////////////////////////////////////////////

//Assert
Assert.True(signingKey is RSACryptoServiceProvider);
//Lag dsa-parametere
// openssl dsaparam -out dsap.pem 2048

//Lag privatnøkkel og sertifikat
//openssl req -x509 - newkey dsa: dsap.pem - keyout key.pem -out certificate.pem - days 3650 - nodes - subj "/C=NO/ST=Oslo/L=Posthuset/O=Digipost testsertifikat Name/OU=Org/CN=www.digiphoest.no"

//Pakk inn i container
//openssl pkcs12 -export -out certificate.pfx - inkey key.pem -in certificate.pem
}

[Fact]
Expand All @@ -55,30 +60,21 @@ public void FeilerMedSertifikatUtenPrivatnøkkel()
}

[Fact]
public void FeilerMedPrivatnøkkelSomIkkeErRsaIKKEIMPLEMENTERT()
public void KonstruktørMedXmlDokumentOgSertifikat()
{
//Denne testen er ikke skrevet fordi vi ikke har klart å lage et sertifikat som bruker
//DSACryptoProvider. Script `GenererSertifikatScripts.txt` inneholder info om hvordan.
//Feilmelding `bad data` kommer, så noe er galt. Jeg mener det likevel er viktig å påpeke
//at vi bør ha testdekning på dette. Kanskje kan fremtiden løse dette problemet?
// Aleksander 02.11.2015

//////////////////////////////////////////////
//P12 container med privatekey og sertifikat som holder i 10 år, DSA kryptering
//////////////////////////////////////////////

//Lag dsa-parametere
// openssl dsaparam -out dsap.pem 2048
//Arrange
var xmlDokument = XmlUtility.ToXmlDocument(TransportKvittering.TransportOkKvittertingFunksjoneltTestmiljø);
var sertifikat = CertificateUtility.GetAvsenderEnhetstesterSertifikat();
var signedXmlWithAgnosticId = new SignedXmlWithAgnosticId(xmlDokument, sertifikat);

//Lag privatnøkkel og sertifikat
//openssl req -x509 - newkey dsa: dsap.pem - keyout key.pem -out certificate.pem - days 3650 - nodes - subj "/C=NO/ST=Oslo/L=Posthuset/O=Digipost testsertifikat Name/OU=Org/CN=www.digiphoest.no"
//Act
var signingKey = signedXmlWithAgnosticId.SigningKey;

//Pakk inn i container
//openssl pkcs12 -export -out certificate.pfx - inkey key.pem -in certificate.pem
//Assert
Assert.True(signingKey is RSACryptoServiceProvider);
}
}


public class FindIdElementMethod : SignedXmlWithAgnosticIdTests
{
[Fact]
Expand Down Expand Up @@ -112,13 +108,12 @@ public void FinnerIdElementUansettSkrivemåte()

Assert.NotNull(response);
Assert.True(
response.Attributes.OfType<XmlAttribute>().Any(a => a.LocalName == id && a.Value == "value"));
response.Attributes.OfType<XmlAttribute>().Any(a => (a.LocalName == id) && (a.Value == "value")));
}
}
}
}


public class GetPublicKeyMethod : SignedXmlWithAgnosticIdTests
{
private XmlNamespaceManager GetNamespaceManager(XmlDocument forDocument)
Expand Down Expand Up @@ -151,18 +146,18 @@ private void AddBodySignatureNodeToSignedXmlWithAgnosticId(XmlDocument kildeXmlD

private object GetPublicKey(SignedXmlWithAgnosticId signedXmlWithAgnosticId)
{
return typeof (SignedXmlWithAgnosticId).GetMethod("GetPublicKey", BindingFlags.Instance | BindingFlags.NonPublic)
return typeof(SignedXmlWithAgnosticId).GetMethod("GetPublicKey", BindingFlags.Instance | BindingFlags.NonPublic)
.Invoke(signedXmlWithAgnosticId, null);
}

[Fact]
public void GetsKeyFromTransportReceipt()
public void GetsKeyFromMessageReceiptBody()
{
//Arrange
var xmlDokument = XmlUtility.ToXmlDocument(TransportKvittering.TransportOkKvittertingFunksjoneltTestmiljø);
var signedXmlWithAgnosticId = new SignedXmlWithAgnosticId(xmlDokument);
var document = XmlUtility.ToXmlDocument(ReceiptResponse.FunctionalTestEnvironment);
var signedXmlWithAgnosticId = new SignedXmlWithAgnosticId(document);

AddHeaderSignatureNodeToSignedXmlWithAgnosticId(xmlDokument, signedXmlWithAgnosticId);
AddBodySignatureNodeToSignedXmlWithAgnosticId(document, signedXmlWithAgnosticId);

//Act
var signingKey = GetPublicKey(signedXmlWithAgnosticId);
Expand Down Expand Up @@ -192,13 +187,13 @@ public void GetsKeyFromMessageReceiptHeader()
}

[Fact]
public void GetsKeyFromMessageReceiptBody()
public void GetsKeyFromTransportReceipt()
{
//Arrange
var document = XmlUtility.ToXmlDocument(ReceiptResponse.FunctionalTestEnvironment);
var signedXmlWithAgnosticId = new SignedXmlWithAgnosticId(document);
var xmlDokument = XmlUtility.ToXmlDocument(TransportKvittering.TransportOkKvittertingFunksjoneltTestmiljø);
var signedXmlWithAgnosticId = new SignedXmlWithAgnosticId(xmlDokument);

AddBodySignatureNodeToSignedXmlWithAgnosticId(document, signedXmlWithAgnosticId);
AddHeaderSignatureNodeToSignedXmlWithAgnosticId(xmlDokument, signedXmlWithAgnosticId);

//Act
var signingKey = GetPublicKey(signedXmlWithAgnosticId);
Expand Down Expand Up @@ -229,7 +224,7 @@ public void SignatureNodeAndBinarySecurityTokenAreAlike()
var binarySecurityToken = doc.SelectSingleNode("//wsse:BinarySecurityToken", mgr);
var key = new X509Certificate2(Convert.FromBase64String(binarySecurityToken.InnerText));

var publicKey = typeof (SignedXmlWithAgnosticId).GetMethod("GetPublicKey", BindingFlags.Instance | BindingFlags.NonPublic).Invoke(signedXmlWithAgnosticId, null) as AsymmetricAlgorithm;
var publicKey = typeof(SignedXmlWithAgnosticId).GetMethod("GetPublicKey", BindingFlags.Instance | BindingFlags.NonPublic).Invoke(signedXmlWithAgnosticId, null) as AsymmetricAlgorithm;

//Assert
Assert.Equal(publicKey.ToXmlString(false), key.PublicKey.Key.ToXmlString(false));
Expand Down
1 change: 0 additions & 1 deletion Difi.Felles.Utility.Tester/SertifikatUtility.cs
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@ public static X509Certificate2 GetValidSelfSignedTestCertificate()
return new X509Certificate2(ResourceUtility.ReadAllBytes(true, "Enhetstester", "ValidSelfSignedBringAs.cer"));
}


public static X509Certificate2 TestIntegrasjonssertifikat()
{
return GetPostenCertificate();
Expand Down
2 changes: 1 addition & 1 deletion Difi.Felles.Utility.Tester/Testdata/Transportkvittering.cs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ internal class TransportKvittering
public static string TransportOkKvittertingFunksjoneltTestmiljøMedInput(
string dokumentPakkeId = "4fa27c07-8a0f-45a9-954e-c658f6c480af@meldingsformidler.sdp.difi.no",
string securityBinary = "MIIE7jCCA9agAwIBAgIKGBj1bv99Jpi+EzANBgkqhkiG9w0BAQsFADBRMQswCQYDVQQGEwJOTzEdMBsGA1UECgwUQnV5cGFzcyBBUy05ODMxNjMzMjcxIzAhBgNVBAMMGkJ1eXBhc3MgQ2xhc3MgMyBUZXN0NCBDQSAzMB4XDTE0MDQyNDEyMzExMVoXDTE3MDQyNDIxNTkwMFowVTELMAkGA1UEBhMCTk8xGDAWBgNVBAoMD1BPU1RFTiBOT1JHRSBBUzEYMBYGA1UEAwwPUE9TVEVOIE5PUkdFIEFTMRIwEAYDVQQFEwk5ODQ2NjExODUwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQDLTnQryf2bmiyQ9q3ylQ6xMl7EhGIbjuziXkRTfL+M94m3ceAiko+r2piefKCiquLMK4j+UDcOapUtLC4dT4c6GhRH4FIOEn5aNS2I/njTenBypWka/VEhQUj7zvIh5G4UXIDIXYvLd7gideeMtkX24KUh2XVlh+PcqLGHirqBwVfFiTn5SKhr/ojhYYEb2xxTk3AY9nLd1MMffKQwUWmfoTos4scREYGI2R2vWxKWPcDqk+jig2DISWSJSuerz3HMYAAmp+Gjt0oFJNiyOFaFyGwT3DvqwOMQWwWXdmLh1NxMgTpghXAaXae76ucm9GDQ9E7ytf+JA096RWoi+5GtAgMBAAGjggHCMIIBvjAJBgNVHRMEAjAAMB8GA1UdIwQYMBaAFD+u9XgLkqNwIDVfWvr3JKBSAfBBMB0GA1UdDgQWBBTVyVLqcjWf1Qd0gsmCTrhXiWeqVDAOBgNVHQ8BAf8EBAMCBLAwFgYDVR0gBA8wDTALBglghEIBGgEAAwIwgbsGA1UdHwSBszCBsDA3oDWgM4YxaHR0cDovL2NybC50ZXN0NC5idXlwYXNzLm5vL2NybC9CUENsYXNzM1Q0Q0EzLmNybDB1oHOgcYZvbGRhcDovL2xkYXAudGVzdDQuYnV5cGFzcy5uby9kYz1CdXlwYXNzLGRjPU5PLENOPUJ1eXBhc3MlMjBDbGFzcyUyMDMlMjBUZXN0NCUyMENBJTIwMz9jZXJ0aWZpY2F0ZVJldm9jYXRpb25MaXN0MIGKBggrBgEFBQcBAQR+MHwwOwYIKwYBBQUHMAGGL2h0dHA6Ly9vY3NwLnRlc3Q0LmJ1eXBhc3Mubm8vb2NzcC9CUENsYXNzM1Q0Q0EzMD0GCCsGAQUFBzAChjFodHRwOi8vY3J0LnRlc3Q0LmJ1eXBhc3Mubm8vY3J0L0JQQ2xhc3MzVDRDQTMuY2VyMA0GCSqGSIb3DQEBCwUAA4IBAQCmMpAGaNplOgx3b4Qq6FLEcpnMOnPlSWBC7pQEDWx6OtNUHDm56fBoyVQYKR6LuGfalnnOKuB/sGSmO3eYlh7uDK9WA7bsNU/W8ZiwYwF6PBRui2rrqYk3kj4NLTNlyh/AOO1a2FDFHu369W0zcjj5ns7qs0K3peXtLX8pVxA8RmjwdGe69P/2r6s2A5CBj7oXZJD0Yo2dJFdsZzonT900sUi+MWzlhj3LxU5/684NWc2NI6ZPof/dyYpy3K/AFzpDLWGSmaDO66hPl7EfoJxEiX0DNBaQzNIyRFPh0ir0jM+32ZQ4goR8bAtyhKeTyA/4+Qx1WQXS3wURCC0lsbMh"
)
)
{
return $"<env:Envelope xmlns:env=\"http://www.w3.org/2003/05/soap-envelope\"><env:Header><wsse:Security xmlns:wsse=\"http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd\" xmlns:wsu=\"http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd\" env:mustUnderstand=\"true\"><wsse:BinarySecurityToken EncodingType=\"http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-soap-message-security-1.0#Base64Binary\" ValueType=\"http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-x509-token-profile-1.0#X509v3\" wsu:Id=\"X509-aeb92311-5546-469e-b5e4-43e6ab95f3cb\">{securityBinary}</wsse:BinarySecurityToken><wsu:Timestamp wsu:Id=\"TS-a6855fa9-caef-4e05-bf70-6e1c64f8af30\"><wsu:Created>2015-10-22T14:27:47.188Z</wsu:Created><wsu:Expires>2015-10-22T14:32:47.188Z</wsu:Expires></wsu:Timestamp><ds:Signature xmlns:ds=\"http://www.w3.org/2000/09/xmldsig#\" Id=\"SIG-30bbc323-3557-4c21-afb1-b491839039de\"><ds:SignedInfo><ds:CanonicalizationMethod Algorithm=\"http://www.w3.org/2001/10/xml-exc-c14n#\"><ec:InclusiveNamespaces xmlns:ec=\"http://www.w3.org/2001/10/xml-exc-c14n#\" PrefixList=\"env\" /></ds:CanonicalizationMethod><ds:SignatureMethod Algorithm=\"http://www.w3.org/2001/04/xmldsig-more#rsa-sha256\" /><ds:Reference URI=\"#id-364cf5cf-c218-4f9f-b8a1-508ff8d44be6\"><ds:Transforms><ds:Transform Algorithm=\"http://www.w3.org/2001/10/xml-exc-c14n#\"><ec:InclusiveNamespaces xmlns:ec=\"http://www.w3.org/2001/10/xml-exc-c14n#\" PrefixList=\"\" /></ds:Transform></ds:Transforms><ds:DigestMethod Algorithm=\"http://www.w3.org/2001/04/xmlenc#sha256\" /><ds:DigestValue>XryysQP3I8XTSL9icB3WCy17JxqqZIvNchNVzr9/rbc=</ds:DigestValue></ds:Reference><ds:Reference URI=\"#TS-a6855fa9-caef-4e05-bf70-6e1c64f8af30\"><ds:Transforms><ds:Transform Algorithm=\"http://www.w3.org/2001/10/xml-exc-c14n#\"><ec:InclusiveNamespaces xmlns:ec=\"http://www.w3.org/2001/10/xml-exc-c14n#\" PrefixList=\"wsse env\" /></ds:Transform></ds:Transforms><ds:DigestMethod Algorithm=\"http://www.w3.org/2001/04/xmlenc#sha256\" /><ds:DigestValue>PuFI7dA66+N5d4Cov7GAdXYQq3wKBe8FwGknZtH/s4E=</ds:DigestValue></ds:Reference><ds:Reference URI=\"#id-32f63b6e-871a-4926-9f39-47ca5428f5dd\"><ds:Transforms><ds:Transform Algorithm=\"http://www.w3.org/2001/10/xml-exc-c14n#\"><ec:InclusiveNamespaces xmlns:ec=\"http://www.w3.org/2001/10/xml-exc-c14n#\" PrefixList=\"\" /></ds:Transform></ds:Transforms><ds:DigestMethod Algorithm=\"http://www.w3.org/2001/04/xmlenc#sha256\" /><ds:DigestValue>XI9g0I9fGSf/NVJVxe43kKCgF0OFdTc3F9SXSkE5PxA=</ds:DigestValue></ds:Reference></ds:SignedInfo><ds:SignatureValue>iHhXDHohEm9cFfqz6sLc5JTUULKmhqXqCNKqDA+LoJETaR7mLF6buwlSBX4cDms6BbfY//z1RRxM8g6bEfjZtaPGBoRUUH5ar4+jJX74NDoFa37CPN/YjLNYfx98Ld5Gidx/DljDlXQg3NTwYks8LXj1NyjTWC1bQGVFA4Gw7WC81GrUpRTP8fN/WhiN3hliZB3Q04K6KLFq1DH7aYxEvlYkziXBE7pYjdeFLmFGm+cVkVWG4j2t0GCJ8c75XIXHh1ZXhAUwKUHislP3gJ0z0Jmmvbcn6oLcSdCHJ1WYwGe5sxfPiGIbfKwYR3DsyqTTyOnXsqGP/S9vUndQ/bpQDQ==</ds:SignatureValue><ds:KeyInfo Id=\"KI-f13436c9-4d8f-448a-a1ca-144612196271\"><wsse:SecurityTokenReference wsu:Id=\"STR-89d7395a-24f2-47a7-b79a-95679f4cbc31\"><wsse:Reference URI=\"#X509-aeb92311-5546-469e-b5e4-43e6ab95f3cb\" ValueType=\"http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-x509-token-profile-1.0#X509v3\" /></wsse:SecurityTokenReference></ds:KeyInfo></ds:Signature></wsse:Security><eb:Messaging xmlns:eb=\"http://docs.oasis-open.org/ebxml-msg/ebms/v3.0/ns/core/200704/\" xmlns:wsu=\"http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd\" env:mustUnderstand=\"true\" wsu:Id=\"id-32f63b6e-871a-4926-9f39-47ca5428f5dd\"><ns6:SignalMessage xmlns:ns10=\"http://uri.etsi.org/2918/v1.2.1#\" xmlns:ns11=\"http://uri.etsi.org/01903/v1.3.2#\" xmlns:ns2=\"http://schemas.xmlsoap.org/soap/envelope/\" xmlns:ns3=\"http://www.unece.org/cefact/namespaces/StandardBusinessDocumentHeader\" xmlns:ns4=\"http://www.w3.org/2003/05/soap-envelope\" xmlns:ns5=\"http://www.w3.org/2000/09/xmldsig#\" xmlns:ns6=\"http://docs.oasis-open.org/ebxml-msg/ebms/v3.0/ns/core/200704/\" xmlns:ns7=\"http://docs.oasis-open.org/ebxml-bp/ebbp-signals-2.0\" xmlns:ns8=\"http://www.w3.org/1999/xlink\" xmlns:ns9=\"http://begrep.difi.no/sdp/schema_v10\"><ns6:MessageInfo><ns6:Timestamp>2015-10-22T16:27:47.187+02:00</ns6:Timestamp><ns6:MessageId>604d8104-d957-435c-a7ec-d5611f97f249</ns6:MessageId><ns6:RefToMessageId>388214db-29cc-43c7-9543-877e017e5bb4</ns6:RefToMessageId></ns6:MessageInfo><ns6:Receipt><ns7:NonRepudiationInformation><ns7:MessagePartNRInformation><ns5:Reference URI=\"cid:{dokumentPakkeId}\"><ns5:Transforms><ns5:Transform Algorithm=\"http://docs.oasis-open.org/wss/oasis-wss-SwAProfile-1.1#Attachment-Content-Signature-Transform\" /></ns5:Transforms><ns5:DigestMethod Algorithm=\"http://www.w3.org/2001/04/xmlenc#sha256\" /><ns5:DigestValue>5jQFrdmBGPCSWj5Sq4bVoYyfrF8vAYqKl1h3m/l1j5o=</ns5:DigestValue></ns5:Reference></ns7:MessagePartNRInformation><ns7:MessagePartNRInformation><ns5:Reference URI=\"#soapBody\"><ns5:Transforms><ns5:Transform Algorithm=\"http://www.w3.org/2001/10/xml-exc-c14n#\" /></ns5:Transforms><ns5:DigestMethod Algorithm=\"http://www.w3.org/2001/04/xmlenc#sha256\" /><ns5:DigestValue>clCREk3SJj5Y+FZ9oD8cnlMg1SDR74d8rXNcZQQIl8A=</ns5:DigestValue></ns5:Reference></ns7:MessagePartNRInformation></ns7:NonRepudiationInformation></ns6:Receipt></ns6:SignalMessage></eb:Messaging></env:Header><env:Body xmlns:wsu=\"http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd\" wsu:Id=\"id-364cf5cf-c218-4f9f-b8a1-508ff8d44be6\" /></env:Envelope>";
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,8 @@

namespace Difi.Felles.Utility.Tester.Utilities
{

public class CertificateChainUtilityTests
{

public class TestsertifikaterMethod : CertificateChainUtilityTests
{
[Fact]
Expand All @@ -26,7 +24,6 @@ public void ReturnererFireSertifikaterMedThumbprint()
}
}


public class ProduksjonssertifikaterMethod : CertificateChainUtilityTests
{
[Fact]
Expand All @@ -45,19 +42,17 @@ public void ReturnererFireSertifikaterMedThumbprint()
}
}


public class CertificateChainInfoTests : CertificateChainUtilityTests
{
[Fact]
public void DebugMesages()
{
int i = 0;
var i = 0;
foreach (var certificate in CertificateChainUtility.TestCertificates())
{
Trace.WriteLine($"{i++}: Issuer `{certificate.Issuer}`, thumbprint `{certificate.Thumbprint}`");
}
}

}
}
}
Loading

0 comments on commit 9781f1b

Please sign in to comment.