aboutsummaryrefslogtreecommitdiff
path: root/openssl/src
diff options
context:
space:
mode:
authorSteven Fackler <[email protected]>2016-11-06 11:57:50 -0800
committerSteven Fackler <[email protected]>2016-11-06 11:57:50 -0800
commita4e0581e4fabc2a038209176242213e4ed48125e (patch)
tree1fc252ed4e0df9e284208ee4aa6ebbe94f996149 /openssl/src
parentAdd accessors for cert and private key (diff)
downloadrust-openssl-a4e0581e4fabc2a038209176242213e4ed48125e.tar.xz
rust-openssl-a4e0581e4fabc2a038209176242213e4ed48125e.zip
Fix build on 1.0.1
Diffstat (limited to 'openssl/src')
-rw-r--r--openssl/src/ssl/mod.rs6
1 files changed, 6 insertions, 0 deletions
diff --git a/openssl/src/ssl/mod.rs b/openssl/src/ssl/mod.rs
index 16bc386b..5c41f6ea 100644
--- a/openssl/src/ssl/mod.rs
+++ b/openssl/src/ssl/mod.rs
@@ -764,6 +764,9 @@ impl SslContext {
impl SslContextRef {
/// Returns the certificate associated with this `SslContext`, if present.
+ ///
+ /// Requires the `v102` or `v110` features and OpenSSL 1.0.2 or OpenSSL 1.1.0.
+ #[cfg(any(all(feature = "v102", ossl102), all(feature = "v110", ossl110)))]
pub fn certificate(&self) -> Option<&X509Ref> {
unsafe {
let ptr = ffi::SSL_CTX_get0_certificate(self.as_ptr());
@@ -776,6 +779,9 @@ impl SslContextRef {
}
/// Returns the private key associated with this `SslContext`, if present.
+ ///
+ /// Requires the `v102` or `v110` features and OpenSSL 1.0.2 or OpenSSL 1.1.0.
+ #[cfg(any(all(feature = "v102", ossl102), all(feature = "v110", ossl110)))]
pub fn private_key(&self) -> Option<&PKeyRef> {
unsafe {
let ptr = ffi::SSL_CTX_get0_privatekey(self.as_ptr());