diff options
| author | Steven Fackler <[email protected]> | 2016-03-18 08:47:18 -0700 |
|---|---|---|
| committer | Steven Fackler <[email protected]> | 2016-03-18 08:47:18 -0700 |
| commit | 596147f952d44afca8ffd02f42b18f64ac862bba (patch) | |
| tree | fb6d73f89d3bdb49cd1d56c7af2148b0eb877d5d | |
| parent | Clean up BIO name (diff) | |
| parent | Allow Rust to infer the type of the argument to SSL_CIPHER_description. (diff) | |
| download | rust-openssl-596147f952d44afca8ffd02f42b18f64ac862bba.tar.xz rust-openssl-596147f952d44afca8ffd02f42b18f64ac862bba.zip | |
Merge pull request #361 from servo/ptr
Allow Rust to infer the type of the argument to SSL_CIPHER_description.
| -rw-r--r-- | openssl/src/ssl/mod.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/openssl/src/ssl/mod.rs b/openssl/src/ssl/mod.rs index 574a324b..38527dc6 100644 --- a/openssl/src/ssl/mod.rs +++ b/openssl/src/ssl/mod.rs @@ -823,8 +823,8 @@ impl <'a> SslCipher<'a> { pub fn description(&self) -> Option<String> { unsafe { // SSL_CIPHER_description requires a buffer of at least 128 bytes. - let mut buf = [0i8; 128]; - let desc_ptr = ffi::SSL_CIPHER_description(self.cipher, &mut buf[0], 128); + let mut buf = [0; 128]; + let desc_ptr = ffi::SSL_CIPHER_description(self.cipher, buf.as_mut_ptr(), 128); if !desc_ptr.is_null() { String::from_utf8(CStr::from_ptr(desc_ptr).to_bytes().to_vec()).ok() |