diff options
Diffstat (limited to 'src/lib/libssl/s3_srvr.c')
| -rw-r--r-- | src/lib/libssl/s3_srvr.c | 17 | 
1 files changed, 6 insertions, 11 deletions
| diff --git a/src/lib/libssl/s3_srvr.c b/src/lib/libssl/s3_srvr.c index c4a1a71523..deb3cffabe 100644 --- a/src/lib/libssl/s3_srvr.c +++ b/src/lib/libssl/s3_srvr.c | |||
| @@ -125,7 +125,6 @@ | |||
| 125 | #include <openssl/krb5_asn.h> | 125 | #include <openssl/krb5_asn.h> | 
| 126 | #endif | 126 | #endif | 
| 127 | #include <openssl/md5.h> | 127 | #include <openssl/md5.h> | 
| 128 | #include <openssl/fips.h> | ||
| 129 | 128 | ||
| 130 | static SSL_METHOD *ssl3_get_server_method(int ver); | 129 | static SSL_METHOD *ssl3_get_server_method(int ver); | 
| 131 | static int ssl3_get_client_hello(SSL *s); | 130 | static int ssl3_get_client_hello(SSL *s); | 
| @@ -956,8 +955,7 @@ static int ssl3_send_server_hello(SSL *s) | |||
| 956 | p=s->s3->server_random; | 955 | p=s->s3->server_random; | 
| 957 | Time=time(NULL); /* Time */ | 956 | Time=time(NULL); /* Time */ | 
| 958 | l2n(Time,p); | 957 | l2n(Time,p); | 
| 959 | if(RAND_pseudo_bytes(p,SSL3_RANDOM_SIZE-4) <= 0) | 958 | RAND_pseudo_bytes(p,SSL3_RANDOM_SIZE-sizeof(Time)); | 
| 960 | return -1; | ||
| 961 | /* Do the message type and length last */ | 959 | /* Do the message type and length last */ | 
| 962 | d=p= &(buf[4]); | 960 | d=p= &(buf[4]); | 
| 963 | 961 | ||
| @@ -1213,8 +1211,6 @@ static int ssl3_send_server_key_exchange(SSL *s) | |||
| 1213 | j=0; | 1211 | j=0; | 
| 1214 | for (num=2; num > 0; num--) | 1212 | for (num=2; num > 0; num--) | 
| 1215 | { | 1213 | { | 
| 1216 | EVP_MD_CTX_set_flags(&md_ctx, | ||
| 1217 | EVP_MD_CTX_FLAG_NON_FIPS_ALLOW); | ||
| 1218 | EVP_DigestInit_ex(&md_ctx,(num == 2) | 1214 | EVP_DigestInit_ex(&md_ctx,(num == 2) | 
| 1219 | ?s->ctx->md5:s->ctx->sha1, NULL); | 1215 | ?s->ctx->md5:s->ctx->sha1, NULL); | 
| 1220 | EVP_DigestUpdate(&md_ctx,&(s->s3->client_random[0]),SSL3_RANDOM_SIZE); | 1216 | EVP_DigestUpdate(&md_ctx,&(s->s3->client_random[0]),SSL3_RANDOM_SIZE); | 
| @@ -1495,8 +1491,7 @@ static int ssl3_get_client_key_exchange(SSL *s) | |||
| 1495 | i = SSL_MAX_MASTER_KEY_LENGTH; | 1491 | i = SSL_MAX_MASTER_KEY_LENGTH; | 
| 1496 | p[0] = s->client_version >> 8; | 1492 | p[0] = s->client_version >> 8; | 
| 1497 | p[1] = s->client_version & 0xff; | 1493 | p[1] = s->client_version & 0xff; | 
| 1498 | if(RAND_pseudo_bytes(p+2, i-2) <= 0) /* should be RAND_bytes, but we cannot work around a failure */ | 1494 | RAND_pseudo_bytes(p+2, i-2); /* should be RAND_bytes, but we cannot work around a failure */ | 
| 1499 | goto err; | ||
| 1500 | } | 1495 | } | 
| 1501 | 1496 | ||
| 1502 | s->session->master_key_length= | 1497 | s->session->master_key_length= | 
| @@ -1594,7 +1589,7 @@ static int ssl3_get_client_key_exchange(SSL *s) | |||
| 1594 | n2s(p,i); | 1589 | n2s(p,i); | 
| 1595 | enc_ticket.length = i; | 1590 | enc_ticket.length = i; | 
| 1596 | 1591 | ||
| 1597 | if (n < (long)enc_ticket.length + 6) | 1592 | if (n < enc_ticket.length + 6) | 
| 1598 | { | 1593 | { | 
| 1599 | SSLerr(SSL_F_SSL3_GET_CLIENT_KEY_EXCHANGE, | 1594 | SSLerr(SSL_F_SSL3_GET_CLIENT_KEY_EXCHANGE, | 
| 1600 | SSL_R_DATA_LENGTH_TOO_LONG); | 1595 | SSL_R_DATA_LENGTH_TOO_LONG); | 
| @@ -1607,7 +1602,7 @@ static int ssl3_get_client_key_exchange(SSL *s) | |||
| 1607 | n2s(p,i); | 1602 | n2s(p,i); | 
| 1608 | authenticator.length = i; | 1603 | authenticator.length = i; | 
| 1609 | 1604 | ||
| 1610 | if (n < (long)(enc_ticket.length + authenticator.length + 6)) | 1605 | if (n < enc_ticket.length + authenticator.length + 6) | 
| 1611 | { | 1606 | { | 
| 1612 | SSLerr(SSL_F_SSL3_GET_CLIENT_KEY_EXCHANGE, | 1607 | SSLerr(SSL_F_SSL3_GET_CLIENT_KEY_EXCHANGE, | 
| 1613 | SSL_R_DATA_LENGTH_TOO_LONG); | 1608 | SSL_R_DATA_LENGTH_TOO_LONG); | 
| @@ -1632,8 +1627,8 @@ static int ssl3_get_client_key_exchange(SSL *s) | |||
| 1632 | goto err; | 1627 | goto err; | 
| 1633 | } | 1628 | } | 
| 1634 | 1629 | ||
| 1635 | if (n != (long)(enc_ticket.length + authenticator.length + | 1630 | if (n != enc_ticket.length + authenticator.length + | 
| 1636 | enc_pms.length + 6)) | 1631 | enc_pms.length + 6) | 
| 1637 | { | 1632 | { | 
| 1638 | SSLerr(SSL_F_SSL3_GET_CLIENT_KEY_EXCHANGE, | 1633 | SSLerr(SSL_F_SSL3_GET_CLIENT_KEY_EXCHANGE, | 
| 1639 | SSL_R_DATA_LENGTH_TOO_LONG); | 1634 | SSL_R_DATA_LENGTH_TOO_LONG); | 
