Don't try to use unvalidated composite ciphers in FIPS mode
authorDr. Stephen Henson <steve@openssl.org>
Thu, 26 Apr 2012 18:55:01 +0000 (18:55 +0000)
committerDr. Stephen Henson <steve@openssl.org>
Thu, 26 Apr 2012 18:55:01 +0000 (18:55 +0000)
CHANGES
ssl/ssl_ciph.c

diff --git a/CHANGES b/CHANGES
index fd0aaf4d5b402b9fe6f67011bd74bd7003f76fed..33c30602edd5855855739fa0f330822d07b90a13 100644 (file)
--- a/CHANGES
+++ b/CHANGES
      whose return value is often ignored. 
      [Steve Henson]
 
      whose return value is often ignored. 
      [Steve Henson]
 
- Changes between 1.0.1a and 1.0.1b [xx XXX xxxx]
-
+ Changes between 1.0.1b and 1.0.1c [xx XXX xxxx]
+  *) In FIPS mode don't try to use composite ciphers as they are not
+     approved.
+     [Steve Henson]
+ Changes between 1.0.1a and 1.0.1b [26 Apr 2012]
   *) OpenSSL 1.0.0 sets SSL_OP_ALL to 0x80000FFFL and OpenSSL 1.0.1 and
      1.0.1a set SSL_OP_NO_TLSv1_1 to 0x00000400L which would unfortunately
      mean any application compiled against OpenSSL 1.0.0 headers setting
   *) OpenSSL 1.0.0 sets SSL_OP_ALL to 0x80000FFFL and OpenSSL 1.0.1 and
      1.0.1a set SSL_OP_NO_TLSv1_1 to 0x00000400L which would unfortunately
      mean any application compiled against OpenSSL 1.0.0 headers setting
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;
 
                    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")))
                if      (c->algorithm_enc == SSL_RC4 &&
                         c->algorithm_mac == SSL_MD5 &&
                         (evp=EVP_get_cipherbyname("RC4-HMAC-MD5")))