Struct openssl::ssl::Ssl
[−]
[src]
pub struct Ssl { // some fields omitted }
Methods
impl Ssl
fn new(ctx: &SslContext) -> Result<Ssl, SslError>
fn state_string(&self) -> &'static str
fn state_string_long(&self) -> &'static str
fn set_hostname(&self, hostname: &str) -> Result<(), SslError>
Sets the host name to be used with SNI (Server Name Indication).
fn peer_certificate(&self) -> Option<X509>
Returns the certificate of the peer, if present.
fn selected_npn_protocol(&self) -> Option<&[u8]>
Returns the protocol selected by performing Next Protocol Negotiation, if any.
The protocol's name is returned is an opaque sequence of bytes. It is up to the client to interpret it.
This method needs the npn
feature.
fn selected_alpn_protocol(&self) -> Option<&[u8]>
Returns the protocol selected by performing ALPN, if any.
The protocol's name is returned is an opaque sequence of bytes. It is up to the client to interpret it.
This method needs the alpn
feature.
fn pending(&self) -> usize
Returns the number of bytes remaining in the currently processed TLS record.
fn compression(&self) -> Option<String>
Returns the compression currently in use.
The result will be either None, indicating no compression is in use, or a string with the compression name.