@@ -316,8 +316,16 @@ pub enum Protocol {
316
316
/// you are not sure if you need to enable this protocol, you should not.
317
317
Sslv3 ,
318
318
/// The TLS 1.0 protocol.
319
+ ///
320
+ /// # Warning
321
+ ///
322
+ /// Deprecated in 2021 (RFC 8996)
319
323
Tlsv10 ,
320
324
/// The TLS 1.1 protocol.
325
+ ///
326
+ /// # Warning
327
+ ///
328
+ /// Deprecated in 2021 (RFC 8996)
321
329
Tlsv11 ,
322
330
/// The TLS 1.2 protocol.
323
331
Tlsv12 ,
@@ -350,7 +358,7 @@ impl TlsConnectorBuilder {
350
358
///
351
359
/// A value of `None` enables support for the oldest protocols supported by the implementation.
352
360
///
353
- /// Defaults to `Some(Protocol::Tlsv10 )`.
361
+ /// Defaults to `Some(Protocol::Tlsv12 )`.
354
362
pub fn min_protocol_version ( & mut self , protocol : Option < Protocol > ) -> & mut TlsConnectorBuilder {
355
363
self . min_protocol = protocol;
356
364
self
@@ -476,7 +484,7 @@ impl TlsConnector {
476
484
pub fn builder ( ) -> TlsConnectorBuilder {
477
485
TlsConnectorBuilder {
478
486
identity : None ,
479
- min_protocol : Some ( Protocol :: Tlsv10 ) ,
487
+ min_protocol : Some ( Protocol :: Tlsv12 ) ,
480
488
max_protocol : None ,
481
489
root_certificates : vec ! [ ] ,
482
490
use_sni : true ,
@@ -527,7 +535,7 @@ impl TlsAcceptorBuilder {
527
535
///
528
536
/// A value of `None` enables support for the oldest protocols supported by the implementation.
529
537
///
530
- /// Defaults to `Some(Protocol::Tlsv10 )`.
538
+ /// Defaults to `Some(Protocol::Tlsv12 )`.
531
539
pub fn min_protocol_version ( & mut self , protocol : Option < Protocol > ) -> & mut TlsAcceptorBuilder {
532
540
self . min_protocol = protocol;
533
541
self
@@ -605,7 +613,7 @@ impl TlsAcceptor {
605
613
pub fn builder ( identity : Identity ) -> TlsAcceptorBuilder {
606
614
TlsAcceptorBuilder {
607
615
identity,
608
- min_protocol : Some ( Protocol :: Tlsv10 ) ,
616
+ min_protocol : Some ( Protocol :: Tlsv12 ) ,
609
617
max_protocol : None ,
610
618
}
611
619
}
0 commit comments