Commit 91f8c542 authored by Steven Fackler's avatar Steven Fackler
Browse files

Replace SslStream implementation!

parent 8f568970
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -47,6 +47,8 @@ pub type bio_info_cb = Option<unsafe extern "C" fn(*mut BIO,
                                                   c_long)>;

#[repr(C)]
#[derive(Copy, Clone)]
#[allow(raw_pointer_derive)]
pub struct BIO_METHOD {
    pub type_: c_int,
    pub name: *const c_char,
+4 −0
Original line number Diff line number Diff line
@@ -8,6 +8,7 @@ repository = "https://github.com/sfackler/rust-openssl"
documentation = "https://sfackler.github.io/rust-openssl/doc/v0.7.1/openssl"
readme = "../README.md"
keywords = ["crypto", "tls", "ssl", "dtls"]
build = "build.rs"

[features]
tlsv1_2 = ["openssl-sys/tlsv1_2"]
@@ -30,6 +31,9 @@ libc = "0.2"
openssl-sys = { version = "0.7.1", path = "../openssl-sys" }
openssl-sys-extras = { version = "0.7.1", path = "../openssl-sys-extras" }

[build-dependencies]
gcc = "0.3"

[dev-dependencies]
rustc-serialize = "0.3"
net2 = "0.2.16"

openssl/build.rs

0 → 100644
+16 −0
Original line number Diff line number Diff line
extern crate gcc;

use std::env;
use std::path::PathBuf;

fn main() {
    let mut config = gcc::Config::new();

    if let Some(paths) = env::var_os("DEP_OPENSSL_INCLUDE") {
        for path in env::split_paths(&paths) {
            config.include(PathBuf::from(path));
        }
    }

    config.file("src/c_helpers.c").compile("libc_helpers.a");
}
+5 −0
Original line number Diff line number Diff line
#include <openssl/ssl.h>

void rust_SSL_clone(SSL *ssl) {
    CRYPTO_add(&ssl->references, 1, CRYPTO_LOCK_SSL);
}
+113 −512

File changed.

Preview size limit exceeded, changes collapsed.

Loading