Add SslMethod::from_ptr

This commit is contained in:
Steven Fackler 2016-10-26 20:43:43 -07:00
parent aaf41e19fa
commit ebc4c56c34
1 changed files with 4 additions and 0 deletions

View File

@ -100,6 +100,10 @@ impl SslMethod {
SslMethod(compat::dtls_method()) SslMethod(compat::dtls_method())
} }
pub unsafe fn from_ptr(ptr: *const ffi::SSL_METHOD) -> SslMethod {
SslMethod(ptr)
}
pub fn as_ptr(&self) -> *const ffi::SSL_METHOD { pub fn as_ptr(&self) -> *const ffi::SSL_METHOD {
self.0 self.0
} }