diff options
| author | Valerii Hiora <[email protected]> | 2014-10-01 20:19:29 +0300 |
|---|---|---|
| committer | Valerii Hiora <[email protected]> | 2014-10-06 07:12:54 +0300 |
| commit | 72ee42adba18adbb0e6eefd13faab5e6d610fdcd (patch) | |
| tree | 2ce3241b11f7a6f53fa9127e8a1e8085a4d1f6e8 /src/ffi.rs | |
| parent | Ignore stderr from openssl s_server (diff) | |
| download | rust-openssl-72ee42adba18adbb0e6eefd13faab5e6d610fdcd.tar.xz rust-openssl-72ee42adba18adbb0e6eefd13faab5e6d610fdcd.zip | |
Better error handling in cert generation
Now it should correctly free all resources in case
of failure.
Diffstat (limited to 'src/ffi.rs')
| -rw-r--r-- | src/ffi.rs | 2 |
1 files changed, 2 insertions, 0 deletions
@@ -192,6 +192,7 @@ pub unsafe fn BN_is_zero(a: *mut BIGNUM) -> c_int { bn_is_zero(a) } extern "C" { pub fn ASN1_INTEGER_set(dest: *mut ASN1_INTEGER, value: c_long) -> c_int; pub fn ASN1_STRING_type_new(ty: c_int) -> *mut ASN1_STRING; + pub fn ASN1_TIME_free(tm: *mut ASN1_TIME); pub fn BIO_free_all(a: *mut BIO); pub fn BIO_new(type_: *const BIO_METHOD) -> *mut BIO; @@ -402,6 +403,7 @@ extern "C" { pub fn X509_add_ext(x: *mut X509, ext: *mut X509_EXTENSION, loc: c_int) -> c_int; pub fn X509_digest(x: *mut X509, digest: *const EVP_MD, buf: *mut c_char, len: *mut c_uint) -> c_int; + pub fn X509_free(x: *mut X509); pub fn X509_get_serialNumber(x: *mut X509) -> *mut ASN1_INTEGER; pub fn X509_get_subject_name(x: *mut X509) -> *mut X509_NAME; pub fn X509_gmtime_adj(time: *mut ASN1_TIME, adj: c_long) -> *mut ASN1_TIME; |