Commit 97843563 authored by Lzu Tao's avatar Lzu Tao
Browse files

chore: simplify cfg attributes

parent 8ab3c3f3
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -599,7 +599,7 @@ impl AlpnError {
    /// Terminate the handshake with a fatal alert.
    ///
    /// Requires OpenSSL 1.1.0 or newer.
    #[cfg(any(ossl110))]
    #[cfg(ossl110)]
    pub const ALERT_FATAL: AlpnError = AlpnError(ffi::SSL_TLSEXT_ERR_ALERT_FATAL);

    /// Do not select a protocol, but continue the handshake.
@@ -2413,7 +2413,7 @@ impl SslRef {
    ///
    /// Requires OpenSSL 1.0.1 or 1.0.2.
    #[corresponds(SSL_set_tmp_ecdh_callback)]
    #[cfg(any(all(ossl101, not(ossl110))))]
    #[cfg(all(ossl101, not(ossl110)))]
    #[deprecated(note = "this function leaks memory and does not exist on newer OpenSSL versions")]
    pub fn set_tmp_ecdh_callback<F>(&mut self, callback: F)
    where
+1 −1
Original line number Diff line number Diff line
@@ -467,7 +467,7 @@ fn test_alpn_server_advertise_multiple() {
}

#[test]
#[cfg(any(ossl110))]
#[cfg(ossl110)]
fn test_alpn_server_select_none_fatal() {
    let mut server = Server::builder();
    server.ctx().set_alpn_select_callback(|_, client| {
+2 −2
Original line number Diff line number Diff line
@@ -1478,7 +1478,7 @@ mod tests {
    }

    #[test]
    #[cfg(any(ossl110))]
    #[cfg(ossl110)]
    fn test_chacha20() {
        let key = "0000000000000000000000000000000000000000000000000000000000000000";
        let iv = "00000000000000000000000000000000";
@@ -1493,7 +1493,7 @@ mod tests {
    }

    #[test]
    #[cfg(any(ossl110))]
    #[cfg(ossl110)]
    fn test_chacha20_poly1305() {
        let key = "808182838485868788898a8b8c8d8e8f909192939495969798999a9b9c9d9e9f";
        let iv = "070000004041424344454647";