diff options
| author | Steven Fackler <[email protected]> | 2016-11-13 15:02:38 +0000 |
|---|---|---|
| committer | Steven Fackler <[email protected]> | 2016-11-13 15:02:38 +0000 |
| commit | 08e0c4ca9061c3dc0c951db0c08909689b04a310 (patch) | |
| tree | 117d95bb3cc28cf88cdedb97c985bbe9db436415 /openssl/src/lib.rs | |
| parent | No need to use a raw string anymore (diff) | |
| download | rust-openssl-08e0c4ca9061c3dc0c951db0c08909689b04a310.tar.xz rust-openssl-08e0c4ca9061c3dc0c951db0c08909689b04a310.zip | |
Some serialization support for EcKey
Diffstat (limited to 'openssl/src/lib.rs')
| -rw-r--r-- | openssl/src/lib.rs | 42 |
1 files changed, 2 insertions, 40 deletions
diff --git a/openssl/src/lib.rs b/openssl/src/lib.rs index d3f99de7..c2c559dc 100644 --- a/openssl/src/lib.rs +++ b/openssl/src/lib.rs @@ -19,46 +19,8 @@ use libc::c_int; use error::ErrorStack; -macro_rules! type_ { - ($n:ident, $r:ident, $c:path, $d:path) => { - pub struct $n(*mut $c); - - impl ::types::OpenSslType for $n { - type CType = $c; - type Ref = $r; - - unsafe fn from_ptr(ptr: *mut $c) -> $n { - $n(ptr) - } - } - - impl Drop for $n { - fn drop(&mut self) { - unsafe { $d(self.0) } - } - } - - impl ::std::ops::Deref for $n { - type Target = $r; - - fn deref(&self) -> &$r { - unsafe { ::types::OpenSslTypeRef::from_ptr(self.0) } - } - } - - impl ::std::ops::DerefMut for $n { - fn deref_mut(&mut self) -> &mut $r { - unsafe { ::types::OpenSslTypeRef::from_ptr_mut(self.0) } - } - } - - pub struct $r(::util::Opaque); - - impl ::types::OpenSslTypeRef for $r { - type CType = $c; - } - } -} +#[macro_use] +mod macros; mod bio; mod util; |