aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSteven Fackler <[email protected]>2018-07-19 20:22:57 -0700
committerSteven Fackler <[email protected]>2018-07-19 20:22:57 -0700
commitee5215bd31a720cb7bb9abf760e22ff2f514a5b2 (patch)
tree5874c4a9d4f72916293580b986618ee1787229de
parentMerge pull request #959 from jabedude/master (diff)
downloadrust-openssl-ee5215bd31a720cb7bb9abf760e22ff2f514a5b2.tar.xz
rust-openssl-ee5215bd31a720cb7bb9abf760e22ff2f514a5b2.zip
SslSessionRef methods return static strings
Closes #961
-rw-r--r--openssl/src/ssl/mod.rs9
1 files changed, 6 insertions, 3 deletions
diff --git a/openssl/src/ssl/mod.rs b/openssl/src/ssl/mod.rs
index 1feb3ca6..666a97bb 100644
--- a/openssl/src/ssl/mod.rs
+++ b/openssl/src/ssl/mod.rs
@@ -1265,7 +1265,10 @@ impl SslContextBuilder {
}
}
- #[deprecated(since = "0.10.10", note = "renamed to `set_psk_client_callback`")]
+ #[deprecated(
+ since = "0.10.10",
+ note = "renamed to `set_psk_client_callback`"
+ )]
#[cfg(not(osslconf = "OPENSSL_NO_PSK"))]
pub fn set_psk_callback<F>(&mut self, callback: F)
where
@@ -1792,7 +1795,7 @@ impl SslCipherRef {
/// This corresponds to [`SSL_CIPHER_get_name`].
///
/// [`SSL_CIPHER_get_name`]: https://www.openssl.org/docs/manmaster/man3/SSL_CIPHER_get_name.html
- pub fn name(&self) -> &str {
+ pub fn name(&self) -> &'static str {
let name = unsafe {
let ptr = ffi::SSL_CIPHER_get_name(self.as_ptr());
CStr::from_ptr(ptr as *const _)
@@ -1806,7 +1809,7 @@ impl SslCipherRef {
/// This corresponds to [`SSL_CIPHER_get_version`].
///
/// [`SSL_CIPHER_get_version`]: https://www.openssl.org/docs/manmaster/man3/SSL_CIPHER_get_name.html
- pub fn version(&self) -> &str {
+ pub fn version(&self) -> &'static str {
let version = unsafe {
let ptr = ffi::SSL_CIPHER_get_version(self.as_ptr());
CStr::from_ptr(ptr as *const _)