Skip to content

Commit 279f596

Browse files
committed
Hack around the need for a certificate
1 parent 7b3f2ce commit 279f596

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/DefaultBuilder/test/Microsoft.AspNetCore.TrimmingTests/UseHttpsDoesDependOnX509Test.cs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
using System.Security.Cryptography.X509Certificates;
12
using Microsoft.AspNetCore.Builder;
23
using Microsoft.AspNetCore.Hosting;
34

@@ -7,7 +8,9 @@
78
{
89
serverOptions.ListenLocalhost(5000, listenOptions =>
910
{
10-
listenOptions.UseHttps();
11+
#pragma warning disable SYSLIB0026 // The constructor obsolete but we're not actually going to use the cert
12+
listenOptions.UseHttps(new X509Certificate2());
13+
#pragma warning restore SYSLIB0026
1114
});
1215
});
1316

0 commit comments

Comments
 (0)