diff --git a/src/NATS.Client.Core/Internal/SslClientAuthenticationOptionsExtensions.cs b/src/NATS.Client.Core/Internal/SslClientAuthenticationOptionsExtensions.cs
index e5476cd55..fce04db4a 100644
--- a/src/NATS.Client.Core/Internal/SslClientAuthenticationOptionsExtensions.cs
+++ b/src/NATS.Client.Core/Internal/SslClientAuthenticationOptionsExtensions.cs
@@ -8,9 +8,18 @@ namespace NATS.Client.Core.Internal;
internal static class SslClientAuthenticationOptionsExtensions
{
#if !NETSTANDARD
- public static SslClientAuthenticationOptions LoadClientCertFromPem(this SslClientAuthenticationOptions options, string certPem, string keyPem, bool offline = false, SslCertificateTrust? trust = null)
+ public static SslClientAuthenticationOptions LoadClientCertFromPem(this SslClientAuthenticationOptions options, string certPem, string keyPem, bool offline = false, SslCertificateTrust? trust = null, string? password = null)
{
- var leafCert = X509Certificate2.CreateFromPem(certPem, keyPem);
+ X509Certificate2 leafCert;
+ if (!string.IsNullOrEmpty(password))
+ {
+ leafCert = X509Certificate2.CreateFromEncryptedPem(certPem, keyPem, password);
+ }
+ else
+ {
+ leafCert = X509Certificate2.CreateFromPem(certPem, keyPem);
+ }
+
var intermediateCerts = new X509Certificate2Collection();
intermediateCerts.ImportFromPem(certPem);
if (intermediateCerts.Count > 0)
@@ -39,11 +48,21 @@ public static SslClientAuthenticationOptions LoadClientCertFromPem(this SslClien
}
#endif
- public static SslClientAuthenticationOptions LoadClientCertFromPfxFile(this SslClientAuthenticationOptions options, string certBundleFile, bool offline = false, SslCertificateTrust? trust = null)
+ public static SslClientAuthenticationOptions LoadClientCertFromPfxFile(this SslClientAuthenticationOptions options, string certBundleFile, bool offline = false, SslCertificateTrust? trust = null, string? password = null)
{
- var leafCert = new X509Certificate2(certBundleFile);
+ X509Certificate2 leafCert;
var intermediateCerts = new X509Certificate2Collection();
- intermediateCerts.Import(certBundleFile);
+
+ if (password != null)
+ {
+ leafCert = new X509Certificate2(certBundleFile, password);
+ intermediateCerts.Import(certBundleFile, password, X509KeyStorageFlags.DefaultKeySet);
+ }
+ else
+ {
+ leafCert = new X509Certificate2(certBundleFile);
+ intermediateCerts.Import(certBundleFile);
+ }
// Linux does not include the leaf by default, but Windows does
// compare leaf to first intermediate just to be sure to catch all platform differences
diff --git a/src/NATS.Client.Core/NatsTlsOpts.cs b/src/NATS.Client.Core/NatsTlsOpts.cs
index 737184f56..760e6fca0 100644
--- a/src/NATS.Client.Core/NatsTlsOpts.cs
+++ b/src/NATS.Client.Core/NatsTlsOpts.cs
@@ -62,20 +62,30 @@ public sealed record NatsTlsOpts
/// File path to PEM-encoded Private Key
///
///
- /// Key should not be password protected
+ /// If key is password protected use .
/// Must be used in conjunction with .
///
public string? KeyFile { get; init; }
+
+ ///
+ /// Key file password
+ ///
+ public string? KeyFilePassword { get; init; }
#endif
///
/// File path to PKCS#12 bundle containing X509 Client Certificate and Private Key
///
///
- /// Bundle should not be password protected
+ /// Use to specify the password for the bundle.
///
public string? CertBundleFile { get; init; }
+ ///
+ /// Password for the PKCS#12 bundle file
+ ///
+ public string? CertBundleFilePassword { get; init; }
+
///
/// Callback to configure
///
@@ -159,14 +169,15 @@ internal async ValueTask AuthenticateAsClientOpt
if (CertFile != null && KeyFile != null)
{
options.LoadClientCertFromPem(
- await File.ReadAllTextAsync(CertFile).ConfigureAwait(false),
- await File.ReadAllTextAsync(KeyFile).ConfigureAwait(false));
+ certPem: await File.ReadAllTextAsync(CertFile).ConfigureAwait(false),
+ keyPem: await File.ReadAllTextAsync(KeyFile).ConfigureAwait(false),
+ password: KeyFilePassword);
}
#endif
if (CertBundleFile != null)
{
- options.LoadClientCertFromPfxFile(CertBundleFile);
+ options.LoadClientCertFromPfxFile(CertBundleFile, password: CertBundleFilePassword);
}
if (InsecureSkipVerify)
diff --git a/tests/NATS.Client.Core.Tests/TlsOptsTest.cs b/tests/NATS.Client.Core.Tests/TlsOptsTest.cs
index 60c7666e0..8262ec8df 100644
--- a/tests/NATS.Client.Core.Tests/TlsOptsTest.cs
+++ b/tests/NATS.Client.Core.Tests/TlsOptsTest.cs
@@ -36,29 +36,34 @@ static async ValueTask ValidateAsync(NatsTlsOpts opts)
}
}
- [Fact]
- public async Task Load_client_cert_and_key()
+ [Theory]
+ [InlineData("client-cert-bundle.pfx", null, "client-key.pem", null)]
+ [InlineData("client-cert-bundle.pfx", "", "client-key.pem", "")]
+ [InlineData("client-cert-bundle-pass.pfx", "1234", "client-key-pass.pem", "5678")]
+ public async Task Load_client_cert_and_key(string pfxFile, string? pfxFilepassword, string keyFile, string? keyFilePassword)
{
const string clientCertFile = "resources/certs/client-cert.pem";
- const string clientCertBundleFile = "resources/certs/client-cert-bundle.pfx";
- const string clientKeyFile = "resources/certs/client-key.pem";
+ var clientKeyFile = $"resources/certs/{keyFile}";
+ var clientCertBundleFile = $"resources/certs/{pfxFile}";
await ValidateAsync(new NatsTlsOpts
{
CertFile = clientCertFile,
KeyFile = clientKeyFile,
+ KeyFilePassword = keyFilePassword,
});
await ValidateAsync(new NatsTlsOpts
{
CertBundleFile = clientCertBundleFile,
+ CertBundleFilePassword = pfxFilepassword,
});
await ValidateAsync(new NatsTlsOpts
{
ConfigureClientAuthentication = async options =>
{
- options.LoadClientCertFromPem(await File.ReadAllTextAsync(clientCertFile), await File.ReadAllTextAsync(clientKeyFile));
+ options.LoadClientCertFromPem(await File.ReadAllTextAsync(clientCertFile), await File.ReadAllTextAsync(clientKeyFile), password: keyFilePassword);
},
});
diff --git a/tests/NATS.Client.Core.Tests/resources/certs/ca-cert.pem b/tests/NATS.Client.Core.Tests/resources/certs/ca-cert.pem
index 0f3a07f12..68f0f0c6f 100644
--- a/tests/NATS.Client.Core.Tests/resources/certs/ca-cert.pem
+++ b/tests/NATS.Client.Core.Tests/resources/certs/ca-cert.pem
@@ -1,29 +1,29 @@
------BEGIN CERTIFICATE-----
-MIIE+zCCAuOgAwIBAgIUaIS3fVNjOgYm5uFgS/kv6yuIKucwDQYJKoZIhvcNAQEL
-BQAwDTELMAkGA1UEAwwCY2EwHhcNMjQwMzI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+l7ZVl5nIYaZhgAuqnsWy83Yey56mdHkBIEQMnEKPp9n3aTGON6O/CEqGfVmWG3fO
+iG37NpcGdvtVKCglV4DPRf7zRkIfLoveQcI5sSiT36V7swJe9FK+vcmhDs8j1B1J
+BZDlQJI33Ll0qZRdSNvw6rCryaIVUsfMWDX09qSaiaqkbsmS1MXlj2czYLgsbbUz
+hF6eEvpiId/9SyCNvHV4eGFg3nSLUJ4JYADm+s5tmA==
+-----END CERTIFICATE-----
diff --git a/tests/NATS.Client.Core.Tests/resources/certs/chainedclient-cert-bundle-pass.pfx b/tests/NATS.Client.Core.Tests/resources/certs/chainedclient-cert-bundle-pass.pfx
new file mode 100644
index 000000000..21fa8a0c7
Binary files /dev/null and b/tests/NATS.Client.Core.Tests/resources/certs/chainedclient-cert-bundle-pass.pfx differ
diff --git a/tests/NATS.Client.Core.Tests/resources/certs/chainedclient-cert-bundle.pfx b/tests/NATS.Client.Core.Tests/resources/certs/chainedclient-cert-bundle.pfx
index 3080fd735..c83f45d29 100644
Binary files a/tests/NATS.Client.Core.Tests/resources/certs/chainedclient-cert-bundle.pfx and b/tests/NATS.Client.Core.Tests/resources/certs/chainedclient-cert-bundle.pfx differ
diff --git a/tests/NATS.Client.Core.Tests/resources/certs/chainedclient-cert.pem b/tests/NATS.Client.Core.Tests/resources/certs/chainedclient-cert.pem
index f9939adf4..ab290dcab 100644
--- a/tests/NATS.Client.Core.Tests/resources/certs/chainedclient-cert.pem
+++ b/tests/NATS.Client.Core.Tests/resources/certs/chainedclient-cert.pem
@@ -1,89 +1,88 @@
------BEGIN CERTIFICATE-----
-MIIE/jCCAuagAwIBAgIUXpau3ENKB2jftYXqxQXuzfDi/J8wDQYJKoZIhvcNAQEL
-BQAwGTEXMBUGA1UEAwwOaW50ZXJtZWRpYXRlMDIwHhcNMjQwMzI3MTI1NjQzWhcN
-MzQwMzI1MTI1NjQzWjAVMRMwEQYDVQQDDApsZWFmY2xpZW50MIICIjANBgkqhkiG
-9w0BAQEFAA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7RZhIB/9GZ8XUqqV3a1AgMB
+AAGjXTBbMAwGA1UdEwQFMAMBAf8wCwYDVR0PBAQDAgGGMB0GA1UdDgQWBBRFyuy+
+aGXCGNygF2ELULb2YygTjDAfBgNVHSMEGDAWgBTNvA2CaWbBkPrv4t2ujpQTsgUh
+PTANBgkqhkiG9w0BAQsFAAOCAgEAGIuvE1Sts6pQlEDDl+MJ4xl037iZNkpqjTzP
+npzCx7BdvvLgXJtkfg1iFV5liet0mcwWVvPzPmt3XCb/iGcku2Lu9NZxHm2109GL
+ydIiLDUjbdewWpSM9jF/2Gq62gv0nvMgw35W6OvynxyrZazOa9/lwpw5nCa9HiCh
+eDM1nyZqM1F9VHeJpQg8xistRLTUa+GCB7BEohfxQj+MqlkpiYVzIzz2WE5um2Si
+5zqpK7YHWl/lPenfVesdlQFnFBppvsrBv+WleIErUU99dfSJfJgm+C7f1k06ilhV
+W7lb77cO96K1MlL/r3MdK7HaClEwbDbKkQPG83hQHAfOdaRgSwR2Mep2g5eL1hPo
+jmlwQWW046mayYXBXYpe/Loc3nyzBV0piRTfCF1eOonwJ5NiXJDJhyAioCZHGLZu
+bNiexRlycFyMqrCRp/nc0K3GWAKantS7NkRwHiuTyJygZsZ1U767GQkgeW3Yc8rb
+g2AwglD75K1vdNUHRA1tXR3JyUOsOSxSjyowYAyMwQ2dkjrHdgGc+CQRFSsd/NwF
+5qzqBnPI+8sZZI+gITSZdkM1YxUdSP9yqzGkrWQ+JJ0ByZ5V4VHGWtpvmJi6t07C
+I3qFcbyxa1U0niOXeX4vqe4iWuSeHaJrW15f2QeJIjz1q/+B1bNVnkDyOc3WHnII
+Dy7WTsw=
+-----END CERTIFICATE-----
diff --git a/tests/NATS.Client.Core.Tests/resources/certs/chainedclient-key.pem b/tests/NATS.Client.Core.Tests/resources/certs/chainedclient-key.pem
index 487633769..a965c3c0f 100644
--- a/tests/NATS.Client.Core.Tests/resources/certs/chainedclient-key.pem
+++ b/tests/NATS.Client.Core.Tests/resources/certs/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Hi1mIxS/a8GldKhJfRY4DP
+OSzUm5jgCmUh2rgGSuVAB9FUvGtM/bO5py0QFkao+1ddGC8HeXGLBa7DfVT/rWG4
++jZpocqHs8PQ3fvMo3E6iq+SmsOsmhfzMsaHooYMO1ez8tqFJUwMz7a6xj+on4h8
+PeXyrY0DPSpDc8K8/qV2qn8n3RdtTBc=
+-----END PRIVATE KEY-----
diff --git a/tests/NATS.Client.Core.Tests/resources/certs/client-cert-bundle-pass.pfx b/tests/NATS.Client.Core.Tests/resources/certs/client-cert-bundle-pass.pfx
new file mode 100644
index 000000000..bea090fbc
Binary files /dev/null and b/tests/NATS.Client.Core.Tests/resources/certs/client-cert-bundle-pass.pfx differ
diff --git a/tests/NATS.Client.Core.Tests/resources/certs/client-cert-bundle.pfx b/tests/NATS.Client.Core.Tests/resources/certs/client-cert-bundle.pfx
index 6b3814be8..af2cc39f2 100644
Binary files a/tests/NATS.Client.Core.Tests/resources/certs/client-cert-bundle.pfx and b/tests/NATS.Client.Core.Tests/resources/certs/client-cert-bundle.pfx differ
diff --git a/tests/NATS.Client.Core.Tests/resources/certs/client-cert.pem b/tests/NATS.Client.Core.Tests/resources/certs/client-cert.pem
index 7578f6a10..fa0ddcd9f 100644
--- a/tests/NATS.Client.Core.Tests/resources/certs/client-cert.pem
+++ b/tests/NATS.Client.Core.Tests/resources/certs/client-cert.pem
@@ -1,29 +1,27 @@
------BEGIN CERTIFICATE-----
-MIIE7jCCAtagAwIBAgIUJbHWO3BLg9UcxXtxJWSFuGobwFgwDQYJKoZIhvcNAQEL
-BQAwDTELMAkGA1UEAwwCY2EwHhcNMjQwMzI3MTI1NjQwWhcNMzQwMzI1MTI1NjQw
-WjARMQ8wDQYDVQQDDAZjbGllbnQwggIiMA0GCSqGSIb3DQEBAQUAA4ICDwAwggIK
-AoICAQCpiCfjlvyN4Tt9hMhiSH+N2bxukDbt/rll0KeMxOsozRGQbdt+xyn3eG50
-J2mTQtTSYqlPXDakNgigUAW1RghjnrrsyvDzK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6GAq
+QufzzghT388yR1Dw11IIScFdwXjjI6h8HypUZDfh6Ef8a+OEocPi6dzWBDAtsldO
+gkUOLAtqltfr+YCoW8knNNWaGznZj0WZWpJ4nX1+eEnPtf9o6mlj4gS6sTXVqv9j
+KxEtd5y51d4sPpGZGa4EzVYN0X+BnqgDlLcAElMYMZ+kg8KZDbbmTifkgXnczn5F
+xcBVYV6iLIDM7571fQmOwOAm7BIFhx7MGJifihvx6mkCAwEAATANBgkqhkiG9w0B
+AQsFAAOCAgEAMIa9VwWvo9P8bkWsXxKtuxNXjdnYHDo0d62IDuMj0cDnBom7pPGJ
+tXtgw0ucy5bwkUw3U4lBY6orsoXItWeIKYf6kbibdTBLuqaE2iTacfXg4Ws+iy3P
+rdHkCcP9UJihutkg4V/gDkM+Q1SypIxy6ZIUvf8brFd06+yAJmA1fYfnjZIMZzXo
++aQokWKS47Kh5H9DfFHtUPTjGvbljR70FRDVZ4fYPCJ082EoLou9FTw8xVs5qs3r
+ixBJesdlD7iUQSeFLMha2+4beTlDeXob0N/r9PVad51nV/VtH70YqTPSg/iUoQaF
+v/Z9n9B0a3ZGSzuXw+YH7MfPjE6K++Y+5UKJJSE+8c7vpL5n8EvdRSUSpfmLA2T2
+KmidGE5vyJ+aOy5TRewnCLaRj/VB+lZF7nkDlHhimRM1nT8AY6TysVUMxV1EnltM
+is6oeCUI51UNnK6b9opvgxiyQSj/xAxGa4RpOuwkIdR4X/DCGDI/VQ3zMp35IINO
+rgCxEgyHZFDKFaTP56Dm2UGW7g8gg3yF9xloNyR3VqX4Ps77W/sL1V2M13z5DLE2
+ubE++s/v3Z0G8wBVZazhPWz2hCiZGM3PKO5NuR0Q6cEiACCXhHxeoWPYvE4GF+d0
+E5iNao5pV8XBH35SG7mB5X3neMyjDna4A3xnq9Gs7bEKXf/CvMz/W1E=
+-----END CERTIFICATE-----
diff --git a/tests/NATS.Client.Core.Tests/resources/certs/client-key-pass.pem b/tests/NATS.Client.Core.Tests/resources/certs/client-key-pass.pem
new file mode 100644
index 000000000..8d040934b
--- /dev/null
+++ b/tests/NATS.Client.Core.Tests/resources/certs/client-key-pass.pem
@@ -0,0 +1,54 @@
+-----BEGIN ENCRYPTED PRIVATE KEY-----
+MIIJnDBOBgkqhkiG9w0BBQ0wQTApBgkqhkiG9w0BBQwwHAQIjjhm2mMi8VkCAggA
+MAwGCCqGSIb3DQIJBQAwFAYIKoZIhvcNAwcECJUtAwmT/AryBIIJSIydNzJXwCSx
+aKxxtZMF4gMl8EkPzgYYZ2KEQGHKW2p0YVyKXcPLwumLV7zDDpJXUCTSuEv3L6fS
+YjM2eJaRkeh88yuGMXNm8M9ec+e+ay12M4niuDjpChXnddjvY+sS2bWpF5rZy3x5
+xpmw2cpcydsaMXBB2D3SkFyiKRMHJ8fI7xstTyah03nuzM0af4aQtBYV0iujsoQG
+5QjmG1koQErDDAdiprImUDSCl/03DoBdh5rOIInCto31Eb5N9C/J/gl14Q5rNtx/
+pQ1Z7MNaP0JGP1MQAdfkZMsGAYFc7p6KPSn4a5hAWkmKN3HGDwHdBgyv+4G2Pg9N
+uaa4yFsU40mBoNLtSTzgOA4mkcEBcqzUIBRFZ/PvxJuDnDtyePYp/mm50BvDQuFd
+QEQUrpoQxV0xiMugEoSshDYxE57lvK3Wm20kwj8TCJzkBDtqPvjNvpxxcD+c/vV7
+Hkh8cia3Bw4M9gD8Q1p6N//GH81wlZ6pp9n+S52zOsqoQqYdq/zOh5Dzf60ekNoH
+WzACsPaZMmZlWBN45A80yAc0pEsyGRvZ+CCCg2K2gOOixz2Q+4xd2IwQC3KTxDdx
+81gQRh0yC7U0jmyFebYVOOPuCS7NdpegxT1fHqu/jNa99QF2iHnDdKd83kTZapfm
+L6GLGPbftxBZQDaJ1E+AmjBK0qSU0DdjclNkNZGqI0b/yM935udCmFAh2ojbUcrU
+QU5ssdG4ayggiVIOIhNzu50nQRhPZ/C5WWJnhfYWq/KidEEQRoqSfaKOM33k/QE9
+Enqk2/hQTxynVdWavf3TFczs3xXI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LwnC
+ltZFsOoJFRr34TCm12KumQRliihBOcn1W7HEStNeHYJX7fsxyiCBhJZOfCGGRmhj
+r6vOD3Xnh/KaOXIp6j46zMEJbG5BDp4Web0zEV5QV4gYbEF/K5d5hkxM8NxrOaAM
+HwyVodwIQ4vTEl1spFY1+JysdCU4X0I5II3e7GlJK+IPVNJuXJvs7gdxiNMWaQ0Q
+GAwR1j/u6Unow4n+0oaRWNsJzv3IOGx8ZjXk44JLWh3bgnw5aKnkI2i2itMeblAy
+/Zsk2ufCLwd5DaZDNdiGOg==
+-----END ENCRYPTED PRIVATE KEY-----
diff --git a/tests/NATS.Client.Core.Tests/resources/certs/client-key.pem b/tests/NATS.Client.Core.Tests/resources/certs/client-key.pem
index c65f565b0..862729280 100644
--- a/tests/NATS.Client.Core.Tests/resources/certs/client-key.pem
+++ b/tests/NATS.Client.Core.Tests/resources/certs/client-key.pem
@@ -1,52 +1,52 @@
------BEGIN PRIVATE KEY-----
-MIIJQwIBADANBgkqhkiG9w0BAQEFAASCCS0wggkpAgEAAoICAQCpiCfjlvyN4Tt9
-hMhiSH+N2bxukDbt/rll0KeMxOsozRGQbdt+xyn3eG50J2mTQtTSYqlPXDakNgig
-UAW1RghjnrrsyvDzK9UhhiGp1gf+Ti2iPjUf7Co7avsweeEwUUD2itSfW4sA/OAI
-9187ICqLBWzsMSNKnWFSae/lSWbiTnCFKdWisSihP1qDfGWtvaluZgA4gNGJxxhH
-4qGcHN7rlCn0hwG7YYJptCbBTN31z5dQGRrqKry+p29mpop97efwm3pEbRWbdxNC
-o42JwKnrcCLUv2UAXmtddZ2Dd72Q1rzJIQMZH/Ian5mSYl4Z/qqipn3aQM3Ga+44
-mhYY+YSBBWJsuAM26RsbaO/tAEA/+/wuBNK21Y29kQcI+3ZEdC0Wz4nxPRg3wp7S
-h6OlXDsRyjAae05tr/0HRTvFY2Zp2Dvs0A6pDT1M44BOvX1XNYzCm+2zH61X9+Dt
-DRKaiFTg73LpZTT3hGoVgI201Sf+t6V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9u+vMUcwKiRQJT89xKqZTLl/iZef
+o//j/X42eL96MKY8SFFRko/0bSi66oSp53ggg7fP91KW27IVHma7kTpTL1LSk7oT
+CpMP8GOA2wM7AgNVXUwBoiKK3vw7EZ8tdAobJ45DCKfGuiUFTymD6ZIU5pUrS1o2
+Z3+sIiTiWrVFcMXIgvnI70i1v7kn5PvolF3gd9ZPn7CtfOcpt0oaB2Ct+mR8A1T7
+N6xAIG669ach0cxB1xGKRt+14REnCEXJPB5EGQkWQJstmrt9UySdm4CxEuB3jwlO
+U2ECggEAMrZoLXeXDjvncGbBd8IJJDykmHMRjNiOGL41AEJdiJVCc7Tm1hAq3sDK
+T7CRcS43FrIsGETSvVwnNCns9dEagYBeXYPtkEigpC7s7hbYUugt9Ot/+F1X7Iuu
+zPOwwNL/f8/5vYv0NiAYSG9iAPbscp0SZWoQZluKbb90MemnGelRDd/1Ao/9DBS9
+KQjYbYPhTcv1oVeWmab4o1KBTUWDofPa62RTgn6hr/hbvZD7ObFP3bPgrmaEbFDx
+xC4qkJxAfUCEA2Q/Xji9erl3wjRHci2yjxrj9/xYze8R/K3RrTCUMwDlICEs7pWT
+xv/zZR/dDSQ8van6CLkYOqdMLg02pQ==
+-----END PRIVATE KEY-----
diff --git a/tests/NATS.Client.Core.Tests/resources/certs/generate.sh b/tests/NATS.Client.Core.Tests/resources/certs/generate.sh
index 0c53c0d19..1d3bd4875 100755
--- a/tests/NATS.Client.Core.Tests/resources/certs/generate.sh
+++ b/tests/NATS.Client.Core.Tests/resources/certs/generate.sh
@@ -25,8 +25,12 @@ EOF
openssl x509 -req -in "store/$child_cert_name.csr" -CA "store/$signing_cert_name.crt" -CAkey "store/$signing_cert_name.key" -CAcreateserial -out "store/$child_cert_name.crt" -days 3650 -sha256
fi
openssl x509 -noout -text -in "store/$child_cert_name.crt"
+
+ openssl pkcs8 -topk8 -in "store/$child_cert_name.key" -out "store/$child_cert_name.key-pass" -v2 des3 -passout pass:5678
+
cp "store/$child_cert_name.crt" "$child_cert_name-cert.pem"
cp "store/$child_cert_name.key" "$child_cert_name-key.pem"
+ cp "store/$child_cert_name.key-pass" "$child_cert_name-key-pass.pem"
}
rm -rf store
@@ -64,6 +68,7 @@ echo CLIENT
echo ================================
create_child_cert ca client
openssl pkcs12 -export -keypbe NONE -certpbe NONE -nomaciter -passout pass: -in client-cert.pem -inkey client-key.pem -out client-cert-bundle.pfx
+openssl pkcs12 -export -keypbe NONE -certpbe NONE -nomaciter -passout pass:1234 -in client-cert.pem -inkey client-key.pem -out client-cert-bundle-pass.pfx
echo ================================
echo CLIENT WITH CHAIN
@@ -77,6 +82,7 @@ cp store/leafclient.key chainedclient-key.pem
cat store/intermediate02.crt >> chainedclient-cert.pem
cat store/intermediate01.crt >> chainedclient-cert.pem
openssl pkcs12 -export -keypbe NONE -certpbe NONE -nomaciter -passout pass: -in chainedclient-cert.pem -inkey chainedclient-key.pem -out chainedclient-cert-bundle.pfx
+openssl pkcs12 -export -keypbe NONE -certpbe NONE -nomaciter -passout pass:1234 -in chainedclient-cert.pem -inkey chainedclient-key.pem -out chainedclient-cert-bundle-pass.pfx
rm -rf store
diff --git a/tests/NATS.Client.Core.Tests/resources/certs/intermediate01-cert.pem b/tests/NATS.Client.Core.Tests/resources/certs/intermediate01-cert.pem
index 63d4f482e..f4f047084 100644
--- a/tests/NATS.Client.Core.Tests/resources/certs/intermediate01-cert.pem
+++ b/tests/NATS.Client.Core.Tests/resources/certs/intermediate01-cert.pem
@@ -1,30 +1,30 @@
------BEGIN CERTIFICATE-----
-MIIFETCCAvmgAwIBAgIUJbHWO3BLg9UcxXtxJWSFuGobwFkwDQYJKoZIhvcNAQEL
-BQAwDTELMAkGA1UEAwwCY2EwHhcNMjQwMzI3MTI1NjQxWhcNMzQwMzI1MTI1NjQx
-WjAZMRcwFQYDVQQDDA5pbnRlcm1lZGlhdGUwMTCCAiIwDQYJKoZIhvcNAQEBBQAD
-ggIPADCCAgoCggIBAJCYnhCV+9uxoLHtjnDJ5ZUpLN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sZZI+gITSZdkM1YxUdSP9yqzGkrWQ+JJ0ByZ5V4VHGWtpvmJi6t07C
+I3qFcbyxa1U0niOXeX4vqe4iWuSeHaJrW15f2QeJIjz1q/+B1bNVnkDyOc3WHnII
+Dy7WTsw=
+-----END CERTIFICATE-----
diff --git a/tests/NATS.Client.Core.Tests/resources/certs/intermediate01-key-pass.pem b/tests/NATS.Client.Core.Tests/resources/certs/intermediate01-key-pass.pem
new file mode 100644
index 000000000..72c82ff9d
--- /dev/null
+++ b/tests/NATS.Client.Core.Tests/resources/certs/intermediate01-key-pass.pem
@@ -0,0 +1,54 @@
+-----BEGIN ENCRYPTED PRIVATE KEY-----
+MIIJnDBOBgkqhkiG9w0BBQ0wQTApBgkqhkiG9w0BBQwwHAQIa9zI7mnfelkCAggA
+MAwGCCqGSIb3DQIJBQAwFAYIKoZIhvcNAwcECLLS4/UGgdc5BIIJSGchAo7lMHov
+Z1tE6mTErwOR4x4HmfhhznZpbdNBgxUKFN1RWwKzQTqgF+o7diMGLOrCKwQDF0nN
+KyaDS2qXygILKFdPFl30A8UyYyBG+6AtG62LHnsympnlKxY0E+Z4pzawIQ9VlfBQ
+fNqBE4T8STXmjySruG1UWatET9DO8YjP89w9mY54Q9Hgw11aVcW7qV8QnB7FCD6/
+pCEnZaKZ20PM+71LfyjBngJGC4wRWpzAS4vfILPfXfaZZSmOoCRJ+GUsiiX6LNIq
+iMNj/1kPA4lvHkdPoCeu9oxQU4lSZI/9QxjNL3Olr5I+Zsr7YYKk9Bo/ypcYnp7w
+9y9cUyIfQruk/4ssOugZEREq9lGbU9TPSyK3zh9XXrOO9l0uSZ69XAcCwqOdgj+a
+uUJMJbZkqPRDzvRt/kuXv50ECOvCWP6R+vW59z6JBgj7NR2BRSfZbc72uhG18qSX
+7rw4N3HFAFeJQPUOvPzQD4mKLMSlKtmw6hARb2SFbyIGjiEJoZBWnz1GBF7xnU94
+8RiXn3AAPF9SE05LL0YoKMywRQuVQdlvV8zfgR6ATAyBBSdJe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C3O0BTulYGH6CbNmXKCmNE4qZtQR3pC7xGiKUGvQCkTVlW1ZVT
+K15Mdlw3Otx1fwzSjgepjswSR7kI7kKSFvUwSiv6yTUhJjCMAwu5qQyVf9+epvbo
+PtYdcyuVfaXrozA9nkmXZHgsYsXRaU7uod2pk1p4n2A/9v6lxXxZNgbjZqBIrxWb
+JZZsKVfwKT7PVu1mY/Ez25HaNWzkz4ILn0BOHEfGS10dS32l8sV54WYoI+o20lUT
+MButhWnkZkpLg6RnN2astYPoIuKesHC/2IP4qhOX34fbe+QBeVH0x4Rn+IroN1Me
+FdK4kvhNTwm34lfSRXiz5XKJaAqy9gKEtlRJ525+vGc+eXJ3zLqMiBXtUr5EQ0rr
+9RHFUXjDa8mLiWZl5x4e+JYRoY0u7j83xnMk2KZ7pF/v1MND++M4hR/DsBiKQ8wg
+CuwO4ZKEhDCQtz5arvJyXk91RvvotEBsCKNltPKC2l5UtYq55EseqTSCPRhehULC
+fMtOPv3EUel4QjAwrE/x/Q==
+-----END ENCRYPTED PRIVATE KEY-----
diff --git a/tests/NATS.Client.Core.Tests/resources/certs/intermediate01-key.pem b/tests/NATS.Client.Core.Tests/resources/certs/intermediate01-key.pem
index f1410368a..e7bc92f10 100644
--- a/tests/NATS.Client.Core.Tests/resources/certs/intermediate01-key.pem
+++ b/tests/NATS.Client.Core.Tests/resources/certs/intermediate01-key.pem
@@ -1,52 +1,52 @@
------BEGIN PRIVATE KEY-----
-MIIJRAIBADANBgkqhkiG9w0BAQEFAASCCS4wggkqAgEAAoICAQCQmJ4QlfvbsaCx
-7Y5wyeWVKSzVAnfXq1lon+oNvRVZqdmkjLY+4y9hzLGoaQlPNNj/j3bEw4bMoM5F
-Mlrpzvg//o1gySTr2SgSFJhz50laQbUA3JouH6r54Ihmtz8MfFPVEST9gFLgahFD
-7KYLINDa9Pf1syQhJV1Vas4dQm5XHK+yg0eQdAcpgUgCMch9GA2Ofg81EEygCkE9
-IpiEAOUhPCalcajyaNJhDEBU8kZURtGN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ecrQk/qHhVD+T6JpMaS/AULNMTR848yd9UjkW
+S/irKtZ6J4koytO3KXKElc87jDvezQ0LPFsWm0HNcfBCplEZk2V7t3orkKluco0d
+u7c/m36Rvo93LQfc6gmmA0GDaJXlOsBqIk/tycHxIPN26ZIAkL8+C0z24JVdwlxs
+b2bhWccGkcdKfzRtmeTMCpEBkHdl9Mo+8TB54F0CggEAdxj21wXndbznMue9oVWf
+jgjwNydX/XB6to+VrReV6n80cM0Jy7RXTKgrZkF4S8OJTJKDsIRRtQp8UoF5Sg7e
+V5MDZmDughs1mlYtDSU9sRtdtQO/3/gUF/RtgIuqAhXRnZBVZUXqRt0fRUnstmVP
+v3k5U8lXua1JflZF9GMXUEY5AlgmVQbruhPpU8NZ7a+jB+3vJXp9Z35D4I7S1H31
+qC0tPtnY1WGz98DSlPqcTtHdeSsPJxlDY1AysNeUDhW2j9K5e1vhCG5nyXXW128v
+/lej5APYWccbbMEZX/dS2ULzpIPimFQMvVaOMrZP4gN+7CL7le+PJGnsxUlxIG7x
+oQKCAQBnML/deBUqkU/cQK/9iIinklqwYPhfaZ7usYgcjkyDdCLJHPVNg8j+CqiE
+j44S40/C6uQet1412uj2QLZgOfKy+L860Y1+QHFydvCatj8pImjkQGyXfD/G4UJo
+Dl39cj1EnPWDjaVc4CWrU3HvCOLoCNB2X3ZsddyqxVLJGXY6R56VlNB/NzKZ/AZZ
+i18FDzGCMysvDqpla8Kfk5G/r1hTBrylIMNVAg+EyIt8caeLuH/zTLtAuVuUFoPd
+9bRRPBMi1upfos7lhDBil/wLeqlS6F/m8UX/q27B+U+BqABnZapv3VGdzWPVLypX
+7fCZTU/xQE5sEAx7CnHMYq6bGcZn
+-----END PRIVATE KEY-----
diff --git a/tests/NATS.Client.Core.Tests/resources/certs/intermediate02-cert.pem b/tests/NATS.Client.Core.Tests/resources/certs/intermediate02-cert.pem
index d89256dd9..ba880ade8 100644
--- a/tests/NATS.Client.Core.Tests/resources/certs/intermediate02-cert.pem
+++ b/tests/N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BXR+S015x9
+tchF/cHbq8aEYwsQ25secAh4jMVNVTMS6wklINZSZt+W34PLRbNQZBbNV2m9iQEQ
+7q5WKufHUh6TK98Ps+9SjRC5iPWx+EUFuYdIISjdSluYGp4cWUbGBuvKZvPN1JQF
+xZVvCivfsQlzXk3wzyxAnsCocSBXjEvRBOLPvrikwIDnnrV6C8le4EkpixGV/e2s
+OlZ9G1fz7y6tJ3ooRnyskuWSO7SMyAOY/LpJ0DtcrfYXX8M0xcJQcjosFJnQU7LO
+OOxX+AGKZaSLbQHlcPDqN5o8/9PPu3nm5QW+m1YiqHS/c2el83MjosNBXKKeZ2lQ
++mAJqi2bFl94v+JO/Sa861aUDCCS/h+klKQJ0UIS/vuPDbiIdNYEO9/mr9zZXjR/
+DaXj2omiXuXaguBT+7VgJAxenQk0WBgBFAn7zlJcHcBjcYq/8DPXpnxO/FOIhHOJ
+Whj8UUmsplnn0hlpaxN5/S0=
+-----END CERTIFICATE-----
diff --git a/tests/NATS.Client.Core.Tests/resources/certs/intermediate02-key-pass.pem b/tests/NATS.Client.Core.Tests/resources/certs/intermediate02-key-pass.pem
new file mode 100644
index 000000000..a09f8258e
--- /dev/null
+++ b/tests/NATS.Client.Core.Tests/resources/certs/intermediate02-key-pass.pem
@@ -0,0 +1,54 @@
+-----BEGIN ENCRYPTED PRIVATE KEY-----
+MIIJnDBOBgkqhkiG9w0BBQ0wQTApBgkqhkiG9w0BBQwwHAQIZ7VMtk5SiCcCAggA
+MAwGCCqGSIb3DQIJBQAwFAYIKoZIhvcNAwcECLtCkv0/SQh3BIIJSCsfCuamwq5G
++nR0hNwZgK3s/bcyCXLB9AaJ9OB0S0m1Ur2RuY12fUWzUl3ripYaLt4lppvAXuKD
+VUOoSryydgPioNc5DwrD+Ili7xmf+c/23ps1VoHCB8Rp6DTRx6f/ZnEoAnX/m3sN
+zc1I9Yy70tHbjr5P4zgtfeKPPT9TZAwOl5++D7hp8ID8ihuvvssH13obSIhLej+s
+kUifIldr7H+Ysabt5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7MPwXCMwc0hmJh2
+yU6VRzfIHCOkdZK1qPCRDWstWUGYXaFWEE3EtudIKeii5gYu0jQR8GOVyln/WDxp
+RxVQLBvcaPI5c6VXbTCIaXO9Fm3dnfu9nbzbIIA5qpMShcjO3loBM+EXAZji5Asc
+4lNvw/L5PrYCDu1i4W0tVxphhAhrqYRz4Rhcadc74svvJfsrIrKoa+vVyDIi/YRI
+sQPC/d6LcaHCxTvmBdEdo6yhnZBsb90Pl1TJi+F+MVvlXWlGJjtfIeQYsifv9g7Z
+sE9VpeIw12PXKhCF5GWQv+UjjryAqZsB4Tu6cIT3aY+jexqZgmk6256g80hrkjF5
+0P1XiFDc/22UBeVFY6yAbrW8j9/QLg/g/Ckwc5et5Un3iONDBG3E/ZDgo8gAdT8g
+8zdpAGt80MeaoknqF7mucHo8IleF8KqPk8co4sX3eKZrYxuepy3Hwq7ztrg5ebno
+6ghfEe02i6inFhmuM8DzpXNfOkO//So5c6bHNJh4T4XZ/BiJZJ1XtFaPDk9oRQO+
+Q6qc6r3XH6SPGdzethvD2jzq15rfJVbgFNR6KGPGzdgRRbOzy4jQ/d3S/HK20URx
+Rw6pnvOpq4gf9IvV1sBDQElDMwteRgDrg+4csocwTvAwZA+7x+bd/TdrqsU724FY
+aCNy37YbSqDxxss4wiJZ0H+GC/ZmyJeg17GjTfQZ2dW2dZUOgYSE3psrUMOXJcwg
+Q7apt6aStJ1m/3I4ZkhgaKRi6yzpv0zTdMyOyMDbC3Mdw0/stnshBVqcZleMx6aa
+dohPzyCfagnPi4gxpgp3LpKmTWoE4vcQMNXY1sl4eAGAw1ihw+tSbHemWFd+6QPX
+wGdZgxh1PLzXtbjWkN9cTQ==
+-----END ENCRYPTED PRIVATE KEY-----
diff --git a/tests/NATS.Client.Core.Tests/resources/certs/intermediate02-key.pem b/tests/NATS.Client.Core.Tests/resources/certs/intermediate02-key.pem
index f3965bbf9..207de3ca1 100644
--- a/tests/NATS.Client.Core.Tests/resources/certs/intermediate02-key.pem
+++ b/tests/NATS.Client.Core.Tests/resources/certs/intermediate02-key.pem
@@ -1,52 +1,52 @@
------BEGIN PRIVATE KEY-----
-MIIJQgIBADANBgkqhkiG9w0BAQEFAASCCSwwggkoAgEAAoICAQDDk3eHyhikAB7J
-MXPhOJJaiE/Od5oaI3C5PujVKcn+nnCgklVHGC/2H5tE3rK4VtapiZFjC+3Ax2ly
-fgwzigMWWKf5xb2wUgBwXi5sR8yTJbKBu2PaT8IfNL1wUEVIMeOv8ksirfA0Z5RU
-QXOKCa+liupiigX/suECKXTV4M1slpwypKPmVfsLQbdORH3AFq+y6wGDPqsRTzlU
-nk3jdvtOrWxGUdgbQ6gXQNKeRf8enuvyttZADSG2R+7cZVcHu8PgoeYmFyKRyjXP
-fAuKj5zWfe2tni9e9aFJRm60TECo4Hg2n2d7LdiP7eLgcP97/cSfBklSmyDjytld
-HdxzRXSV6Bct7C7SuqcMAGOUnA48caWRNxRFO/HyDPxFsqFqOgPeUyGsJ7gByrIl
-Sq8Tj7itjtupKHvqvJIc2JeN1GHFiyVG3RopewiQmaDDCi91Lik04EewjVFD+TkO
-qooS8gyTnpBOl2rTJo0XuvFZrT3ddpjastIqwJAz98bCb5fUHMHP/QOMBVNMG+hZ
-EQOxX0g96nG/VeeuE+HVJbKdSPPc+yi+l++BIaEKLXzZLWqxqjc+UUb7aDI3/D/2
-Os0QzAJtb1dhEBJS2agRK3eHJTB5m5w3bdKIk78vRtfYvTkgDkxzJA0tzG+uHZ7E
-eFNNaHDdPUCxc2Fk0jcV7wXRMXttjwIDAQABAoICABAKZcjaL1gwIaubEJKIgHRy
-w/zpUVcoe06DlYwk2nTgNi5CokJA/m9fhe10SHtBtWcqqc/SWCSHa84gqXaGsMch
-7AZajLrL7E5LDeACqYmTaMcm1piUEcCxI4J1NaF8ugchxmjTPvrFWLnqXllpfvcD
-Du3tvR03j33iZuXt2LC5z5jVvmhIurI10xzVFZfuJGihHrrO0TALwTt/+l/Cz/d9
-gNO+/bcKvwbH4ckVG54S0c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bRG8IJg8ZL24mazR5g78TtDjjrynrBjaHio1qOrm3GR/sXBO20LSdvy
+J0emsPgFtXG8QfpIXT4hJSUpyYbPxAofQX2fvz9GaUZ2EtEmRwCilwRyHlt+lfMO
+Si7oQtkrF2Gy1tO/rVVdBJP8mWLS
+-----END PRIVATE KEY-----
diff --git a/tests/NATS.Client.Core.Tests/resources/certs/leafclient-cert.pem b/tests/NATS.Client.Core.Tests/resources/certs/leafclient-cert.pem
index 1d3c2ae50..b1e639436 100644
--- a/tests/NATS.Client.Core.Tests/resources/certs/leafclient-cert.pem
+++ b/tests/NATS.Client.Core.Tests/resources/certs/leafclient-cert.pem
@@ -1,29 +1,28 @@
------BEGIN CERTIFICATE-----
-MIIE/jCCAuagAwIBAgIUXpau3ENKB2jftYXqxQXuzfDi/J8wDQYJKoZIhvcNAQEL
-BQAwGTEXMBUGA1UEAwwOaW50ZXJtZWRpYXRlMDIwHhcNMjQwMzI3MTI1NjQzWhcN
-MzQwMzI1MTI1NjQzWjAVMRMwEQYDVQQDDApsZWFmY2xpZW50MIICIjANBgkqhkiG
-9w0BAQEFAAOCAg8AMIICCgKCAgEA7FdBSbNZ6zsX7tOf+N7PPAaL7/UHcHzLJcmu
-wS7UFtTyolT6pc4AsJ3cpZI0CSmFPx28Tj23GNuh7MimTsz0Oh2VJPoAPq8JMt6w
-SV6cw9p77VmUn53vXddFkbSAOHY+9qS10xBxecwE2DO2R3sbP78tSVyEXybseJGz
-tG6cjETvW9pLaASQeW+0gE9YvHcS30NHBamCdqjyLnBB/vLpd63MrPnPYkw00wqT
-37OIkrJjXbblqpJUHVr4wCZP+oMoJCxLnS4UZW4wlZOIJoYOBGAJjKhJJoiA7795
-r9jEfLBE8w7Hl95bj6es4Z9meZiw2B3Ri4+d3lS8OKshj6G20qjZu31EoLhVl7mD
-V2nSyspgw4kCdeinffEgkRjQ7qL1/xIvY2LrXgut2E+n7Hwo1el4rqUo3SoVolqC
-SMT9TSv02aI84qAzWVq2aHU8CmUhmibk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xsldgpkr+6Ajcd8SEGJtqqe+dhlC7ZeoffgwimJbrIKDXxkbgynoXbPp2TD2k8Gs
+QwaJxJOnmJEO7PPkwwYBQFgbUiXU+ML3s85HdW8K4aUwN4hJ3nLbj/qVIqWli3iQ
+uQJqZFWpJ5OFRf4pfIiPPB6UFj9+Q8+nEut/aym8oHz0HxKpYz0oaKww5YRXMNxh
+HP6LlPei+fTqjd2WCwF+20YDvK6sQP+5ObCXSiZdzN5ChRMmduVEp4rFthZgq0cb
+aeFKoCTBdqPYUIQu/S8+5E4pfQUrrkEUSvq9WsskJBcNt2N3F6VcWrIP7L04CoDv
+m/4qJvhaYTp4eRva7/t/8w53MLQx9qN0iwiOD/mkIi+YFQ0ZurTpc37QNWo654kD
+xBwqGY+WWsLxUedGq+2Jntu16y8ST/7coUfaZ015cINAFJC0DJRFQkyltHV88rUW
+0leZ2zpxG/DS/FHzGayejvk4BSyIbC1dExVD4OFESlPPwGmht5x+Lof5doLreIEU
+NZqBcbHM76SqAI0alexXzkEaYWxKlpyZRRVjmp/ld0jXpEvt441paqK8PxjFmny4
+bAyCXsXmzBEH
+-----END CERTIFICATE-----
diff --git a/tests/NATS.Client.Core.Tests/resources/certs/leafclient-key-pass.pem b/tests/NATS.Client.Core.Tests/resources/certs/leafclient-key-pass.pem
new file mode 100644
index 000000000..9ca211167
--- /dev/null
+++ b/tests/NATS.Client.Core.Tests/resources/certs/leafclient-key-pass.pem
@@ -0,0 +1,54 @@
+-----BEGIN ENCRYPTED PRIVATE KEY-----
+MIIJnDBOBgkqhkiG9w0BBQ0wQTApBgkqhkiG9w0BBQwwHAQIvxxt/evTjtYCAggA
+MAwGCCqGSIb3DQIJBQAwFAYIKoZIhvcNAwcECOu2Yb7PX+y8BIIJSMQR23Xg4sv3
+DcFzbT0ckR3eOF+lMIwvjSUNVLxLqd9XmYYAQtqsjZqkEeQ1Nh18vpX/f6teey8w
+dEX4fKXZohAixqk97kfUjPRVMPuEEKiYu/+Heh6NXbMV4wd02CX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NATS.Client.Core.Tests/resources/certs/leafclient-key.pem
index 487633769..a965c3c0f 100644
--- a/tests/NATS.Client.Core.Tests/resources/certs/leafclient-key.pem
+++ b/tests/NATS.Client.Core.Tests/resources/certs/leafclient-key.pem
@@ -1,52 +1,52 @@
------BEGIN PRIVATE KEY-----
-MIIJQgIBADANBgkqhkiG9w0BAQEFAASCCSwwggkoAgEAAoICAQDsV0FJs1nrOxfu
-05/43s88Bovv9QdwfMslya7BLtQW1PKiVPqlzgCwndylkjQJKYU/HbxOPbcY26Hs
-yKZOzPQ6HZUk+gA+rwky3rBJXpzD2nvtWZSfne9d10WRtIA4dj72pLXTEHF5zATY
-M7ZHexs/vy1JXIRfJux4kbO0bpyMRO9b2ktoBJB5b7SAT1i8dxLfQ0cFqYJ2qPIu
-cEH+8ul3rcys+c9iTDTTCpPfs4iSsmNdtuWqklQdWvjAJk/6gygkLEudLhRlbjCV
-k4gmhg4EYAmMqEkmiIDvv3mv2MR8sETzDseX3luPp6zhn2Z5mLDYHdGLj53eVLw4
-qyGPobbSqNm7fUSguFWXuYNXadLKymDDiQJ16Kd98SCRGNDuovX/Ei9jYuteC63Y
-T6fsfCjV6XiupSjdKhWiWoJIxP1NK/TZojzioDNZWrZodTwKZSGaJuQ52Ssb1bGw
-gXtSmbFe2uldoknD+x13V4Hk53pMnwmSYiYa0LOgCKqp+oJCoQwmvd6SPFtRw5Ez
-wwrsiUKAJHUl1RKEhriHclL2SFpTO3C/OsWKSmgzyrposd+jq89+6k9bi0BnaFkX
-vRFd6u7iu9rpsOjUSjIHKgGhkR2wlIfUwdrc/Ka1lkQ4k9iPb0vjBvIxc/FV7SNl
-5/8BrwcHKD08ejxC29i4thmeimkrGwIDAQABAoICABBoED6zBiN3wzYPl9PZd85l
-b/J08pLC/wE9CnYbr5p0JvHQ72NyNQcNtmMCDr2yFa9ne4p860h8+rUqyqy+upeM
-NS3PcxPm578RyXAWctB/ysmTxeb8ukCr8IboXlxNDRrnHT4tLotzd8Sgdl9o8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meI
+RYLP8Rgs24oV/2cBCkN2mnr3W4mlRC5eu/EFPeZLIH3V1KQmuJWAzHCGmqEEqTrL
+8f1CA9TUeZdwAka1N6R/+zH32TAjxIWrlbT3YmYpu+Hi1mIxS/a8GldKhJfRY4DP
+OSzUm5jgCmUh2rgGSuVAB9FUvGtM/bO5py0QFkao+1ddGC8HeXGLBa7DfVT/rWG4
++jZpocqHs8PQ3fvMo3E6iq+SmsOsmhfzMsaHooYMO1ez8tqFJUwMz7a6xj+on4h8
+PeXyrY0DPSpDc8K8/qV2qn8n3RdtTBc=
+-----END PRIVATE KEY-----
diff --git a/tests/NATS.Client.Core.Tests/resources/certs/server-cert.pem b/tests/NATS.Client.Core.Tests/resources/certs/server-cert.pem
index 82a89d4b1..fbf9effe1 100644
--- a/tests/NATS.Client.Core.Tests/resources/certs/server-cert.pem
+++ b/tests/NATS.Client.Core.Tests/resources/certs/server-cert.pem
@@ -1,30 +1,30 @@
------BEGIN CERTIFICATE-----
-MIIFOTCCAyGgAwIBAgIUJbHWO3BLg9UcxXtxJWSFuGobwFcwDQYJKoZIhvcNAQEL
-BQAwDTELMAkGA1UEAwwCY2EwHhcNMjQwMzI3MTI1NjM4WhcNMzQwMzI1MTI1NjM4
-WjAUMRIwEAYDVQQDDAlsb2NhbGhvc3QwggIiMA0GCSqGSIb3DQEBAQUAA4ICDwAw
-ggIKAoICAQD4wGbg2KwOFve9G16XLqrZEEAX5EOo9DSUpIN7F4ssP232TaXixWuM
-I7zWO7EizH+/vVpezCP8iii8jqwNCh4U+UOlmz6D1WhXfgJhjddJu03o3Giilv+P
-X0mqa6LdIFaYIbfVaVoKcpNbX2CP7uUg+/anS0ghw3h4pKhkuFxJuYzDyiFxDzvj
-f3ZfVEd4lX6ZS87pvohdMnXEKuJp18rsDIg1ELjpHpwzPUCT+RBj5QAWzb1IP5jY
-8lUpv6P9xD2bAk22vlYqniZOO2sZ23q0MOFwJ0coHasJcFfHzueVZ7xd5X50UNc6
-HKBO2himrEpgB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.Core.Tests/resources/certs/server-key.pem b/tests/NATS.Client.Core.Tests/resources/certs/server-key.pem
index adc38d72b..5a4ae4d9f 100644
--- a/tests/NATS.Client.Core.Tests/resources/certs/server-key.pem
+++ b/tests/NATS.Client.Core.Tests/resources/certs/server-key.pem
@@ -1,52 +1,52 @@
------BEGIN PRIVATE KEY-----
-MIIJQgIBADANBgkqhkiG9w0BAQEFAASCCSwwggkoAgEAAoICAQD4wGbg2KwOFve9
-G16XLqrZEEAX5EOo9DSUpIN7F4ssP232TaXixWuMI7zWO7EizH+/vVpezCP8iii8
-jqwNCh4U+UOlmz6D1WhXfgJhjddJu03o3Giilv+PX0mqa6LdIFaYIbfVaVoKcpNb
-X2CP7uUg+/anS0ghw3h4pKhkuFxJuYzDyiFxDzvjf3ZfVEd4lX6ZS87pvohdMnXE
-KuJp18rsDIg1ELjpHpwzPUCT+RBj5QAWzb1IP5jY8lUpv6P9xD2bAk22vlYqniZO
-O2sZ23q0MOFwJ0coHasJcFfHzueVZ7xd5X50UNc6HKBO2himrEpgBiAC2rW7IKDZ
-VEpTfr1SzSVNjtpzbQCW2sZS490K8DoX+NPTRv+dEaoBZaONlQhcND8w7wnXQSfI
-ev8xhlZM34W//mk6ehqTMKLu74RUEgf6fq8N0APUmKcv3bPTKz97TqaBdW6F2+77
-vN2XVCVDHkvqP5PpDbyfxoV2W0VnR3DzNePJa1xZGwGNqAHeyy6tQgAPNwODaY34
-FsMv/GPWgN/mOrz9D9Z+/ZtjQ5BPurktMfhbhx1MZ07Bk2uoqe6+UiQ/nyeZBCuc
-5n2ts/jLI4e2HvaC6IRG/leWlJvO8QW0mvLGAGDdknF54QbLVqKFoMVPcugnhIgt
-gSJWdidDEKQmyg8f6EJ52vhjETEWqwIDAQABAoICAFHpobcXAoldPNVUBvEH2BDE
-jiaP70vaptnv1rAZD6ZReNdruF2VnxW1ywBNBcasysCMDQ88b/lAUavN25Arrb5A
-WutU1OA6zTJKd2RCfgt0l3I/6mDoEl3XBf4NlcL1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