aboutsummaryrefslogtreecommitdiff
path: root/openssl/src
diff options
context:
space:
mode:
authorMs2ger <[email protected]>2016-03-18 15:44:47 +0100
committerMs2ger <[email protected]>2016-03-18 15:44:47 +0100
commit6d043b3700676246b46a3df7f791695b9abc169d (patch)
treefb6d73f89d3bdb49cd1d56c7af2148b0eb877d5d /openssl/src
parentClean up BIO name (diff)
downloadrust-openssl-6d043b3700676246b46a3df7f791695b9abc169d.tar.xz
rust-openssl-6d043b3700676246b46a3df7f791695b9abc169d.zip
Allow Rust to infer the type of the argument to SSL_CIPHER_description.
This allows the code to compile on Android, where an unsigned char is expected.
Diffstat (limited to 'openssl/src')
-rw-r--r--openssl/src/ssl/mod.rs4
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()