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_clnt.c | |
parent | 05b4fc6c220d539b3485507fcbb7efed4edc2adc (diff) |
Implement FIPS_mode and FIPS_mode_set
Diffstat (limited to 'ssl/s23_clnt.c')
-rw-r--r-- | ssl/s23_clnt.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/ssl/s23_clnt.c b/ssl/s23_clnt.c index f49a95ba99..b3c48232d7 100644 --- a/ssl/s23_clnt.c +++ b/ssl/s23_clnt.c @@ -356,6 +356,14 @@ static int ssl23_client_hello(SSL *s) version_major = TLS1_VERSION_MAJOR; version_minor = TLS1_VERSION_MINOR; } +#ifdef OPENSSL_FIPS + else if(FIPS_mode()) + { + SSLerr(SSL_F_SSL23_CLIENT_HELLO, + SSL_R_ONLY_TLS_ALLOWED_IN_FIPS_MODE); + return -1; + } +#endif else if (version == SSL3_VERSION) { version_major = SSL3_VERSION_MAJOR; @@ -639,6 +647,14 @@ static int ssl23_get_server_hello(SSL *s) if ((p[2] == SSL3_VERSION_MINOR) && !(s->options & SSL_OP_NO_SSLv3)) { +#ifdef OPENSSL_FIPS + if(FIPS_mode()) + { + SSLerr(SSL_F_SSL23_GET_SERVER_HELLO, + SSL_R_ONLY_TLS_ALLOWED_IN_FIPS_MODE); + goto err; + } +#endif s->version=SSL3_VERSION; s->method=SSLv3_client_method(); } |