Add accessor for peer_certificate

This commit is contained in:
Joseph Glanville 2015-05-12 01:42:40 +10:00 committed by Joseph Glanville
parent d723481f77
commit 5d9eaf53da
1 changed files with 5 additions and 0 deletions

View File

@ -822,6 +822,11 @@ impl<S: Read+Write> SslStream<S> {
&self.stream &self.stream
} }
/// Return the certificate of the peer
pub fn get_peer_certificate(&self) -> Option<X509> {
self.ssl.get_peer_certificate()
}
/// Returns a mutable reference to the underlying stream. /// Returns a mutable reference to the underlying stream.
/// ///
/// ## Warning /// ## Warning