summaryrefslogtreecommitdiff
path: root/openssl/src/dh.rs
diff options
context:
space:
mode:
authorSteven Fackler <sfackler@gmail.com>2017-02-03 01:24:05 -0800
committerSteven Fackler <sfackler@gmail.com>2017-02-03 23:03:35 -0800
commit12ae31ad476d373ce93b4222d3875b9663f3da17 (patch)
tree6c3e0f158d3cf63e5ae8229126e3430847398ad3 /openssl/src/dh.rs
parent3ee2f4c64f4d1ca10c024ce9ee7ba0c66817d3eb (diff)
downloadrust-openssl-12ae31ad476d373ce93b4222d3875b9663f3da17.zip
Switch to foreign_types
Diffstat (limited to 'openssl/src/dh.rs')
-rw-r--r--openssl/src/dh.rs11
1 files changed, 9 insertions, 2 deletions
diff --git a/openssl/src/dh.rs b/openssl/src/dh.rs
index 64494f95..a7454150 100644
--- a/openssl/src/dh.rs
+++ b/openssl/src/dh.rs
@@ -1,13 +1,20 @@
use error::ErrorStack;
use ffi;
+use foreign_types::ForeignTypeRef;
use std::mem;
use std::ptr;
use {cvt, cvt_p, init};
use bn::BigNum;
-use types::OpenSslTypeRef;
-type_!(Dh, DhRef, ffi::DH, ffi::DH_free);
+foreign_type! {
+ type CType = ffi::DH;
+ fn drop = ffi::DH_free;
+
+ pub struct Dh;
+
+ pub struct DhRef;
+}
impl DhRef {
to_pem!(ffi::PEM_write_bio_DHparams);