File tree Expand file tree Collapse file tree 1 file changed +6
-0
lines changed
Expand file tree Collapse file tree 1 file changed +6
-0
lines changed Original file line number Diff line number Diff line change @@ -67,9 +67,15 @@ protected MailService (IProtocolLogger protocolLogger)
6767 if ( protocolLogger == null )
6868 throw new ArgumentNullException ( nameof ( protocolLogger ) ) ;
6969
70+ #if NET462
71+ // Default the SslProtocols value to Tls12 in order to avoid using SSL3 and TLS1.0/1.1 which are
72+ // considered insecure (and is the latest protocol version supported by net462).
73+ SslProtocols = SslProtocols . Tls12 ;
74+ #else
7075 // Default the SslProtocols value to `None` which allows the operating system to choose the best
7176 // protocol to use and to block protocols that are not secure.
7277 SslProtocols = SslProtocols . None ;
78+ #endif
7379 CheckCertificateRevocation = true ;
7480 ProtocolLogger = protocolLogger ;
7581 }
You can’t perform that action at this time.
0 commit comments