diff options
| author | Steven Fackler <[email protected]> | 2015-03-30 23:09:15 -0700 |
|---|---|---|
| committer | Steven Fackler <[email protected]> | 2015-03-30 23:09:15 -0700 |
| commit | 121a667f9b94e50828da387f3d97d6de144be856 (patch) | |
| tree | 5883aad20df7756fb16f233927e5563b9fa65686 /openssl/src/x509 | |
| parent | Remove unsafe_destructor (diff) | |
| download | rust-openssl-121a667f9b94e50828da387f3d97d6de144be856.tar.xz rust-openssl-121a667f9b94e50828da387f3d97d6de144be856.zip | |
Remove a bunch of use of core feature
Diffstat (limited to 'openssl/src/x509')
| -rw-r--r-- | openssl/src/x509/mod.rs | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/openssl/src/x509/mod.rs b/openssl/src/x509/mod.rs index fd5b4200..bce9485e 100644 --- a/openssl/src/x509/mod.rs +++ b/openssl/src/x509/mod.rs @@ -1,11 +1,10 @@ -use libc::{c_char, c_int, c_long, c_uint}; +use libc::{c_char, c_int, c_long, c_ulong, c_uint}; use std::io; use std::io::prelude::*; use std::cmp::Ordering; use std::ffi::CString; use std::iter::repeat; use std::mem; -use std::num::SignedInt; use std::ptr; use asn1::{Asn1Time}; @@ -287,8 +286,8 @@ impl X509Generator { // While OpenSSL is actually OK to have negative serials // other libraries (for example, Go crypto) can drop - // such certificates as invalid - res.abs() + // such certificates as invalid, so we clear the high bit + ((res as c_ulong) >> 1) as c_long } /// Generates a private key and a signed certificate and returns them |