summaryrefslogtreecommitdiff
path: root/eaaf_core_utils/src/test
diff options
context:
space:
mode:
Diffstat (limited to 'eaaf_core_utils/src/test')
-rw-r--r--eaaf_core_utils/src/test/java/at/gv/egiz/eaaf/core/test/credentials/EaafKeyStoreFactoryTest.java83
-rw-r--r--eaaf_core_utils/src/test/java/at/gv/egiz/eaaf/core/test/credentials/InlineKeyStoreTest.java140
-rw-r--r--eaaf_core_utils/src/test/resources/data/certs/BRZStammCA201.pem33
-rw-r--r--eaaf_core_utils/src/test/resources/data/certs/invalidCertificate.pem19
-rw-r--r--eaaf_core_utils/src/test/resources/data/certs/privateEcKey.pem5
-rw-r--r--eaaf_core_utils/src/test/resources/data/certs/privateKey.pem28
-rw-r--r--eaaf_core_utils/src/test/resources/data/certs/selfSignedCertificate.pem19
-rw-r--r--eaaf_core_utils/src/test/resources/data/certs/selfSignedEcCertificate.pem11
8 files changed, 338 insertions, 0 deletions
diff --git a/eaaf_core_utils/src/test/java/at/gv/egiz/eaaf/core/test/credentials/EaafKeyStoreFactoryTest.java b/eaaf_core_utils/src/test/java/at/gv/egiz/eaaf/core/test/credentials/EaafKeyStoreFactoryTest.java
index 3e82c510..932beb31 100644
--- a/eaaf_core_utils/src/test/java/at/gv/egiz/eaaf/core/test/credentials/EaafKeyStoreFactoryTest.java
+++ b/eaaf_core_utils/src/test/java/at/gv/egiz/eaaf/core/test/credentials/EaafKeyStoreFactoryTest.java
@@ -1,5 +1,8 @@
package at.gv.egiz.eaaf.core.test.credentials;
+import static org.junit.Assert.assertThrows;
+import static org.junit.jupiter.api.Assertions.assertEquals;
+
import java.security.Key;
import java.security.KeyStore;
import java.security.KeyStoreException;
@@ -385,6 +388,86 @@ public class EaafKeyStoreFactoryTest {
@Test
@DirtiesContext(methodMode = MethodMode.BEFORE_METHOD)
+ public void inlineKeyStoreMissingPath() throws EaafException {
+ final EaafKeyStoreFactory keyStoreFactory = context.getBean(EaafKeyStoreFactory.class);
+ Assert.assertFalse("HSM Facade state wrong", keyStoreFactory.isHsmFacadeInitialized());
+
+ final KeyStoreConfiguration keyStoreConfig = new KeyStoreConfiguration();
+ keyStoreConfig.setKeyStoreType(KeyStoreType.INLINE);
+
+ EaafConfigurationException error = assertThrows("wrong exception", EaafConfigurationException.class,
+ () -> keyStoreConfig.validate());
+ assertEquals("internal.keystore.07", error.getErrorId(), "wrong errorcode");
+
+ }
+
+ @Test
+ @DirtiesContext(methodMode = MethodMode.BEFORE_METHOD)
+ public void inlineKeyStoreSuccess() throws EaafException {
+ final EaafKeyStoreFactory keyStoreFactory = context.getBean(EaafKeyStoreFactory.class);
+ Assert.assertFalse("HSM Facade state wrong", keyStoreFactory.isHsmFacadeInitialized());
+
+ final KeyStoreConfiguration keyStoreConfig = new KeyStoreConfiguration();
+ keyStoreConfig.setKeyStoreType(KeyStoreType.INLINE);
+ keyStoreConfig.setSoftKeyStoreFilePath(
+ "pkcs12:keystore?private=src/test/resources/data/certs/privateKey.pem"
+ + "&cert=src/test/resources/data/certs/selfSignedCertificate.pem"
+ + "&cert=src/test/resources/data/certs/issuingCa.pem&cert=certs/BRZStammCA201.pem");
+
+ keyStoreConfig.validate();
+
+ final Pair<KeyStore, Provider> keyStore = keyStoreFactory.buildNewKeyStore(keyStoreConfig);
+ Assert.assertNotNull("KeyStore is null", keyStore);
+ Assert.assertNotNull("KeyStore is null", keyStore.getFirst());
+ Assert.assertNull("KeyStore is null", keyStore.getSecond());
+
+ }
+
+ @Test
+ @DirtiesContext(methodMode = MethodMode.BEFORE_METHOD)
+ public void inlineKeyStoreEccSuccess() throws EaafException {
+ final EaafKeyStoreFactory keyStoreFactory = context.getBean(EaafKeyStoreFactory.class);
+ Assert.assertFalse("HSM Facade state wrong", keyStoreFactory.isHsmFacadeInitialized());
+
+ final KeyStoreConfiguration keyStoreConfig = new KeyStoreConfiguration();
+ keyStoreConfig.setKeyStoreType(KeyStoreType.INLINE);
+ keyStoreConfig.setSoftKeyStoreFilePath(
+ "pkcs12:keystore?private=src/test/resources/data/certs/privateEcKey.pem"
+ + "&cert=src/test/resources/data/certs/selfSignedEcCertificate.pem"
+ + "&cert=src/test/resources/data/certs/issuingCa.pem&cert=certs/BRZStammCA201.pem");
+
+ keyStoreConfig.validate();
+
+ final Pair<KeyStore, Provider> keyStore = keyStoreFactory.buildNewKeyStore(keyStoreConfig);
+ Assert.assertNotNull("KeyStore is null", keyStore);
+ Assert.assertNotNull("KeyStore is null", keyStore.getFirst());
+ Assert.assertNull("KeyStore is null", keyStore.getSecond());
+
+ }
+
+ @Test
+ @DirtiesContext(methodMode = MethodMode.BEFORE_METHOD)
+ public void inlineKeyStoreWrongKeys() throws EaafException {
+ final EaafKeyStoreFactory keyStoreFactory = context.getBean(EaafKeyStoreFactory.class);
+ Assert.assertFalse("HSM Facade state wrong", keyStoreFactory.isHsmFacadeInitialized());
+
+ final KeyStoreConfiguration keyStoreConfig = new KeyStoreConfiguration();
+ keyStoreConfig.setKeyStoreType(KeyStoreType.INLINE);
+ keyStoreConfig.setSoftKeyStoreFilePath(
+ "pkcs12:keystore?private=src/test/resources/data/certs/privateNotExist.pem"
+ + "&cert=src/test/resources/data/certs/selfSignedCertificate.pem"
+ + "&cert=src/test/resources/data/certs/issuingCa.pem&cert=certs/BRZStammCA201.pem");
+
+ keyStoreConfig.validate();
+
+ EaafConfigurationException error = assertThrows("wrong exception", EaafConfigurationException.class,
+ () -> keyStoreFactory.buildNewKeyStore(keyStoreConfig));
+ assertEquals("internal.keystore.15", error.getErrorId(), "wrong errorcode");
+
+ }
+
+ @Test
+ @DirtiesContext(methodMode = MethodMode.BEFORE_METHOD)
public void symmetricSoftwareKeyWithOutConfig() {
final EaafKeyStoreFactory keyStoreFactory = context.getBean(EaafKeyStoreFactory.class);
Assert.assertFalse("HSM Facade state wrong", keyStoreFactory.isHsmFacadeInitialized());
diff --git a/eaaf_core_utils/src/test/java/at/gv/egiz/eaaf/core/test/credentials/InlineKeyStoreTest.java b/eaaf_core_utils/src/test/java/at/gv/egiz/eaaf/core/test/credentials/InlineKeyStoreTest.java
new file mode 100644
index 00000000..d4419956
--- /dev/null
+++ b/eaaf_core_utils/src/test/java/at/gv/egiz/eaaf/core/test/credentials/InlineKeyStoreTest.java
@@ -0,0 +1,140 @@
+package at.gv.egiz.eaaf.core.test.credentials;
+
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertThrows;
+
+import java.net.URL;
+
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.core.io.ResourceLoader;
+import org.springframework.test.annotation.DirtiesContext;
+import org.springframework.test.annotation.DirtiesContext.ClassMode;
+import org.springframework.test.context.ContextConfiguration;
+import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
+
+import at.gv.egiz.eaaf.core.exceptions.EaafException;
+import at.gv.egiz.eaaf.core.impl.credential.inline.InlineKeyStoreParser;
+import at.gv.egiz.eaaf.core.test.dummy.DummyAuthConfigMap;
+import lombok.SneakyThrows;
+
+@RunWith(SpringJUnit4ClassRunner.class)
+@ContextConfiguration("/spring/test_eaaf_pvp_lazy.beans.xml")
+@DirtiesContext(classMode = ClassMode.BEFORE_EACH_TEST_METHOD)
+public class InlineKeyStoreTest {
+
+ @Autowired
+ private DummyAuthConfigMap mapConfig;
+
+ @Autowired
+ private ResourceLoader resourceLoader;
+
+ @Test
+ @SneakyThrows
+ public void inlineKeyStoreEccSuccess() throws EaafException {
+ assertNotNull("no keystore", InlineKeyStoreParser.buildKeyStore(
+ new URL(null,
+ "pkcs12:keystore?private=src/test/resources/data/certs/privateEcKey.pem"
+ + "&cert=src/test/resources/data/certs/selfSignedEcCertificate.pem",
+ new InlineKeyStoreParser()),
+ resourceLoader,
+ mapConfig.getConfigurationRootDirectory()));
+
+ }
+
+ @Test
+ @SneakyThrows
+ public void inlineTrustStoreSuccess() throws EaafException {
+ assertNotNull("no keystore", InlineKeyStoreParser.buildKeyStore(
+ new URL(null,
+ "pkcs12:truststore?"
+ + "cert=src/test/resources/data/certs/selfSignedEcCertificate.pem",
+ new InlineKeyStoreParser()),
+ resourceLoader,
+ mapConfig.getConfigurationRootDirectory()));
+
+ }
+
+ @Test
+ @SneakyThrows
+ public void inlineKeyStoreSymSuccess() throws EaafException {
+ assertNotNull("no keystore", InlineKeyStoreParser.buildKeyStore(
+ new URL(null,
+ "pkcs12:keystore?"
+ + "inlineSecret=mxuqEAXci2cMNU5FCdbxIaNzJoMv%2FWds7j9gY992TTw%3D",
+ new InlineKeyStoreParser()),
+ resourceLoader,
+ mapConfig.getConfigurationRootDirectory()));
+
+ }
+
+ @Test
+ @SneakyThrows
+ public void invalidCertFile() throws EaafException {
+ check("pkcs12:keystore?"
+ + "private=src/test/resources/data/certs/privateEcKey.pem"
+ + "&cert=src/test/resources/data/certs/invalidCertificate.pem");
+
+ }
+
+ @Test
+ @SneakyThrows
+ public void missingKey() throws EaafException {
+ check("pkcs12:keystore?"
+ + "cert=src/test/resources/data/certs/selfSignedEcCertificate.pem"
+ + "&cert=src/test/resources/data/certs/BRZStammCA201.pem");
+
+ }
+
+ @Test
+ @SneakyThrows
+ public void missingCert() throws EaafException {
+ check("pkcs12:keystore?"
+ + "private=src/test/resources/data/certs/privateEcKey.pem");
+
+ }
+
+ @Test
+ @SneakyThrows
+ public void invalidType() throws EaafException {
+ check("pkcs12:unknown?"
+ + "private=src/test/resources/data/certs/privateEcKey.pem");
+
+ }
+
+ @Test
+ @SneakyThrows
+ public void twoKeyFiles() throws EaafException {
+ check("pkcs12:keystore?"
+ + "cert=src/test/resources/data/certs/selfSignedEcCertificate.pem"
+ + "&private=src/test/resources/data/certs/privateEcKey.pem"
+ + "&private=src/test/resources/data/certs/privateEcKey.pem");
+
+ }
+
+ @Test
+ @SneakyThrows
+ public void twoSymKeyFiles() throws EaafException {
+ check("pkcs12:keystore?"
+ + "inlineSecret=mxuqEAXci2cMNU5FCdbxIaNzJoMv%2FWds7j9gY992TTw%3D"
+ + "&inlineSecret=mxuqEAXci2cMNU5FCdbxIaNzJoMv%2FWds7j9gY992TTw%3D");
+
+ }
+
+ @Test
+ @SneakyThrows
+ public void missingParams() throws EaafException {
+ check("pkcs12:keystore");
+
+ }
+
+ private void check(String url) {
+ assertThrows(IllegalArgumentException.class,
+ () -> InlineKeyStoreParser.buildKeyStore(
+ new URL(null, url, new InlineKeyStoreParser()), resourceLoader,
+ mapConfig.getConfigurationRootDirectory()));
+
+ }
+
+}
diff --git a/eaaf_core_utils/src/test/resources/data/certs/BRZStammCA201.pem b/eaaf_core_utils/src/test/resources/data/certs/BRZStammCA201.pem
new file mode 100644
index 00000000..2ff92f54
--- /dev/null
+++ b/eaaf_core_utils/src/test/resources/data/certs/BRZStammCA201.pem
@@ -0,0 +1,33 @@
+-----BEGIN CERTIFICATE-----
+MIIFtzCCA5+gAwIBAgIIJXWL7AxEWoAwDQYJKoZIhvcNAQELBQAwXDELMAkGA1UE
+BhMCQVQxITAfBgNVBAoTGEJ1bmRlc3JlY2hlbnplbnRydW0gR21iSDEPMA0GA1UE
+CxMGQlJaIENBMRkwFwYDVQQDExBCUlotU3RhbW1DQS0yLTAxMB4XDTEzMDcwOTA3
+MDU1OVoXDTI4MDcwOTA3MDU1OVowXDELMAkGA1UEBhMCQVQxITAfBgNVBAoTGEJ1
+bmRlc3JlY2hlbnplbnRydW0gR21iSDEPMA0GA1UECxMGQlJaIENBMRkwFwYDVQQD
+ExBCUlotU3RhbW1DQS0yLTAxMIICIjANBgkqhkiG9w0BAQEFAAOCAg8AMIICCgKC
+AgEAx5iCz1dd/UHXQcI2l87ZGIXynvZv32NNKJfk2sw73Y51Zxn5WAoU92WLN7jH
+ajWVZYN4MqP/gOTpYTioFHVFIURrE3IjNQnaZt53lYBQW7Z7ZlDJG32pGNNeNEWG
+0rzrwRwpjdfVNf0eblw64kzfOVgLSvZjoSzpbkIHaB4WWTAdnvJTHZZl2zommKIH
+vTaf0nNv1lBWOCDO/uii+nrtFebnOcOmp09zwFoo78N8ujPmjpcO54EoKeczHr0P
+PEfEc+tFiPbIMb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hnuGSGe2PGh9/bWtpCcSy4YpWIGtC
+rbDchVB0HwuCuWbjWyvKcYSAdyomcUXtFv7PLejsS+qSMwHOYD2u08ob0a9jUVSz
+MGt1Za0cAuQbdyd2DS+tz/ZPJWUfhskArP2R3TvG0o2VYXaJggFSFBS1lCcbG1c0
+AxDwnb51qVrFnKNHtf41KkNkBurCW1ivp9gLD88KsDXdKMFp833d2CobiOQ7Qdyz
+hJ6g+4+HvoPh3ePls8vdtod51vXWXZFf3Rum
+-----END CERTIFICATE----- \ No newline at end of file
diff --git a/eaaf_core_utils/src/test/resources/data/certs/invalidCertificate.pem b/eaaf_core_utils/src/test/resources/data/certs/invalidCertificate.pem
new file mode 100644
index 00000000..bdabde6c
--- /dev/null
+++ b/eaaf_core_utils/src/test/resources/data/certs/invalidCertificate.pem
@@ -0,0 +1,19 @@
+-----BEGIN CERTIFICATE-----
+MIIDCjCCAfKgAwIBAgIJAL1NdwD4ilEZMA0GCSqGSIb3DQEBCwUAMBoxGDAWBgNV
+BAMMD1Rlc3RDZXJ0aWZpY2F0ZTAeFw0yMjAzMDExNDU0NTBaFw0yMzAzMDExNDU0
+NTBaMBoxGDAWBgNVBAMMD1Rlc3RDZXJ0aWZpY2F0ZTCCASIwDQYJKoZIhvcNAQEB
+BQADggEPADCCAQoCggEBAMfBJLAB0zebXutx4vHXRpwbw31SlABtOUvlcZLN0EDV
+TKO5NlIgSzlbjI1o+/KcEwIvT3J8MbqBTe7SCxiXKtiDCRPOWYLgGnCiEeyiRu8c
+hFFfvXER+Xh2o2H771tdIAglaNWrAREZNmr2iMNITXsvV1RJeEAnax8XviWAAdFg
+S7C+jDrRoN7YJ/74tKi+/UJJmjxQDtjds9oErcPvd7aj6RPc8p9SDx3WSL8A0/6y
+1AWavNYIbdQOY0xF4tGEnSm6ZLHlS3CZ2dvHlDdEhBEU4z0oSLjWn4Ty19oK46p7
+7YxHEGFKrQnXxICUMbG8KG1ycG4jE5XKT6vxkLdtYSMCAwEAAaNTMFEwHQYDVR0O
+BBYEFGJMN/2sdcWk2lhSfCHQZ9yX7BfnMB8GA1UdIwQYMBaAFGJMN/2sdcWk2lhS
+fCHQZ9yX7BfnMA8GA1UdEwEB/wQFMAMBAf8wDQYJKoZIhvcNAQELBQADggEBACzj
+me1bqCbZXjPRIu7UCdIEqpeObd+c0Jd/Ba+tfeXymF1SKdxDo1MaVwHi+BpNfmYM
+9hCOTZcLlWY/ejD4XhhV2kYIo+7MxRrGP3B20+hJG+JiGmyDtsmEAWMJG+VZ5G+u
+fodyjuPl7KZXujdGwB2di9YIX//VRxyBka7ilq2vaabbcyapFVdB6s1mNEiFaLkrU0
+h7miSPA2p5KfStw4zJ62iyqhiouDUIpMOvblRTkgE4JToCjJn4cfo9gBmwtU1tg5
+VBlO992YteGRKN5FR1C0BkK/R5pnuhcifX7tPA+gGf/G2Jwv/m32huPylVojzVEz
+mH3QhlOXXl/1GbJ2vYc=
+-----END CERTIFICATE-----
diff --git a/eaaf_core_utils/src/test/resources/data/certs/privateEcKey.pem b/eaaf_core_utils/src/test/resources/data/certs/privateEcKey.pem
new file mode 100644
index 00000000..d26bf7d6
--- /dev/null
+++ b/eaaf_core_utils/src/test/resources/data/certs/privateEcKey.pem
@@ -0,0 +1,5 @@
+-----BEGIN EC PRIVATE KEY-----
+MHcCAQEEIP3hE9RxmkYpQ+ic7FFJo26fHqMVzY/0idtQ4boi2z9BoAoGCCqGSM49
+AwEHoUQDQgAEN3saobVAMfR09+ngfs0y2QIaDUELTgvtPSgihR4Pr6z9e4HMaeGD
+vZXn7knl/dEk8KuhqTmg5Y3d41suKvN9yw==
+-----END EC PRIVATE KEY----- \ No newline at end of file
diff --git a/eaaf_core_utils/src/test/resources/data/certs/privateKey.pem b/eaaf_core_utils/src/test/resources/data/certs/privateKey.pem
new file mode 100644
index 00000000..acceb747
--- /dev/null
+++ b/eaaf_core_utils/src/test/resources/data/certs/privateKey.pem
@@ -0,0 +1,28 @@
+-----BEGIN PRIVATE KEY-----
+MIIEvQI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mWkFbsP6HA5KBif/GV00kK7JM5TM5sr6rLYKoCnCdCOxcg7
+eyAw2at9iwKBgGxWpDcXz/6IP622qxJBaLFRFLT3Xhp99T+HUq2ZDKDWbNA2ORUd
+I1RQFnrNJOwpd5TSmTnBh0VE5PIwZvrBoA10DMjicn22LgAQ8mMZ9kC+0b9TkY6w
+ezrJNY6CfA2vufxHMzO4JEn0You61CFv2wSqtl0tt77nHxwPNBSBKohRAoGAV1ba
+g9kREvcd0C8V/CKwM728JG5Wfh4pz8w8pup3VNLt4nypRvTYDofaIeX30cTKIIOh
+xf3FUuBnQaUobGvqEIfVqV5FNFS/+x/6z/3GLvqRcszwn2WuQvGrsJ9RI59n08ka
+9poduXfu2SBjsD09HgZM/g6QmkSRczVB2iuVVycCgYEAiPUQtNmqPkHrIIbw69CK
+Pg3s3/L+Psl4yapuaREFcj1hgemOjsDPtwWCoFPbMnsn5MsiUyyhk5V9aeQL081a
+5r87dQxB2jSUAIurNj5nBz4oNqk1MhJMB1Eiv70+LT8rihHM33QYb2bgrwLjF3un
++cCXwCw5u64YJBBMeFRKW8Q=
+-----END PRIVATE KEY----- \ No newline at end of file
diff --git a/eaaf_core_utils/src/test/resources/data/certs/selfSignedCertificate.pem b/eaaf_core_utils/src/test/resources/data/certs/selfSignedCertificate.pem
new file mode 100644
index 00000000..a0e8b26c
--- /dev/null
+++ b/eaaf_core_utils/src/test/resources/data/certs/selfSignedCertificate.pem
@@ -0,0 +1,19 @@
+-----BEGIN CERTIFICATE-----
+MIIDCjCCAfKgAwIBAgIJAL1NdwD4ilEZMA0GCSqGSIb3DQEBCwUAMBoxGDAWBgNV
+BAMMD1Rlc3RDZXJ0aWZpY2F0ZTAeFw0yMjAzMDExNDU0NTBaFw0yMzAzMDExNDU0
+NTBaMBoxGDAWBgNVBAMMD1Rlc3RDZXJ0aWZpY2F0ZTCCASIwDQYJKoZIhvcNAQEB
+BQADggEPADCCAQoCggEBAMfBJLAB0zebXutx4vHXRpwbw31SlABtOUvlcZLN0EDV
+TKO5NlIgSzlbjI1o+/KcEwIvT3J8MbqBTe7SCxiXKtiDCRPOWYLgGnCiEeyiRu8c
+hFFfvXER+Xh2o2H771tdIAglaNWrAREZNmr2iMNITXsvV1RJeEAnax8XviWAAdFg
+S7C+jDrRoN7YJ/74tKi+/UJJmjxQDtjds9oErcPvd7aj6RPc8p9SDx3WSL8A0/6y
+1AWavNYIbdQOY0xF4tGEnSm6ZLHlS3CZ2dvHlDdEhBEU4z0oSLjWn4Ty19oK46p7
+7YxHEGFKrQnXxICUMbG8KG1ycG4jE5XKT6vxkLdtYSMCAwEAAaNTMFEwHQYDVR0O
+BBYEFGJMN/2sdcWk2lhSfCHQZ9yX7BfnMB8GA1UdIwQYMBaAFGJMN/2sdcWk2lhS
+fCHQZ9yX7BfnMA8GA1UdEwEB/wQFMAMBAf8wDQYJKoZIhvcNAQELBQADggEBACzj
+me1bqCbZXjPRIu7UCdIEqpeObd+c0Jd/Ba+tfeXymF1SKdxDo1MaVwHi+BpNfmYM
+9hCOTZcLlWY/ejD4XhhV2kYIo+7MxRrGP3B20+hJG+JiGmyDtsmEAWMJG+VZ5G+u
+fodyjuPl7KZXujdGwB2di9YIX//VRxyBka7ilq2vxJayapFVdB6s1mNEiFaLkrU0
+h7miSPA2p5KfStw4zJ62iyqhiouDUIpMOvblRTkgE4JToCjJn4cfo9gBmwtU1tg5
+VBlO992YteGRKN5FR1C0BkK/R5pnuhcifX7tPA+gGf/G2Jwv/m32huPylVojzVEz
+mH3QhlOXXl/1GbJ2vYc=
+-----END CERTIFICATE----- \ No newline at end of file
diff --git a/eaaf_core_utils/src/test/resources/data/certs/selfSignedEcCertificate.pem b/eaaf_core_utils/src/test/resources/data/certs/selfSignedEcCertificate.pem
new file mode 100644
index 00000000..0661abe7
--- /dev/null
+++ b/eaaf_core_utils/src/test/resources/data/certs/selfSignedEcCertificate.pem
@@ -0,0 +1,11 @@
+-----BEGIN CERTIFICATE-----
+MIIBgzCCASigAwIBAgIJALymKU17CVm/MAoGCCqGSM49BAMCMBwxGjAYBgNVBAMM
+EUVjVGVzdENlcnRpZmljYXRlMB4XDTIyMDMxNjE1NTE0NFoXDTIzMDMxNjE1NTE0
+NFowHDEaMBgGA1UEAwwRRWNUZXN0Q2VydGlmaWNhdGUwWTATBgcqhkjOPQIBBggq
+hkjOPQMBBwNCAAQ3exqhtUAx9HT36eB+zTLZAhoNQQtOC+09KCKFHg+vrP17gcxp
+4YO9lefuSeX90STwq6GpOaDljd3jWy4q833Lo1MwUTAdBgNVHQ4EFgQUFZbLWq9o
+08GPaT1p8QsWhSO3+ZEwHwYDVR0jBBgwFoAUFZbLWq9o08GPaT1p8QsWhSO3+ZEw
+DwYDVR0TAQH/BAUwAwEB/zAKBggqhkjOPQQDAgNJADBGAiEApUpgRRjAO0F3Ti2L
+bZFC+MltwSZyD3Xg4volOvOlk8QCIQDU3B5qpTQ6+pAxu6PpPFog0VZCMR7Ol7cJ
+mjsOOak7TQ==
+-----END CERTIFICATE----- \ No newline at end of file