diff --git a/openssl/src/ssl/mod.rs b/openssl/src/ssl/mod.rs index 17228793..98611064 100644 --- a/openssl/src/ssl/mod.rs +++ b/openssl/src/ssl/mod.rs @@ -822,6 +822,11 @@ impl SslStream { &self.stream } + /// Return the certificate of the peer + pub fn get_peer_certificate(&self) -> Option { + self.ssl.get_peer_certificate() + } + /// Returns a mutable reference to the underlying stream. /// /// ## Warning