diff options
| author | Steven Fackler <[email protected]> | 2015-02-24 23:01:57 -0800 |
|---|---|---|
| committer | Steven Fackler <[email protected]> | 2015-02-24 23:01:57 -0800 |
| commit | 6991cc6a30c7f2e480145c4d0c5692924d293043 (patch) | |
| tree | 7077d07e5027dacb26ff86f0b1ed93af2c59f4c4 /openssl/src/x509/tests.rs | |
| parent | Switch to cargo liblibc (diff) | |
| download | rust-openssl-6991cc6a30c7f2e480145c4d0c5692924d293043.tar.xz rust-openssl-6991cc6a30c7f2e480145c4d0c5692924d293043.zip | |
Convert to new IO.
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`"); |