File tree Expand file tree Collapse file tree 3 files changed +7
-8
lines changed Expand file tree Collapse file tree 3 files changed +7
-8
lines changed Original file line number Diff line number Diff line change @@ -100,7 +100,7 @@ pub use self::error::Error;
100
100
pub use self :: server:: { NamedService , Server } ;
101
101
#[ doc( inline) ]
102
102
pub use self :: service:: TimeoutExpired ;
103
- pub use self :: tls:: { Certificate , Identity } ;
103
+ pub use self :: tls:: Certificate ;
104
104
pub use hyper:: { Body , Uri } ;
105
105
106
106
#[ cfg( feature = "tls" ) ]
@@ -109,6 +109,9 @@ pub use self::channel::ClientTlsConfig;
109
109
#[ cfg( feature = "tls" ) ]
110
110
#[ cfg_attr( docsrs, doc( cfg( feature = "tls" ) ) ) ]
111
111
pub use self :: server:: ServerTlsConfig ;
112
+ #[ cfg( feature = "tls" ) ]
113
+ #[ cfg_attr( docsrs, doc( cfg( feature = "tls" ) ) ) ]
114
+ pub use self :: tls:: Identity ;
112
115
113
116
type BoxFuture < T , E > =
114
117
std:: pin:: Pin < Box < dyn std:: future:: Future < Output = Result < T , E > > + Send + ' static > > ;
Original file line number Diff line number Diff line change @@ -18,13 +18,6 @@ use tokio_rustls::{
18
18
#[ cfg( feature = "tls" ) ]
19
19
const ALPN_H2 : & str = "h2" ;
20
20
21
- #[ derive( Debug , Clone ) ]
22
- pub ( crate ) struct Cert {
23
- pub ( crate ) ca : Vec < u8 > ,
24
- pub ( crate ) key : Option < Vec < u8 > > ,
25
- pub ( crate ) domain : String ,
26
- }
27
-
28
21
#[ derive( Debug ) ]
29
22
enum TlsError {
30
23
#[ allow( dead_code) ]
Original file line number Diff line number Diff line change @@ -5,6 +5,8 @@ pub struct Certificate {
5
5
}
6
6
7
7
/// Represents a private key and X509 certificate.
8
+ #[ cfg( feature = "tls" ) ]
9
+ #[ cfg_attr( docsrs, doc( cfg( feature = "tls" ) ) ) ]
8
10
#[ derive( Debug , Clone ) ]
9
11
pub struct Identity {
10
12
pub ( crate ) cert : Certificate ,
@@ -42,6 +44,7 @@ impl AsRef<[u8]> for Certificate {
42
44
}
43
45
}
44
46
47
+ #[ cfg( feature = "tls" ) ]
45
48
impl Identity {
46
49
/// Parse a PEM encoded certificate and private key.
47
50
///
You can’t perform that action at this time.
0 commit comments