Skip to content

Commit

Permalink
Return null for self-signed
Browse files Browse the repository at this point in the history
  • Loading branch information
cyanfish committed Apr 1, 2024
1 parent b30c23b commit 6d369a9
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions NAPS2.Escl.Server/CertificateHelper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ static CertificateHelper()
// See https://stackoverflow.com/a/65258808/2112909
public static X509Certificate2? GenerateSelfSignedCertificate(ILogger logger)
{
return null;
try

Check warning on line 31 in NAPS2.Escl.Server/CertificateHelper.cs

View workflow job for this annotation

GitHub Actions / build (windows-2022)

Unreachable code detected

Check warning on line 31 in NAPS2.Escl.Server/CertificateHelper.cs

View workflow job for this annotation

GitHub Actions / build (windows-2022)

Unreachable code detected

Check warning on line 31 in NAPS2.Escl.Server/CertificateHelper.cs

View workflow job for this annotation

GitHub Actions / build (windows-2022)

Unreachable code detected

Check warning on line 31 in NAPS2.Escl.Server/CertificateHelper.cs

View workflow job for this annotation

GitHub Actions / build (ubuntu-22.04)

Unreachable code detected

Check warning on line 31 in NAPS2.Escl.Server/CertificateHelper.cs

View workflow job for this annotation

GitHub Actions / build (ubuntu-22.04)

Unreachable code detected

Check warning on line 31 in NAPS2.Escl.Server/CertificateHelper.cs

View workflow job for this annotation

GitHub Actions / build (ubuntu-22.04)

Unreachable code detected

Check warning on line 31 in NAPS2.Escl.Server/CertificateHelper.cs

View workflow job for this annotation

GitHub Actions / build (ubuntu-22.04)

Unreachable code detected

Check warning on line 31 in NAPS2.Escl.Server/CertificateHelper.cs

View workflow job for this annotation

GitHub Actions / build (ubuntu-22.04)

Unreachable code detected

Check warning on line 31 in NAPS2.Escl.Server/CertificateHelper.cs

View workflow job for this annotation

GitHub Actions / build (ubuntu-22.04)

Unreachable code detected

Check warning on line 31 in NAPS2.Escl.Server/CertificateHelper.cs

View workflow job for this annotation

GitHub Actions / build (macos-14)

Unreachable code detected

Check warning on line 31 in NAPS2.Escl.Server/CertificateHelper.cs

View workflow job for this annotation

GitHub Actions / build (macos-14)

Unreachable code detected

Check warning on line 31 in NAPS2.Escl.Server/CertificateHelper.cs

View workflow job for this annotation

GitHub Actions / build (macos-14)

Unreachable code detected

Check warning on line 31 in NAPS2.Escl.Server/CertificateHelper.cs

View workflow job for this annotation

GitHub Actions / build (macos-14)

Unreachable code detected

Check warning on line 31 in NAPS2.Escl.Server/CertificateHelper.cs

View workflow job for this annotation

GitHub Actions / build (macos-14)

Unreachable code detected

Check warning on line 31 in NAPS2.Escl.Server/CertificateHelper.cs

View workflow job for this annotation

GitHub Actions / build (macos-14)

Unreachable code detected
{
if (CertificateRequestType == null)
Expand Down
2 changes: 1 addition & 1 deletion NAPS2.Escl.Server/EsclServer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ public async Task Start()
// Try to generate a self-signed certificate if the caller hasn't provided one
if (!SecurityPolicy.HasFlag(EsclSecurityPolicy.ServerDisableHttps) && Certificate == null)
{
// await Task.Run(() => Certificate = CertificateHelper.GenerateSelfSignedCertificate(Logger));
await Task.Run(() => Certificate = CertificateHelper.GenerateSelfSignedCertificate(Logger));
}
if (SecurityPolicy.HasFlag(EsclSecurityPolicy.ServerRequireHttps) && Certificate == null)
{
Expand Down

0 comments on commit 6d369a9

Please sign in to comment.