diff options
author | Dr. Stephen Henson <steve@openssl.org> | 2011-05-19 18:09:02 +0000 |
---|---|---|
committer | Dr. Stephen Henson <steve@openssl.org> | 2011-05-19 18:09:02 +0000 |
commit | 086e32a6c7df4588834bc4d033a00382fd313b58 (patch) | |
tree | 6ceaf1e1c7be5fbf9251356fd73a0d26bcdbff29 /ssl/s23_srvr.c | |
parent | 05b4fc6c220d539b3485507fcbb7efed4edc2adc (diff) |
Implement FIPS_mode and FIPS_mode_set
Diffstat (limited to 'ssl/s23_srvr.c')
-rw-r--r-- | ssl/s23_srvr.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/ssl/s23_srvr.c b/ssl/s23_srvr.c index b21c57a117..4877849013 100644 --- a/ssl/s23_srvr.c +++ b/ssl/s23_srvr.c @@ -115,6 +115,9 @@ #include <openssl/rand.h> #include <openssl/objects.h> #include <openssl/evp.h> +#ifdef OPENSSL_FIPS +#include <openssl/fips.h> +#endif static const SSL_METHOD *ssl23_get_server_method(int ver); int ssl23_get_client_hello(SSL *s); @@ -422,6 +425,15 @@ int ssl23_get_client_hello(SSL *s) } } +#ifdef OPENSSL_FIPS + if (FIPS_mode() && (s->version < TLS1_VERSION)) + { + SSLerr(SSL_F_SSL23_GET_CLIENT_HELLO, + SSL_R_ONLY_TLS_ALLOWED_IN_FIPS_MODE); + goto err; + } +#endif + if (s->state == SSL23_ST_SR_CLNT_HELLO_B) { /* we have SSLv3/TLSv1 in an SSLv2 header |