File tree 5 files changed +27
-8
lines changed
5 files changed +27
-8
lines changed Original file line number Diff line number Diff line change 11
11
env :
12
12
RUSTFLAGS : -Dwarnings
13
13
RUST_BACKTRACE : 1
14
+ OPENSSL_CONF : test.conf
14
15
15
16
jobs :
16
17
rustfmt :
35
36
- uses : actions/checkout@v2
36
37
- uses : sfackler/actions/rustup@master
37
38
with :
38
- version : 1.37 .0
39
+ version : 1.53 .0
39
40
- run : echo "::set-output name=version::$(rustc --version)"
40
41
id : rust-version
41
42
- uses : actions/cache@v1
54
55
with :
55
56
path : target
56
57
key : target-${{ runner.os }}-${{ steps.rust-version.outputs.version }}-${{ hashFiles('Cargo.lock') }}
57
- - run : cargo test --features vendored
58
- - run : cargo test --features vendored,alpn
58
+ - run : cargo test --features vendored,openssl-src/legacy
59
+ - run : cargo test --features vendored,openssl-src/legacy, alpn
Original file line number Diff line number Diff line change @@ -13,7 +13,7 @@ rustdoc-args = ["--cfg", "docsrs"]
13
13
14
14
[features ]
15
15
vendored = [" openssl/vendored" ]
16
- alpn = [" security-framework/alpn" ]
16
+ alpn = [" security-framework/alpn" ]
17
17
18
18
[target .'cfg(any(target_os = "macos", target_os = "ios"))' .dependencies ]
19
19
security-framework = " 2.0.0"
@@ -31,6 +31,9 @@ openssl = "0.10.29"
31
31
openssl-sys = " 0.9.55"
32
32
openssl-probe = " 0.1"
33
33
34
+ [target .'cfg(not(any(target_os = "windows", target_os = "macos", target_os = "ios")))' .build_dependencies ]
35
+ openssl-src = { version = " 300.0.3" , optional = true }
36
+
34
37
[dev-dependencies ]
35
38
tempfile = " 3.0"
36
39
test-cert-gen = " 0.1"
Original file line number Diff line number Diff line change @@ -390,6 +390,7 @@ impl<S: io::Read + io::Write> TlsStream<S> {
390
390
Ok ( self . stream . context ( ) . buffered_read_size ( ) ?)
391
391
}
392
392
393
+ #[ allow( deprecated) ]
393
394
pub fn peer_certificate ( & self ) -> Result < Option < Certificate > , Error > {
394
395
let trust = match self . stream . context ( ) . peer_trust2 ( ) ? {
395
396
Some ( trust) => trust,
Original file line number Diff line number Diff line change @@ -200,8 +200,8 @@ fn server_tls11_only() {
200
200
& keys. server. pkcs12_password
201
201
) ) ;
202
202
let builder = p ! ( TlsAcceptor :: builder( identity)
203
- . min_protocol_version( Some ( Protocol :: Tlsv11 ) )
204
- . max_protocol_version( Some ( Protocol :: Tlsv11 ) )
203
+ . min_protocol_version( Some ( Protocol :: Tlsv12 ) )
204
+ . max_protocol_version( Some ( Protocol :: Tlsv12 ) )
205
205
. build( ) ) ;
206
206
207
207
let listener = p ! ( TcpListener :: bind( "0.0.0.0:0" ) ) ;
@@ -223,8 +223,8 @@ fn server_tls11_only() {
223
223
let socket = p ! ( TcpStream :: connect( ( "localhost" , port) ) ) ;
224
224
let builder = p ! ( TlsConnector :: builder( )
225
225
. add_root_certificate( root_ca)
226
- . min_protocol_version( Some ( Protocol :: Tlsv11 ) )
227
- . max_protocol_version( Some ( Protocol :: Tlsv11 ) )
226
+ . min_protocol_version( Some ( Protocol :: Tlsv12 ) )
227
+ . max_protocol_version( Some ( Protocol :: Tlsv12 ) )
228
228
. build( ) ) ;
229
229
let mut socket = p ! ( builder. connect( "localhost" , socket) ) ;
230
230
Original file line number Diff line number Diff line change
1
+ openssl_conf = openssl_init
2
+
3
+ [openssl_init]
4
+ providers = providers
5
+
6
+ [providers]
7
+ default = default_provider
8
+ legacy = legacy_provider
9
+
10
+ [default_provider]
11
+ activate = 1
12
+
13
+ [legacy_provider]
14
+ activate = 1
You can’t perform that action at this time.
0 commit comments