Pick different cipher lists on 1.0.1 and 1.0.2
This commit is contained in:
parent
93253ba599
commit
2a1d7b2bcb
|
|
@ -1264,7 +1264,11 @@ fn tmp_ecdh_callback() {
|
||||||
|
|
||||||
let stream = TcpStream::connect(("127.0.0.1", port)).unwrap();
|
let stream = TcpStream::connect(("127.0.0.1", port)).unwrap();
|
||||||
let mut ctx = SslContext::builder(SslMethod::tls()).unwrap();
|
let mut ctx = SslContext::builder(SslMethod::tls()).unwrap();
|
||||||
|
if cfg!(ossl101) {
|
||||||
ctx.set_cipher_list("kECDHe").unwrap();
|
ctx.set_cipher_list("kECDHe").unwrap();
|
||||||
|
} else {
|
||||||
|
ctx.set_cipher_list("ECDHE").unwrap();
|
||||||
|
}
|
||||||
let ssl = Ssl::new(&ctx.build()).unwrap();
|
let ssl = Ssl::new(&ctx.build()).unwrap();
|
||||||
ssl.connect(stream).unwrap();
|
ssl.connect(stream).unwrap();
|
||||||
|
|
||||||
|
|
@ -1327,7 +1331,11 @@ fn tmp_ecdh_callback_ssl() {
|
||||||
|
|
||||||
let stream = TcpStream::connect(("127.0.0.1", port)).unwrap();
|
let stream = TcpStream::connect(("127.0.0.1", port)).unwrap();
|
||||||
let mut ctx = SslContext::builder(SslMethod::tls()).unwrap();
|
let mut ctx = SslContext::builder(SslMethod::tls()).unwrap();
|
||||||
|
if cfg!(ossl101) {
|
||||||
ctx.set_cipher_list("kECDHe").unwrap();
|
ctx.set_cipher_list("kECDHe").unwrap();
|
||||||
|
} else {
|
||||||
|
ctx.set_cipher_list("ECDHE").unwrap();
|
||||||
|
}
|
||||||
let ssl = Ssl::new(&ctx.build()).unwrap();
|
let ssl = Ssl::new(&ctx.build()).unwrap();
|
||||||
ssl.connect(stream).unwrap();
|
ssl.connect(stream).unwrap();
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue