aboutsummaryrefslogtreecommitdiff
path: root/openssl/src/ssl/bio.rs
diff options
context:
space:
mode:
authorSteven Fackler <[email protected]>2016-10-17 09:14:33 -0700
committerGitHub <[email protected]>2016-10-17 09:14:33 -0700
commitf6bf022cf214869fc5a4be80617759fe7ee89d8f (patch)
tree0a13df9c28a0a967ba7477979c2c0883aa6ef456 /openssl/src/ssl/bio.rs
parentMerge pull request #475 from sfackler/no-enums (diff)
parentFix missing import (diff)
downloadrust-openssl-f6bf022cf214869fc5a4be80617759fe7ee89d8f.tar.xz
rust-openssl-f6bf022cf214869fc5a4be80617759fe7ee89d8f.zip
Merge pull request #476 from sfackler/error-handling
Overhaul error handling plus random APIs
Diffstat (limited to 'openssl/src/ssl/bio.rs')
-rw-r--r--openssl/src/ssl/bio.rs3
1 files changed, 2 insertions, 1 deletions
diff --git a/openssl/src/ssl/bio.rs b/openssl/src/ssl/bio.rs
index ccf3a472..968aad10 100644
--- a/openssl/src/ssl/bio.rs
+++ b/openssl/src/ssl/bio.rs
@@ -9,6 +9,7 @@ use std::ptr;
use std::slice;
use std::sync::Arc;
+use cvt_p;
use error::ErrorStack;
pub struct StreamState<S> {
@@ -38,7 +39,7 @@ pub fn new<S: Read + Write>(stream: S) -> Result<(*mut BIO, Arc<BioMethod>), Err
});
unsafe {
- let bio = try_ssl_null!(BIO_new(method.0.get()));
+ let bio = try!(cvt_p(BIO_new(method.0.get())));
compat::BIO_set_data(bio, Box::into_raw(state) as *mut _);
compat::BIO_set_init(bio, 1);