Pick different cipher lists on 1.0.1 and 1.0.2

This commit is contained in:
Steven Fackler 2016-11-12 13:35:51 +00:00
parent 93253ba599
commit 2a1d7b2bcb
1 changed files with 10 additions and 2 deletions

View File

@ -1264,7 +1264,11 @@ fn tmp_ecdh_callback() {
let stream = TcpStream::connect(("127.0.0.1", port)).unwrap();
let mut ctx = SslContext::builder(SslMethod::tls()).unwrap();
if cfg!(ossl101) {
ctx.set_cipher_list("kECDHe").unwrap();
} else {
ctx.set_cipher_list("ECDHE").unwrap();
}
let ssl = Ssl::new(&ctx.build()).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 mut ctx = SslContext::builder(SslMethod::tls()).unwrap();
if cfg!(ossl101) {
ctx.set_cipher_list("kECDHe").unwrap();
} else {
ctx.set_cipher_list("ECDHE").unwrap();
}
let ssl = Ssl::new(&ctx.build()).unwrap();
ssl.connect(stream).unwrap();