aboutsummaryrefslogtreecommitdiff
path: root/openssl-sys-extras/src
diff options
context:
space:
mode:
authorSteven Fackler <[email protected]>2015-12-09 22:02:02 -0800
committerSteven Fackler <[email protected]>2015-12-09 22:02:02 -0800
commit8f56897043f8138980ce3376765b769c764d8701 (patch)
treeacb10fdbf1dccbaa62c2e7024f54e8a38146d37f /openssl-sys-extras/src
parentIT LIVES (diff)
downloadrust-openssl-8f56897043f8138980ce3376765b769c764d8701.tar.xz
rust-openssl-8f56897043f8138980ce3376765b769c764d8701.zip
Implement read and write
Diffstat (limited to 'openssl-sys-extras/src')
-rw-r--r--openssl-sys-extras/src/lib.rs2
-rw-r--r--openssl-sys-extras/src/openssl_shim.c4
2 files changed, 6 insertions, 0 deletions
diff --git a/openssl-sys-extras/src/lib.rs b/openssl-sys-extras/src/lib.rs
index dfeb06e5..3c114726 100644
--- a/openssl-sys-extras/src/lib.rs
+++ b/openssl-sys-extras/src/lib.rs
@@ -55,6 +55,8 @@ extern {
pub fn BIO_set_retry_read(b: *mut BIO);
#[link_name = "BIO_set_retry_write_shim"]
pub fn BIO_set_retry_write(b: *mut BIO);
+ #[link_name = "BIO_flush"]
+ pub fn BIO_flush(b: *mut BIO) -> c_long;
pub fn SSL_CTX_set_options_shim(ctx: *mut SSL_CTX, options: c_long) -> c_long;
pub fn SSL_CTX_get_options_shim(ctx: *mut SSL_CTX) -> c_long;
pub fn SSL_CTX_clear_options_shim(ctx: *mut SSL_CTX, options: c_long) -> c_long;
diff --git a/openssl-sys-extras/src/openssl_shim.c b/openssl-sys-extras/src/openssl_shim.c
index 95847ac1..cc42fbf4 100644
--- a/openssl-sys-extras/src/openssl_shim.c
+++ b/openssl-sys-extras/src/openssl_shim.c
@@ -103,6 +103,10 @@ void BIO_set_retry_write_shim(BIO *b) {
BIO_set_retry_write(b);
}
+long BIO_flush_shim(BIO *b) {
+ return BIO_flush(b);
+}
+
long SSL_CTX_set_options_shim(SSL_CTX *ctx, long options) {
return SSL_CTX_set_options(ctx, options);
}