summaryrefslogtreecommitdiffstats
path: root/ssl/ssl_lib.c
diff options
context:
space:
mode:
authorDr. Stephen Henson <steve@openssl.org>2011-05-19 18:22:16 +0000
committerDr. Stephen Henson <steve@openssl.org>2011-05-19 18:22:16 +0000
commit7043fa702fa102a45b102e11990b650360c35503 (patch)
tree77edd16724ed7b7312764e44b1f509d975470b76 /ssl/ssl_lib.c
parentf98d2e5cc13a42c39b2adb6771878ab8157e1fe4 (diff)
add FIPS support to ssl: doesn't do anything on this branch yet as there is no FIPS compilation support
Diffstat (limited to 'ssl/ssl_lib.c')
-rw-r--r--ssl/ssl_lib.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/ssl/ssl_lib.c b/ssl/ssl_lib.c
index 1c3e9454d6..b21b42927d 100644
--- a/ssl/ssl_lib.c
+++ b/ssl/ssl_lib.c
@@ -1532,6 +1532,14 @@ SSL_CTX *SSL_CTX_new(const SSL_METHOD *meth)
return(NULL);
}
+#ifdef OPENSSL_FIPS
+ if (FIPS_mode() && (meth->version < TLS1_VERSION))
+ {
+ SSLerr(SSL_F_SSL_CTX_NEW, SSL_R_ONLY_TLS_ALLOWED_IN_FIPS_MODE);
+ return NULL;
+ }
+#endif
+
if (SSL_get_ex_data_X509_STORE_CTX_idx() < 0)
{
SSLerr(SSL_F_SSL_CTX_NEW,SSL_R_X509_VERIFICATION_SETUP_PROBLEMS);