File tree Expand file tree Collapse file tree 3 files changed +1
-41
lines changed Expand file tree Collapse file tree 3 files changed +1
-41
lines changed Original file line number Diff line number Diff line change @@ -12,7 +12,6 @@ vendored = ["openssl/vendored"]
12
12
13
13
[dependencies ]
14
14
lazy_static = " 1.0"
15
- rustc-serialize = " 0.3"
16
15
17
16
[target .'cfg(any(target_os = "macos", target_os = "ios"))' .dependencies ]
18
17
security-framework = " 0.3.1"
Original file line number Diff line number Diff line change 27
27
//! * TLS/SSL client communication
28
28
//! * TLS/SSL server communication
29
29
//! * PKCS#12 encoded identities
30
- //! * PKCS#8 encoded identities
30
+ //! * X.509/ PKCS#8 encoded identities
31
31
//! * Secure-by-default for client and server
32
32
//! * Includes hostname verification for clients
33
33
//! * Supports asynchronous I/O for both the server and the client
97
97
#![ doc( html_root_url = "https://docs.rs/native-tls/0.2" ) ]
98
98
#![ warn( missing_docs) ]
99
99
100
- #[ macro_use]
101
- extern crate lazy_static;
102
-
103
100
#[ cfg( test) ]
104
101
extern crate hex;
105
102
106
- extern crate rustc_serialize;
107
103
mod pem;
108
104
109
105
use std:: any:: Any ;
Original file line number Diff line number Diff line change 1
1
#![ allow( unused) ]
2
- use rustc_serialize:: base64:: { self , FromBase64 , ToBase64 } ;
3
-
4
- /// Type of the various `PEM_*` constants supplied to `pem_to_der` / `der_to_pem`.
5
- pub struct PemGuard {
6
- begin : & ' static str ,
7
- end : & ' static str ,
8
- }
9
-
10
- macro_rules! pem_guard {
11
- ( $n: expr) => {
12
- & PemGuard {
13
- begin: concat!( "-----BEGIN " , $n, "-----" ) ,
14
- end: concat!( "-----END " , $n, "-----" ) ,
15
- }
16
- }
17
- }
18
-
19
- // Ref. RFC7468, although these are not universally respected.
20
- pub const PEM_CERTIFICATE : & ' static PemGuard = pem_guard ! ( "CERTIFICATE" ) ;
21
- pub const PEM_CERTIFICATE_REQUEST : & ' static PemGuard = pem_guard ! ( "CERTIFICATE REQUEST" ) ;
22
- pub const PEM_ENCRYPTED_PRIVATE_KEY : & ' static PemGuard = pem_guard ! ( "ENCRYPTED PRIVATE KEY" ) ;
23
- pub const PEM_PRIVATE_KEY : & ' static PemGuard = pem_guard ! ( "PRIVATE KEY" ) ;
24
- pub const PEM_PUBLIC_KEY : & ' static PemGuard = pem_guard ! ( "PUBLIC KEY" ) ;
25
- pub const PEM_CMS : & ' static PemGuard = pem_guard ! ( "CMS" ) ;
26
-
27
- const BASE64_PEM_WRAP : usize = 64 ;
28
-
29
- lazy_static ! {
30
- static ref BASE64_PEM : base64:: Config = base64:: Config {
31
- char_set: base64:: CharacterSet :: Standard ,
32
- newline: base64:: Newline :: LF ,
33
- pad: true ,
34
- line_length: Some ( BASE64_PEM_WRAP ) ,
35
- } ;
36
- }
37
2
38
3
/// Split data by PEM guard lines
39
4
pub struct PemBlock < ' a > {
You can’t perform that action at this time.
0 commit comments