pub struct SslMethod { /* private fields */ }Expand description
A type specifying the kind of protocol an SslContext will speak.
Implementations§
Source§impl SslMethod
impl SslMethod
Sourcepub fn tls() -> SslMethod
pub fn tls() -> SslMethod
Support all versions of the TLS protocol.
This corresponds to TLS_method.
Sourcepub unsafe fn tls_with_buffer() -> Self
pub unsafe fn tls_with_buffer() -> Self
Same as tls, but doesn’t create X.509 for certificates.
§Safety
BoringSSL will crash if the user calls a function that involves X.509 certificates with an object configured with this method. You most probably don’t need it.
Sourcepub fn dtls() -> Self
pub fn dtls() -> Self
Support all versions of the DTLS protocol.
This corresponds to DTLS_method.
Sourcepub fn tls_client() -> SslMethod
pub fn tls_client() -> SslMethod
Support all versions of the TLS protocol, explicitly as a client.
This corresponds to TLS_client_method.
Sourcepub fn tls_server() -> SslMethod
pub fn tls_server() -> SslMethod
Support all versions of the TLS protocol, explicitly as a server.
This corresponds to TLS_server_method.
Sourcepub unsafe fn from_ptr(ptr: *const SSL_METHOD) -> SslMethod
pub unsafe fn from_ptr(ptr: *const SSL_METHOD) -> SslMethod
Constructs an SslMethod from a pointer to the underlying OpenSSL value.
This method assumes that the SslMethod is not configured for X.509
certificates. The user can call SslMethod::assume_x509_method
to change that.
§Safety
The caller must ensure the pointer is valid.
This corresponds to TLS_server_method.
Sourcepub unsafe fn assume_x509(&mut self)
pub unsafe fn assume_x509(&mut self)
Assumes that this SslMethod is configured for X.509 certificates.
§Safety
BoringSSL will crash if the user calls a function that involves X.509 certificates with an object configured with this method. You most probably don’t need it.
Sourcepub fn as_ptr(&self) -> *const SSL_METHOD
pub fn as_ptr(&self) -> *const SSL_METHOD
Returns a pointer to the underlying OpenSSL value.