aboutsummaryrefslogtreecommitdiff
path: root/openssl/src/ssl
diff options
context:
space:
mode:
authorSteven Fackler <[email protected]>2018-02-24 20:58:07 -0800
committerGitHub <[email protected]>2018-02-24 20:58:07 -0800
commitcebfbd9a25afb69ecd644b82cf5155557f654953 (patch)
treecfe369de845465105658b4f39cd49017955af85c /openssl/src/ssl
parentMerge pull request #849 from sfackler/key-export (diff)
parentAdd the ability to push errors back onto the error stack. (diff)
downloadrust-openssl-cebfbd9a25afb69ecd644b82cf5155557f654953.tar.xz
rust-openssl-cebfbd9a25afb69ecd644b82cf5155557f654953.zip
Merge pull request #850 from sfackler/put-error
Add the ability to push errors back onto the error stack.
Diffstat (limited to 'openssl/src/ssl')
-rw-r--r--openssl/src/ssl/callbacks.rs24
1 files changed, 12 insertions, 12 deletions
diff --git a/openssl/src/ssl/callbacks.rs b/openssl/src/ssl/callbacks.rs
index 2fc43ac0..c06d32a0 100644
--- a/openssl/src/ssl/callbacks.rs
+++ b/openssl/src/ssl/callbacks.rs
@@ -162,8 +162,8 @@ where
mem::forget(dh);
ptr
}
- Err(_) => {
- // FIXME reset error stack
+ Err(e) => {
+ e.put();
ptr::null_mut()
}
}
@@ -189,8 +189,8 @@ where
mem::forget(ec_key);
ptr
}
- Err(_) => {
- // FIXME reset error stack
+ Err(e) => {
+ e.put();
ptr::null_mut()
}
}
@@ -214,8 +214,8 @@ where
mem::forget(dh);
ptr
}
- Err(_) => {
- // FIXME reset error stack
+ Err(e) => {
+ e.put();
ptr::null_mut()
}
}
@@ -240,8 +240,8 @@ where
mem::forget(ec_key);
ptr
}
- Err(_) => {
- // FIXME reset error stack
+ Err(e) => {
+ e.put();
ptr::null_mut()
}
}
@@ -262,8 +262,8 @@ where
match ret {
Ok(true) => ffi::SSL_TLSEXT_ERR_OK,
Ok(false) => ffi::SSL_TLSEXT_ERR_NOACK,
- Err(_) => {
- // FIXME reset error stack
+ Err(e) => {
+ e.put();
ffi::SSL_TLSEXT_ERR_ALERT_FATAL
}
}
@@ -271,8 +271,8 @@ where
match ret {
Ok(true) => 1,
Ok(false) => 0,
- Err(_) => {
- // FIXME reset error stack
+ Err(e) => {
+ e.put();
-1
}
}