Use dotnet default development certificate for .NET Core 2.x (#381)

This commit is contained in:
Stef Heyenrath
2019-11-29 14:51:03 +01:00
committed by GitHub
parent 3a221f51b1
commit 5bb10c3350
2 changed files with 4 additions and 1 deletions

View File

@@ -3,6 +3,9 @@ using System.Security.Cryptography.X509Certificates;
namespace WireMock.HttpsCertificate
{
/// <summary>
/// Only used for NetStandard 1.3
/// </summary>
internal static class PublicCertificateHelper
{
// 1] Generate using https://www.pluralsight.com/blog/software-development/selfcert-create-a-self-signed-certificate-interactively-gui-or-programmatically-in-net

View File

@@ -106,7 +106,7 @@ namespace WireMock.Owin
PortUtils.TryExtract(url, out string protocol, out string host, out int port);
options.Listen(System.Net.IPAddress.Any, port, listenOptions =>
{
listenOptions.UseHttps(PublicCertificateHelper.GetX509Certificate2());
listenOptions.UseHttps(); // PublicCertificateHelper.GetX509Certificate2()
});
}
#endif