diff options
| author | Valerii Hiora <[email protected]> | 2015-01-03 16:42:58 +0200 |
|---|---|---|
| committer | Valerii Hiora <[email protected]> | 2015-01-03 16:42:58 +0200 |
| commit | cf028e971a11f7ab0a5ab2c01daa03d559db1322 (patch) | |
| tree | 7d7d52e3e7542c7cea656ea69e7a05d10c4ab7b4 /src/x509 | |
| parent | Merge pull request #134 from DiamondLovesYou/master (diff) | |
| download | rust-openssl-cf028e971a11f7ab0a5ab2c01daa03d559db1322.tar.xz rust-openssl-cf028e971a11f7ab0a5ab2c01daa03d559db1322.zip | |
Updated to master:
- library stab issues
- deriving -> derive
- {mod} -> {self}
Diffstat (limited to 'src/x509')
| -rw-r--r-- | src/x509/mod.rs | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/src/x509/mod.rs b/src/x509/mod.rs index c82eab11..ed8fb77d 100644 --- a/src/x509/mod.rs +++ b/src/x509/mod.rs @@ -1,4 +1,6 @@ use libc::{c_int, c_long, c_uint}; +use std::c_str::ToCStr; +use std::cmp::Ordering; use std::mem; use std::num::SignedInt; use std::ptr; @@ -15,7 +17,7 @@ use ssl::error::{SslError, StreamError}; #[cfg(test)] mod tests; -#[deriving(Copy)] +#[derive(Copy)] #[repr(i32)] pub enum X509FileType { PEM = ffi::X509_FILETYPE_PEM, @@ -56,7 +58,7 @@ trait AsStr<'a> { fn as_str(&self) -> &'a str; } -#[deriving(Clone, Copy)] +#[derive(Clone, Copy)] pub enum KeyUsage { DigitalSignature, NonRepudiation, @@ -86,7 +88,7 @@ impl AsStr<'static> for KeyUsage { } -#[deriving(Clone, Copy)] +#[derive(Clone, Copy)] pub enum ExtKeyUsage { ServerAuth, ClientAuth, @@ -395,9 +397,9 @@ impl<'ctx> X509<'ctx> { _ => { let act_len = act_len as uint; match len.cmp(&act_len) { - Greater => None, - Equal => Some(v), - Less => panic!("Fingerprint buffer was corrupted!") + Ordering::Greater => None, + Ordering::Equal => Some(v), + Ordering::Less => panic!("Fingerprint buffer was corrupted!") } } } @@ -432,7 +434,7 @@ pub struct X509Name<'x> { macro_rules! make_validation_error( ($ok_val:ident, $($name:ident = $val:ident,)+) => ( - #[deriving(Copy)] + #[derive(Copy)] pub enum X509ValidationError { $($name,)+ X509UnknownError(c_int) |