Don't try to use unvalidated composite ciphers in FIPS mode
[openssl.git] / ssl / ssl_ciph.c
index a96a5daaf5d2b9c3404b78eea04f9f3bb96b8679..6db2aa945d0cfe8ad8cffdd54ca934766a58e644 100644 (file)
@@ -620,6 +620,11 @@ int ssl_cipher_get_evp(const SSL_SESSION *s, const EVP_CIPHER **enc,
                    s->ssl_version < TLS1_VERSION)
                        return 1;
 
+#ifdef OPENSSL_FIPS
+               if (FIPS_mode())
+                       return 1;
+#endif
+
                if      (c->algorithm_enc == SSL_RC4 &&
                         c->algorithm_mac == SSL_MD5 &&
                         (evp=EVP_get_cipherbyname("RC4-HMAC-MD5")))