Messaging TLS Protokoll
This commit is contained in:
@@ -19,6 +19,7 @@ Namespace Mail
|
|||||||
Public Const AUTH_SSLTLS = "SSL/TLS"
|
Public Const AUTH_SSLTLS = "SSL/TLS"
|
||||||
Public Const AUTH_NONE = "NONE"
|
Public Const AUTH_NONE = "NONE"
|
||||||
Public Const AUTH_OAUTH2 = "OAUTH2"
|
Public Const AUTH_OAUTH2 = "OAUTH2"
|
||||||
|
Public Const SSLProtocol_TLS12 = "TLS12"
|
||||||
|
|
||||||
Private Const SMTP_IGNORED_ERRORS As SslPolicyErrors =
|
Private Const SMTP_IGNORED_ERRORS As SslPolicyErrors =
|
||||||
SslPolicyErrors.RemoteCertificateChainErrors Or ' self-signed
|
SslPolicyErrors.RemoteCertificateChainErrors Or ' self-signed
|
||||||
@@ -137,10 +138,8 @@ Namespace Mail
|
|||||||
|
|
||||||
If pOptions.EnableTls1_2 Then
|
If pOptions.EnableTls1_2 Then
|
||||||
Logger.Debug("Enabling TLS Version 1.2...")
|
Logger.Debug("Enabling TLS Version 1.2...")
|
||||||
Client.SSLConfiguration.EnabledSslProtocols = Client.SSLConfiguration.EnabledSslProtocols Or Security.Authentication.SslProtocols.Tls12
|
Client.SSLConfiguration.EnabledSslProtocols = Security.Authentication.SslProtocols.Tls12
|
||||||
End If
|
End If
|
||||||
|
|
||||||
' This is not available in .NET 4.6.2, only in .NET 4.7/4.8
|
|
||||||
'If pOptions.EnableTls1_3 Then
|
'If pOptions.EnableTls1_3 Then
|
||||||
' Logger.Debug("Enabling TLS Version 1.3")
|
' Logger.Debug("Enabling TLS Version 1.3")
|
||||||
' oSession.SSLConfiguration.EnabledSslProtocols = oSession.SSLConfiguration.EnabledSslProtocols Or Security.Authentication.SslProtocols.Tls13
|
' oSession.SSLConfiguration.EnabledSslProtocols = oSession.SSLConfiguration.EnabledSslProtocols Or Security.Authentication.SslProtocols.Tls13
|
||||||
@@ -192,7 +191,9 @@ Namespace Mail
|
|||||||
ElseIf Session.AuthType = AUTH_SSLTLS Or Session.AuthType = AUTH_STARTTLS Then
|
ElseIf Session.AuthType = AUTH_SSLTLS Or Session.AuthType = AUTH_STARTTLS Then
|
||||||
|
|
||||||
Try
|
Try
|
||||||
|
Logger.Debug("Client.SSLConfiguration.EnabledSslProtocols is [{0}]", Client.SSLConfiguration.EnabledSslProtocols.ToString)
|
||||||
If pSession.Port = 993 Then
|
If pSession.Port = 993 Then
|
||||||
|
Logger.Debug("Port is 993 - So Client.ConnectSSL will be used!")
|
||||||
Logger.Debug("Connecting with [STARTTLS/ConnectSSL] on [{0}/{1}]", pSession.Server, pSession.Port)
|
Logger.Debug("Connecting with [STARTTLS/ConnectSSL] on [{0}/{1}]", pSession.Server, pSession.Port)
|
||||||
Client.ConnectSSL(pSession.Server, pSession.Port)
|
Client.ConnectSSL(pSession.Server, pSession.Port)
|
||||||
Else
|
Else
|
||||||
|
|||||||
@@ -31,5 +31,5 @@ Imports System.Runtime.InteropServices
|
|||||||
' übernehmen, indem Sie "*" eingeben:
|
' übernehmen, indem Sie "*" eingeben:
|
||||||
' <Assembly: AssemblyVersion("1.0.*")>
|
' <Assembly: AssemblyVersion("1.0.*")>
|
||||||
|
|
||||||
<Assembly: AssemblyVersion("1.9.9.0")>
|
<Assembly: AssemblyVersion("2.0.0.0")>
|
||||||
<Assembly: AssemblyFileVersion("1.9.9.0")>
|
<Assembly: AssemblyFileVersion("2.0.0.0")>
|
||||||
|
|||||||
Reference in New Issue
Block a user