diff options
| author | Steven Fackler <[email protected]> | 2016-11-03 21:15:47 -0700 |
|---|---|---|
| committer | Steven Fackler <[email protected]> | 2016-11-03 22:45:54 -0700 |
| commit | 6fe7dd3024e5c62fa12c2c3abd30af5c0235bba6 (patch) | |
| tree | e0e72cbad6be16f4269d014d5561761c7f8facc2 /openssl/src/x509 | |
| parent | Clean up some bignum APIs (diff) | |
| download | rust-openssl-6fe7dd3024e5c62fa12c2c3abd30af5c0235bba6.tar.xz rust-openssl-6fe7dd3024e5c62fa12c2c3abd30af5c0235bba6.zip | |
Remove an enum
Diffstat (limited to 'openssl/src/x509')
| -rw-r--r-- | openssl/src/x509/mod.rs | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/openssl/src/x509/mod.rs b/openssl/src/x509/mod.rs index 02bdcb01..bffb193c 100644 --- a/openssl/src/x509/mod.rs +++ b/openssl/src/x509/mod.rs @@ -39,14 +39,18 @@ pub mod extension; #[cfg(test)] mod tests; -#[derive(Copy, Clone)] -#[repr(i32)] -pub enum X509FileType { - PEM = ffi::X509_FILETYPE_PEM, - ASN1 = ffi::X509_FILETYPE_ASN1, - Default = ffi::X509_FILETYPE_DEFAULT, +pub struct X509FileType(c_int); + +impl X509FileType { + pub fn as_raw(&self) -> c_int { + self.0 + } } +pub const X509_FILETYPE_PEM: X509FileType = X509FileType(ffi::X509_FILETYPE_PEM); +pub const X509_FILETYPE_ASN1: X509FileType = X509FileType(ffi::X509_FILETYPE_ASN1); +pub const X509_FILETYPE_DEFAULT: X509FileType = X509FileType(ffi::X509_FILETYPE_DEFAULT); + type_!(X509StoreContext, ffi::X509_STORE_CTX, ffi::X509_STORE_CTX_free); impl Ref<X509StoreContext> { |