Struct openssl::ssl::SslOptions []

pub struct SslOptions { /* fields omitted */ }

Options controlling the behavior of an SslContext.

Methods

impl SslOptions

DONT_INSERT_EMPTY_FRAGMENTS: SslOptions = SslOptions{bits: ffi::SSL_OP_DONT_INSERT_EMPTY_FRAGMENTS,}

Disables a countermeasure against an SSLv3/TLSv1.0 vulnerability affecting CBC ciphers.

ALL: SslOptions = SslOptions{bits: ffi::SSL_OP_ALL,}

A "reasonable default" set of options which enables compatibility flags.

NO_QUERY_MTU: SslOptions = SslOptions{bits: ffi::SSL_OP_NO_QUERY_MTU,}

Do not query the MTU.

Only affects DTLS connections.

COOKIE_EXCHANGE: SslOptions = SslOptions{bits: ffi::SSL_OP_COOKIE_EXCHANGE,}

Enables Cookie Exchange as described in RFC 4347 Section 4.2.1.

Only affects DTLS connections.

NO_TICKET: SslOptions = SslOptions{bits: ffi::SSL_OP_NO_TICKET,}

Disables the use of session tickets for session resumption.

NO_SESSION_RESUMPTION_ON_RENEGOTIATION: SslOptions = SslOptions{bits: ffi::SSL_OP_NO_SESSION_RESUMPTION_ON_RENEGOTIATION,}

Always start a new session when performing a renegotiation on the server side.

NO_COMPRESSION: SslOptions = SslOptions{bits: ffi::SSL_OP_NO_COMPRESSION,}

Disables the use of TLS compression.

ALLOW_UNSAFE_LEGACY_RENEGOTIATION: SslOptions = SslOptions{bits: ffi::SSL_OP_ALLOW_UNSAFE_LEGACY_RENEGOTIATION,}

Allow legacy insecure renegotiation with servers or clients that do not support secure renegotiation.

SINGLE_ECDH_USE: SslOptions = SslOptions{bits: ffi::SSL_OP_SINGLE_ECDH_USE,}

Creates a new key for each session when using ECDHE.

This is always enabled in OpenSSL 1.1.0.

SINGLE_DH_USE: SslOptions = SslOptions{bits: ffi::SSL_OP_SINGLE_DH_USE,}

Creates a new key for each session when using DHE.

This is always enabled in OpenSSL 1.1.0.

CIPHER_SERVER_PREFERENCE: SslOptions = SslOptions{bits: ffi::SSL_OP_CIPHER_SERVER_PREFERENCE,}

Use the server's preferences rather than the client's when selecting a cipher.

This has no effect on the client side.

TLS_ROLLBACK_BUG: SslOptions = SslOptions{bits: ffi::SSL_OP_TLS_ROLLBACK_BUG,}

Disables version rollback attach detection.

NO_SSLV2: SslOptions = SslOptions{bits: ffi::SSL_OP_NO_SSLv2,}

Disables the use of SSLv2.

NO_SSLV3: SslOptions = SslOptions{bits: ffi::SSL_OP_NO_SSLv3,}

Disables the use of SSLv3.

NO_TLSV1: SslOptions = SslOptions{bits: ffi::SSL_OP_NO_TLSv1,}

Disables the use of TLSv1.0.

NO_TLSV1_1: SslOptions = SslOptions{bits: ffi::SSL_OP_NO_TLSv1_1,}

Disables the use of TLSv1.1.

NO_TLSV1_2: SslOptions = SslOptions{bits: ffi::SSL_OP_NO_TLSv1_2,}

Disables the use of TLSv1.2.

NO_DTLSV1: SslOptions = SslOptions{bits: ffi::SSL_OP_NO_DTLSv1,}

Disables the use of DTLSv1.0

Requires OpenSSL 1.0.2, 1.1.0, or 1.1.1 and the corresponding Cargo feature.

NO_DTLSV1_2: SslOptions = SslOptions{bits: ffi::SSL_OP_NO_DTLSv1_2,}

Disables the use of DTLSv1.2. Requires OpenSSL 1.0.2, 1.1.0, or 1.1.1 and the corresponding Cargo feature.

NO_SSL_MASK: SslOptions = SslOptions{bits: ffi::SSL_OP_NO_SSL_MASK,}

Disables the use of all (D)TLS protocol versions.

This can be used as a mask when whitelisting protocol versions.

Requires OpenSSL 1.0.2, 1.1.0, or 1.1.1 and the corresponding Cargo feature.

Examples

Only support TLSv1.2:

use openssl::ssl::SslOptions;

let options = SslOptions::NO_SSL_MASK & !SslOptions::NO_TLSV1_2;

Returns an empty set of flags.

Returns the set containing all flags.

Returns the raw value of the flags currently stored.

Convert from underlying bit representation, unless that representation contains bits that do not correspond to a flag.

Convert from underlying bit representation, dropping any bits that do not correspond to flags.

Returns true if no flags are currently stored.

Returns true if all flags are currently set.

Returns true if there are flags common to both self and other.

Returns true all of the flags in other are contained within self.

Inserts the specified flags in-place.

Removes the specified flags in-place.

Toggles the specified flags in-place.

Inserts or removes the specified flags depending on the passed value.

Trait Implementations

impl Copy for SslOptions

impl PartialEq for SslOptions

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

impl Eq for SslOptions

impl Clone for SslOptions

Returns a copy of the value. Read more

1.0.0
[src]

Performs copy-assignment from source. Read more

impl PartialOrd for SslOptions

This method returns an ordering between self and other values if one exists. Read more

This method tests less than (for self and other) and is used by the < operator. Read more

This method tests less than or equal to (for self and other) and is used by the <= operator. Read more

This method tests greater than (for self and other) and is used by the > operator. Read more

This method tests greater than or equal to (for self and other) and is used by the >= operator. Read more

impl Ord for SslOptions

This method returns an Ordering between self and other. Read more

1.22.0
[src]

Compares and returns the maximum of two values. Read more

1.22.0
[src]

Compares and returns the minimum of two values. Read more

impl Hash for SslOptions

Feeds this value into the given [Hasher]. Read more

1.3.0
[src]

Feeds a slice of this type into the given [Hasher]. Read more

impl Debug for SslOptions

Formats the value using the given formatter.

impl Binary for SslOptions

Formats the value using the given formatter.

impl Octal for SslOptions

Formats the value using the given formatter.

impl LowerHex for SslOptions

Formats the value using the given formatter.

impl UpperHex for SslOptions

Formats the value using the given formatter.

impl BitOr for SslOptions

The resulting type after applying the | operator.

Returns the union of the two sets of flags.

impl BitOrAssign for SslOptions

Adds the set of flags.

impl BitXor for SslOptions

The resulting type after applying the ^ operator.

Returns the left flags, but with all the right flags toggled.

impl BitXorAssign for SslOptions

Toggles the set of flags.

impl BitAnd for SslOptions

The resulting type after applying the & operator.

Returns the intersection between the two sets of flags.

impl BitAndAssign for SslOptions

Disables all flags disabled in the set.

impl Sub for SslOptions

The resulting type after applying the - operator.

Returns the set difference of the two sets of flags.

impl SubAssign for SslOptions

Disables all flags enabled in the set.

impl Not for SslOptions

The resulting type after applying the ! operator.

Returns the complement of this set of flags.

impl Extend<SslOptions> for SslOptions

Extends a collection with the contents of an iterator. Read more

impl FromIterator<SslOptions> for SslOptions

Creates a value from an iterator. Read more