Simplify test logic a bit

This commit is contained in:
Steven Fackler 2016-11-12 14:42:48 +00:00
parent 157034d995
commit 7cdb58bc47
1 changed files with 2 additions and 10 deletions

View File

@ -1264,11 +1264,7 @@ 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();
}
ctx.set_cipher_list("ECDH").unwrap();
let ssl = Ssl::new(&ctx.build()).unwrap();
ssl.connect(stream).unwrap();
@ -1331,11 +1327,7 @@ 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();
}
ctx.set_cipher_list("ECDH").unwrap();
let ssl = Ssl::new(&ctx.build()).unwrap();
ssl.connect(stream).unwrap();