From 5d9eaf53daf5049569d8b3db8b4210a45c619499 Mon Sep 17 00:00:00 2001 From: Joseph Glanville Date: Tue, 12 May 2015 01:42:40 +1000 Subject: [PATCH] Add accessor for peer_certificate --- openssl/src/ssl/mod.rs | 5 +++++ 1 file changed, 5 insertions(+) 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