impl Opt { // Cast is safe here because SSLOptions are within the i32 range #[allow(clippy::cast_possible_wrap)] #[must_use] pubconstfn as_int(self) -> PRInt32 { let i = matchself { Self::Locking => SSLOption::SSL_NO_LOCKS, Self::Tickets => SSLOption::SSL_ENABLE_SESSION_TICKETS, Self::OcspStapling => SSLOption::SSL_ENABLE_OCSP_STAPLING, Self::Alpn => SSLOption::SSL_ENABLE_ALPN, Self::ExtendedMasterSecret => SSLOption::SSL_ENABLE_EXTENDED_MASTER_SECRET, Self::SignedCertificateTimestamps => SSLOption::SSL_ENABLE_SIGNED_CERT_TIMESTAMPS, Self::EarlyData => SSLOption::SSL_ENABLE_0RTT_DATA, Self::RecordSizeLimit => SSLOption::SSL_RECORD_SIZE_LIMIT, Self::Tls13CompatMode => SSLOption::SSL_ENABLE_TLS13_COMPAT_MODE, Self::HelloDowngradeCheck => SSLOption::SSL_ENABLE_HELLO_DOWNGRADE_CHECK, Self::SuppressEndOfEarlyData => SSLOption::SSL_SUPPRESS_END_OF_EARLY_DATA, Self::Grease => SSLOption::SSL_ENABLE_GREASE, Self::EnableChExtensionPermutation => SSLOption::SSL_ENABLE_CH_EXTENSION_PERMUTATION,
};
i as PRInt32
}
// Some options are backwards, like SSL_NO_LOCKS, so use this to manage that. fn map_enabled(self, enabled: bool) -> PRIntn { let v = matchself { Self::Locking => !enabled,
_ => enabled,
};
PRIntn::from(v)
}
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.