Struct openssl::ssl::SslRef []

pub struct SslRef(_);

Reference to an Ssl.

Methods

impl SslRef
[src]

[src]

Like SslContextBuilder::set_verify.

This corresponds to SSL_set_verify.

[src]

[src]

Like SslContextBuilder::set_tmp_dh.

This corresponds to SSL_set_tmp_dh.

[src]

[src]

Like SslContextBuilder::set_tmp_ecdh.

This corresponds to SSL_set_tmp_ecdh.

[src]

Returns the current cipher if the session is active.

This corresponds to SSL_get_current_cipher.

[src]

Returns a short string describing the state of the session.

This corresponds to SSL_state_string.

[src]

Returns a longer string describing the state of the session.

This corresponds to SSL_state_string_long.

[src]

Sets the host name to be sent to the server for Server Name Indication (SNI).

It has no effect for a server-side connection.

This corresponds to SSL_set_tlsext_host_name.

[src]

Returns the peer's certificate, if present.

This corresponds to SSL_get_peer_certificate.

[src]

Returns the certificate chain of the peer, if present.

On the client side, the chain includes the leaf certificate, but on the server side it does not. Fun!

This corresponds to SSL_get_peer_cert_chain.

[src]

Like SslContext::certificate.

This corresponds to SSL_get_certificate.

[src]

Like SslContext::private_key.

This corresponds to SSL_get_privatekey.

[src]

Returns a string describing the protocol version of the session.

This corresponds to SSL_get_version.

[src]

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 corresponds to SSL_get0_next_proto_negotiated.

[src]

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.

Requires the v102 or v110 features and OpenSSL 1.0.2 or OpenSSL 1.1.0.

This corresponds to SSL_get0_alpn_selected.

[src]

Returns the number of bytes remaining in the currently processed TLS record.

If this is greater than 0, the next call to read will not call down to the underlying stream.

This corresponds to [SSL_pending].

[src]

Returns the compression method currently in use.

This corresponds to SSL_get_current_compression.

[src]

Returns the servername sent by the client via Server Name Indication (SNI).

It is only useful on the server side.

This corresponds to SSL_get_servername.

[src]

Changes the context corresponding to the current connection.

It is most commonly used in the Server Name Indication (SNI) callback.

This corresponds to SSL_set_SSL_CTX.

[src]

Returns the context corresponding to the current connection.

This corresponds to SSL_get_SSL_CTX.

[src]

Returns a mutable reference to the X509 verification configuration.

Requires the v102 or v110 features and OpenSSL 1.0.2 or 1.1.0.

This corresponds to SSL_get0_param.

[src]

Returns the certificate verification result.

This corresponds to SSL_get_verify_result.

[src]

Returns a shared reference to the SSL session.

This corresponds to SSL_get_session.

[src]

Sets the session to be used.

This should be called before the handshake to attempt to reuse a previously established session. If the server is not willing to reuse the session, a new one will be transparently negotiated.

This corresponds to SSL_set_session.

Safety

The caller of this method is responsible for ensuring that the session is associated with the same SslContext as this Ssl.

[src]

Determines if the session provided to set_session was successfully reused.

This corresponds to SSL_session_reused.

[src]

Sets the status response a client wishes the server to reply with.

This corresponds to SSL_set_tlsext_status_type.

[src]

Returns the server's OCSP response, if present.

This corresponds to [SSL_get_tlsext_status_oscp_resp].

[src]

Sets the OCSP response to be returned to the client.

This corresponds to [SSL_set_tlsext_status_oscp_resp].

[src]

Determines if this Ssl is configured for server-side or client-side use.

This corresponds to SSL_is_server.

[src]

Sets the extra data at the specified index.

This can be used to provide data to callbacks registered with the context. Use the Ssl::new_ex_index method to create an Index.

This corresponds to SSL_set_ex_data.

[src]

Returns a reference to the extra data at the specified index.

This corresponds to SSL_get_ex_data.

Trait Implementations

impl ForeignTypeRef for SslRef

The raw C type.

[src]

Constructs a shared instance of this type from its raw type.

[src]

Constructs a mutable reference of this type from its raw type.

[src]

Returns a raw pointer to the wrapped value.

impl Debug for SslRef
[src]

[src]

Formats the value using the given formatter.