Skip to content

Commit a7e196b

Browse files
committed
feat: add option to control CheckCertificateRevocation flag of MailKit
1 parent 8f921ee commit a7e196b

File tree

3 files changed

+5
-0
lines changed

3 files changed

+5
-0
lines changed

Rnwood.Smtp4dev/Server/Settings/RelayOptions.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,8 @@ public int SmtpPort
2626
public SecureSocketOptions TlsMode { get; set; } = SecureSocketOptions.Auto;
2727

2828
public string[] SslCipherSuitesPolicy { get; set; } = System.Array.Empty<string>();
29+
30+
public bool CheckCertificateRevocation { get; set; } = true;
2931

3032
public string[] AutomaticEmails { get; set; } = System.Array.Empty<string>();
3133

Rnwood.Smtp4dev/Server/Settings/RelayOptionsSource.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,8 @@ public int? SmtpPort
2020

2121
public string[] SslCipherSuitesPolicy { get; set; } = System.Array.Empty<string>();
2222

23+
public bool CheckCertificateRevocation { get; set; } = true;
24+
2325
public string[] AutomaticEmails { get; set; } = System.Array.Empty<string>();
2426

2527
public string AutomaticRelayExpression { get; set; }

Rnwood.Smtp4dev/Startup.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -255,6 +255,7 @@ public void ConfigureServices(IServiceCollection services)
255255
}
256256
}
257257
#endif
258+
result.CheckCertificateRevocation = relayOptions.CheckCertificateRevocation;
258259
result.Connect(relayOptions.SmtpServer, relayOptions.SmtpPort, relayOptions.TlsMode);
259260

260261
if (!string.IsNullOrEmpty(relayOptions.Login))

0 commit comments

Comments
 (0)