Unverified Commit 03abc177 authored by Steven Fackler's avatar Steven Fackler Committed by GitHub
Browse files

Merge pull request #1910 from oskirby/conditional-rc4-check

Check for OPENSSL_NO_RC4 when using EVP_rc4
parents e96addaa 34260b83
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -79,6 +79,10 @@ RUST_CONF_OPENSSL_NO_OCSP
RUST_CONF_OPENSSL_NO_PSK
#endif

#ifdef OPENSSL_NO_RC4
RUST_CONF_OPENSSL_NO_RC4
#endif

#ifdef OPENSSL_NO_RFC3779
RUST_CONF_OPENSSL_NO_RFC3779
#endif
+1 −0
Original line number Diff line number Diff line
@@ -311,6 +311,7 @@ extern "C" {
    pub fn EVP_des_ede3_cbc() -> *const EVP_CIPHER;
    pub fn EVP_des_ede3_cfb64() -> *const EVP_CIPHER;
    pub fn EVP_des_cbc() -> *const EVP_CIPHER;
    #[cfg(not(osslconf = "OPENSSL_NO_RC4"))]
    pub fn EVP_rc4() -> *const EVP_CIPHER;
    pub fn EVP_bf_ecb() -> *const EVP_CIPHER;
    pub fn EVP_bf_cbc() -> *const EVP_CIPHER;
+1 −0
Original line number Diff line number Diff line
@@ -324,6 +324,7 @@ impl Cipher {
        unsafe { CipherRef::from_ptr(ffi::EVP_des_ede3_cfb64() as *mut _) }
    }

    #[cfg(not(osslconf = "OPENSSL_NO_RC4"))]
    pub fn rc4() -> &'static CipherRef {
        unsafe { CipherRef::from_ptr(ffi::EVP_rc4() as *mut _) }
    }
+1 −0
Original line number Diff line number Diff line
@@ -283,6 +283,7 @@ impl Cipher {
        unsafe { Cipher(ffi::EVP_des_ede3_cfb64()) }
    }

    #[cfg(not(osslconf = "OPENSSL_NO_RC4"))]
    pub fn rc4() -> Cipher {
        unsafe { Cipher(ffi::EVP_rc4()) }
    }