File tree 5 files changed +3
-7
lines changed 5 files changed +3
-7
lines changed Original file line number Diff line number Diff line change @@ -6,6 +6,7 @@ license = "MIT OR Apache-2.0"
6
6
description = " A wrapper over a platform's native TLS implementation"
7
7
repository = " https://github.com/sfackler/rust-native-tls"
8
8
readme = " README.md"
9
+ rust-version = " 1.53.0"
9
10
10
11
[package .metadata .docs .rs ]
11
12
features = [" alpn" ]
Original file line number Diff line number Diff line change @@ -32,7 +32,6 @@ fn supported_protocols(
32
32
Protocol :: Tlsv10 => SslVersion :: TLS1 ,
33
33
Protocol :: Tlsv11 => SslVersion :: TLS1_1 ,
34
34
Protocol :: Tlsv12 => SslVersion :: TLS1_2 ,
35
- Protocol :: __NonExhaustive => unreachable ! ( ) ,
36
35
}
37
36
}
38
37
@@ -71,7 +70,6 @@ fn supported_protocols(
71
70
| SslOptions :: NO_TLSV1
72
71
| SslOptions :: NO_TLSV1_1
73
72
}
74
- Some ( Protocol :: __NonExhaustive) => unreachable ! ( ) ,
75
73
} ;
76
74
options |= match max {
77
75
None | Some ( Protocol :: Tlsv12 ) => SslOptions :: empty ( ) ,
@@ -80,7 +78,6 @@ fn supported_protocols(
80
78
Some ( Protocol :: Sslv3 ) => {
81
79
SslOptions :: NO_TLSV1 | SslOptions :: NO_TLSV1_1 | SslOptions :: NO_TLSV1_2
82
80
}
83
- Some ( Protocol :: __NonExhaustive) => unreachable ! ( ) ,
84
81
} ;
85
82
86
83
ctx. set_options ( options) ;
Original file line number Diff line number Diff line change @@ -48,7 +48,6 @@ fn convert_protocol(protocol: Protocol) -> SslProtocol {
48
48
Protocol :: Tlsv10 => SslProtocol :: TLS1 ,
49
49
Protocol :: Tlsv11 => SslProtocol :: TLS11 ,
50
50
Protocol :: Tlsv12 => SslProtocol :: TLS12 ,
51
- Protocol :: __NonExhaustive => unreachable ! ( ) ,
52
51
}
53
52
}
54
53
Original file line number Diff line number Diff line change @@ -311,6 +311,7 @@ impl<S> From<imp::HandshakeError<S>> for HandshakeError<S> {
311
311
312
312
/// SSL/TLS protocol versions.
313
313
#[ derive( Debug , Copy , Clone ) ]
314
+ #[ non_exhaustive]
314
315
pub enum Protocol {
315
316
/// The SSL 3.0 protocol.
316
317
///
@@ -325,8 +326,6 @@ pub enum Protocol {
325
326
Tlsv11 ,
326
327
/// The TLS 1.2 protocol.
327
328
Tlsv12 ,
328
- #[ doc( hidden) ]
329
- __NonExhaustive,
330
329
}
331
330
332
331
/// A builder for `TlsConnector`s.
Original file line number Diff line number Diff line change @@ -141,7 +141,7 @@ fn certificate_from_pem() {
141
141
let keys = test_cert_gen:: keys ( ) ;
142
142
143
143
let der_path = dir. path ( ) . join ( "cert.der" ) ;
144
- fs:: write ( & der_path, & keys. client . ca . get_der ( ) ) . unwrap ( ) ;
144
+ fs:: write ( & der_path, keys. client . ca . get_der ( ) ) . unwrap ( ) ;
145
145
let output = Command :: new ( "openssl" )
146
146
. arg ( "x509" )
147
147
. arg ( "-in" )
You can’t perform that action at this time.
0 commit comments