diff options
| author | Steven Fackler <[email protected]> | 2015-02-27 19:47:24 -0800 |
|---|---|---|
| committer | Steven Fackler <[email protected]> | 2015-02-27 19:47:24 -0800 |
| commit | 2789764fe38a45df7ac0e0027b65a633b677a8a5 (patch) | |
| tree | d7b06f13f502fe5dad5b43f58462fb190fa01ff4 /openssl/src/x509/tests.rs | |
| parent | Silence stability warning (diff) | |
| parent | Convert to new IO. (diff) | |
| download | rust-openssl-2789764fe38a45df7ac0e0027b65a633b677a8a5.tar.xz rust-openssl-2789764fe38a45df7ac0e0027b65a633b677a8a5.zip | |
Merge branch 'breaks'
Conflicts:
openssl/src/lib.rs
Diffstat (limited to 'openssl/src/x509/tests.rs')
| -rw-r--r-- | openssl/src/x509/tests.rs | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/openssl/src/x509/tests.rs b/openssl/src/x509/tests.rs index 4f24e70c..cbb3d902 100644 --- a/openssl/src/x509/tests.rs +++ b/openssl/src/x509/tests.rs @@ -1,6 +1,7 @@ use serialize::hex::FromHex; -use std::old_io::{File, Open, Read}; -use std::old_io::util::NullWriter; +use std::io; +use std::path::Path; +use std::fs::File; use crypto::hash::Type::{SHA256}; use x509::{X509, X509Generator}; @@ -22,9 +23,8 @@ fn test_cert_gen() { let (cert, pkey) = res.unwrap(); - let mut writer = NullWriter; - assert!(cert.write_pem(&mut writer).is_ok()); - assert!(pkey.write_pem(&mut writer).is_ok()); + assert!(cert.write_pem(&mut io::sink()).is_ok()); + assert!(pkey.write_pem(&mut io::sink()).is_ok()); // FIXME: check data in result to be correct, needs implementation // of X509 getters @@ -33,7 +33,7 @@ fn test_cert_gen() { #[test] fn test_cert_loading() { let cert_path = Path::new("test/cert.pem"); - let mut file = File::open_mode(&cert_path, Open, Read) + let mut file = File::open(&cert_path) .ok() .expect("Failed to open `test/cert.pem`"); |