diff options
| author | Steven Fackler <[email protected]> | 2017-12-25 19:57:02 -0700 |
|---|---|---|
| committer | Steven Fackler <[email protected]> | 2017-12-25 19:57:02 -0700 |
| commit | 77448362ce5ba6a52651671bfaf8d7473c1c7a39 (patch) | |
| tree | 60147a169dfcfaf147b85c42846ea23a6d709d51 /openssl/src/ssl/tests | |
| parent | Move to associated consts (diff) | |
| download | rust-openssl-77448362ce5ba6a52651671bfaf8d7473c1c7a39.tar.xz rust-openssl-77448362ce5ba6a52651671bfaf8d7473c1c7a39.zip | |
Rename X509FileType to X509Filetype
Diffstat (limited to 'openssl/src/ssl/tests')
| -rw-r--r-- | openssl/src/ssl/tests/mod.rs | 42 |
1 files changed, 21 insertions, 21 deletions
diff --git a/openssl/src/ssl/tests/mod.rs b/openssl/src/ssl/tests/mod.rs index 822cac24..ef8cb4cb 100644 --- a/openssl/src/ssl/tests/mod.rs +++ b/openssl/src/ssl/tests/mod.rs @@ -20,7 +20,7 @@ use ocsp::{OcspResponse, OcspResponseStatus}; use ssl; use ssl::{Error, HandshakeError, ShutdownResult, Ssl, SslAcceptorBuilder, SslConnectorBuilder, SslContext, SslMethod, SslStream, SslVerifyMode, StatusType}; -use x509::{X509, X509FileType, X509Name, X509StoreContext}; +use x509::{X509, X509Filetype, X509Name, X509StoreContext}; #[cfg(any(all(feature = "v102", ossl102), all(feature = "v110", ossl110)))] use x509::verify::X509_CHECK_FLAG_NO_PARTIAL_WILDCARDS; use pkey::PKey; @@ -349,9 +349,9 @@ fn test_write_hits_stream() { let mut ctx = SslContext::builder(SslMethod::tls()).unwrap(); ctx.set_verify(SslVerifyMode::PEER); - ctx.set_certificate_file(&Path::new("test/cert.pem"), X509FileType::PEM) + ctx.set_certificate_file(&Path::new("test/cert.pem"), X509Filetype::PEM) .unwrap(); - ctx.set_private_key_file(&Path::new("test/key.pem"), X509FileType::PEM) + ctx.set_private_key_file(&Path::new("test/key.pem"), X509Filetype::PEM) .unwrap(); let stream = listener.accept().unwrap().0; let mut stream = Ssl::new(&ctx.build()).unwrap().accept(stream).unwrap(); @@ -620,10 +620,10 @@ fn test_npn_server_advertise_multiple() { ctx.set_verify(SslVerifyMode::PEER); ctx.set_npn_protocols(&[b"http/1.1", b"spdy/3.1"]).unwrap(); assert!( - ctx.set_certificate_file(&Path::new("test/cert.pem"), X509FileType::PEM) + ctx.set_certificate_file(&Path::new("test/cert.pem"), X509Filetype::PEM) .is_ok() ); - ctx.set_private_key_file(&Path::new("test/key.pem"), X509FileType::PEM) + ctx.set_private_key_file(&Path::new("test/key.pem"), X509Filetype::PEM) .unwrap(); ctx.build() }; @@ -663,10 +663,10 @@ fn test_alpn_server_advertise_multiple() { ctx.set_verify(SslVerifyMode::PEER); ctx.set_alpn_protocols(&[b"http/1.1", b"spdy/3.1"]).unwrap(); assert!( - ctx.set_certificate_file(&Path::new("test/cert.pem"), X509FileType::PEM) + ctx.set_certificate_file(&Path::new("test/cert.pem"), X509Filetype::PEM) .is_ok() ); - ctx.set_private_key_file(&Path::new("test/key.pem"), X509FileType::PEM) + ctx.set_private_key_file(&Path::new("test/key.pem"), X509Filetype::PEM) .unwrap(); ctx.build() }; @@ -706,10 +706,10 @@ fn test_alpn_server_select_none() { ctx.set_verify(SslVerifyMode::PEER); ctx.set_alpn_protocols(&[b"http/1.1", b"spdy/3.1"]).unwrap(); assert!( - ctx.set_certificate_file(&Path::new("test/cert.pem"), X509FileType::PEM) + ctx.set_certificate_file(&Path::new("test/cert.pem"), X509Filetype::PEM) .is_ok() ); - ctx.set_private_key_file(&Path::new("test/key.pem"), X509FileType::PEM) + ctx.set_private_key_file(&Path::new("test/key.pem"), X509Filetype::PEM) .unwrap(); ctx.build() }; @@ -1162,9 +1162,9 @@ fn shutdown() { thread::spawn(move || { let stream = listener.accept().unwrap().0; let mut ctx = SslContext::builder(SslMethod::tls()).unwrap(); - ctx.set_certificate_file(&Path::new("test/cert.pem"), X509FileType::PEM) + ctx.set_certificate_file(&Path::new("test/cert.pem"), X509Filetype::PEM) .unwrap(); - ctx.set_private_key_file(&Path::new("test/key.pem"), X509FileType::PEM) + ctx.set_private_key_file(&Path::new("test/key.pem"), X509Filetype::PEM) .unwrap(); let ssl = Ssl::new(&ctx.build()).unwrap(); let mut stream = ssl.accept(stream).unwrap(); @@ -1220,9 +1220,9 @@ fn tmp_dh_callback() { thread::spawn(move || { let stream = listener.accept().unwrap().0; let mut ctx = SslContext::builder(SslMethod::tls()).unwrap(); - ctx.set_certificate_file(&Path::new("test/cert.pem"), X509FileType::PEM) + ctx.set_certificate_file(&Path::new("test/cert.pem"), X509Filetype::PEM) .unwrap(); - ctx.set_private_key_file(&Path::new("test/key.pem"), X509FileType::PEM) + ctx.set_private_key_file(&Path::new("test/key.pem"), X509Filetype::PEM) .unwrap(); ctx.set_tmp_dh_callback(|_, _, _| { CALLED_BACK.store(true, Ordering::SeqCst); @@ -1257,9 +1257,9 @@ fn tmp_ecdh_callback() { thread::spawn(move || { let stream = listener.accept().unwrap().0; let mut ctx = SslContext::builder(SslMethod::tls()).unwrap(); - ctx.set_certificate_file(&Path::new("test/cert.pem"), X509FileType::PEM) + ctx.set_certificate_file(&Path::new("test/cert.pem"), X509Filetype::PEM) .unwrap(); - ctx.set_private_key_file(&Path::new("test/key.pem"), X509FileType::PEM) + ctx.set_private_key_file(&Path::new("test/key.pem"), X509Filetype::PEM) .unwrap(); ctx.set_tmp_ecdh_callback(|_, _, _| { CALLED_BACK.store(true, Ordering::SeqCst); @@ -1288,9 +1288,9 @@ fn tmp_dh_callback_ssl() { thread::spawn(move || { let stream = listener.accept().unwrap().0; let mut ctx = SslContext::builder(SslMethod::tls()).unwrap(); - ctx.set_certificate_file(&Path::new("test/cert.pem"), X509FileType::PEM) + ctx.set_certificate_file(&Path::new("test/cert.pem"), X509Filetype::PEM) .unwrap(); - ctx.set_private_key_file(&Path::new("test/key.pem"), X509FileType::PEM) + ctx.set_private_key_file(&Path::new("test/key.pem"), X509Filetype::PEM) .unwrap(); let mut ssl = Ssl::new(&ctx.build()).unwrap(); ssl.set_tmp_dh_callback(|_, _, _| { @@ -1325,9 +1325,9 @@ fn tmp_ecdh_callback_ssl() { thread::spawn(move || { let stream = listener.accept().unwrap().0; let mut ctx = SslContext::builder(SslMethod::tls()).unwrap(); - ctx.set_certificate_file(&Path::new("test/cert.pem"), X509FileType::PEM) + ctx.set_certificate_file(&Path::new("test/cert.pem"), X509Filetype::PEM) .unwrap(); - ctx.set_private_key_file(&Path::new("test/key.pem"), X509FileType::PEM) + ctx.set_private_key_file(&Path::new("test/key.pem"), X509Filetype::PEM) .unwrap(); let mut ssl = Ssl::new(&ctx.build()).unwrap(); ssl.set_tmp_ecdh_callback(|_, _, _| { @@ -1380,9 +1380,9 @@ fn status_callbacks() { let guard = thread::spawn(move || { let stream = listener.accept().unwrap().0; let mut ctx = SslContext::builder(SslMethod::tls()).unwrap(); - ctx.set_certificate_file(&Path::new("test/cert.pem"), X509FileType::PEM) + ctx.set_certificate_file(&Path::new("test/cert.pem"), X509Filetype::PEM) .unwrap(); - ctx.set_private_key_file(&Path::new("test/key.pem"), X509FileType::PEM) + ctx.set_private_key_file(&Path::new("test/key.pem"), X509Filetype::PEM) .unwrap(); ctx.set_status_callback(|ssl| { CALLED_BACK_SERVER.store(true, Ordering::SeqCst); |