diff options
| author | Steven Fackler <[email protected]> | 2014-09-19 15:32:55 -0700 |
|---|---|---|
| committer | Steven Fackler <[email protected]> | 2014-09-19 15:32:55 -0700 |
| commit | efa1a719f5b9fc749c7a6fc37bed8a3a011b8e11 (patch) | |
| tree | 977e5d066c22e1fffb9776dad2bdce85fc5523d5 /src/ssl/ffi.rs | |
| parent | Merge pull request #48 from ebfe/rfc-52 (diff) | |
| parent | Fixed documentation string (diff) | |
| download | rust-openssl-efa1a719f5b9fc749c7a6fc37bed8a3a011b8e11.tar.xz rust-openssl-efa1a719f5b9fc749c7a6fc37bed8a3a011b8e11.zip | |
Merge pull request #47 from vhbit/cert-key-auth
Allow to set cert/key pair
Diffstat (limited to 'src/ssl/ffi.rs')
| -rwxr-xr-x[-rw-r--r--] | src/ssl/ffi.rs | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/ssl/ffi.rs b/src/ssl/ffi.rs index cfb75a21..d1a971c8 100644..100755 --- a/src/ssl/ffi.rs +++ b/src/ssl/ffi.rs @@ -98,6 +98,10 @@ pub static X509_V_ERR_UNSUPPORTED_NAME_SYNTAX: c_int = 53; pub static X509_V_ERR_CRL_PATH_VALIDATION_ERROR: c_int = 54; pub static X509_V_ERR_APPLICATION_VERIFICATION: c_int = 50; +pub static X509_FILETYPE_PEM: c_int = 1; +pub static X509_FILETYPE_ASN1: c_int = 2; +pub static X509_FILETYPE_DEFAULT: c_int = 3; + #[link(name="ssl")] #[link(name="crypto")] extern "C" { @@ -132,6 +136,9 @@ extern "C" { -> c_int; pub fn SSL_CTX_get_ex_data(ctx: *mut SSL_CTX, idx: c_int) -> *mut c_void; + pub fn SSL_CTX_use_certificate_file(ctx: *mut SSL_CTX, cert_file: *const c_char, file_type: c_int) -> c_int; + pub fn SSL_CTX_use_PrivateKey_file(ctx: *mut SSL_CTX, key_file: *const c_char, file_type: c_int) -> c_int; + pub fn X509_STORE_CTX_get_ex_data(ctx: *mut X509_STORE_CTX, idx: c_int) -> *mut c_void; pub fn X509_STORE_CTX_get_current_cert(ct: *mut X509_STORE_CTX) -> *mut X509; |