Fix SSL 2.0 rollback checking: The previous implementation of the
test was never triggered due to an off-by-one error. In s23_clnt.c, don't use special rollback-attack detection padding (RSA_SSLV23_PADDING) if SSL 2.0 is the only protocol enabled in the client; similarly, in s23_srvr.c, don't do the rollback check if SSL 2.0 is the only protocol enabled in the server.
This commit is contained in:
parent
a657546f9c
commit
37569e64e8
9
CHANGES
9
CHANGES
@ -4,6 +4,15 @@
|
|||||||
|
|
||||||
Changes between 0.9.5a and 0.9.6 [xx XXX 2000]
|
Changes between 0.9.5a and 0.9.6 [xx XXX 2000]
|
||||||
|
|
||||||
|
*) Fix SSL 2.0 rollback checking: The previous implementation of the
|
||||||
|
test was never triggered due to an off-by-one error in
|
||||||
|
RSA_padding_check_SSLv23().
|
||||||
|
In s23_clnt.c, don't use special rollback-attack detection padding
|
||||||
|
(RSA_SSLV23_PADDING) if SSL 2.0 is the only protocol enabled in the
|
||||||
|
client; similarly, in s23_srvr.c, don't do the rollback check if
|
||||||
|
SSL 2.0 is the only protocol enabled in the server.
|
||||||
|
[Bodo Moeller]
|
||||||
|
|
||||||
*) Make it possible to get hexdumps of unprintable data with 'openssl
|
*) Make it possible to get hexdumps of unprintable data with 'openssl
|
||||||
asn1parse'. By implication, the functions ASN1_parse_dump() and
|
asn1parse'. By implication, the functions ASN1_parse_dump() and
|
||||||
BIO_dump_indent() are added.
|
BIO_dump_indent() are added.
|
||||||
|
@ -134,7 +134,7 @@ int RSA_padding_check_SSLv23(unsigned char *to, int tlen, unsigned char *from,
|
|||||||
{
|
{
|
||||||
if (p[k] != 0x03) break;
|
if (p[k] != 0x03) break;
|
||||||
}
|
}
|
||||||
if (k == 0)
|
if (k == -1)
|
||||||
{
|
{
|
||||||
RSAerr(RSA_F_RSA_PADDING_CHECK_SSLV23,RSA_R_SSLV3_ROLLBACK_ATTACK);
|
RSAerr(RSA_F_RSA_PADDING_CHECK_SSLV23,RSA_R_SSLV3_ROLLBACK_ATTACK);
|
||||||
return(-1);
|
return(-1);
|
||||||
|
@ -366,7 +366,8 @@ static int ssl23_get_server_hello(SSL *s)
|
|||||||
}
|
}
|
||||||
|
|
||||||
s->state=SSL2_ST_GET_SERVER_HELLO_A;
|
s->state=SSL2_ST_GET_SERVER_HELLO_A;
|
||||||
s->s2->ssl2_rollback=1;
|
if (!(s->client_version == SSL2_VERSION))
|
||||||
|
s->s2->ssl2_rollback=1;
|
||||||
|
|
||||||
/* setup the 5 bytes we have read so we get them from
|
/* setup the 5 bytes we have read so we get them from
|
||||||
* the sslv2 buffer */
|
* the sslv2 buffer */
|
||||||
|
@ -495,7 +495,8 @@ int ssl23_get_client_hello(SSL *s)
|
|||||||
|
|
||||||
s->state=SSL2_ST_GET_CLIENT_HELLO_A;
|
s->state=SSL2_ST_GET_CLIENT_HELLO_A;
|
||||||
if ((s->options & SSL_OP_MSIE_SSLV2_RSA_PADDING) ||
|
if ((s->options & SSL_OP_MSIE_SSLV2_RSA_PADDING) ||
|
||||||
use_sslv2_strong)
|
use_sslv2_strong ||
|
||||||
|
(s->options & SSL_OP_NO_TLSv1 && s->options & SSL_OP_NO_SSLv3))
|
||||||
s->s2->ssl2_rollback=0;
|
s->s2->ssl2_rollback=0;
|
||||||
else
|
else
|
||||||
s->s2->ssl2_rollback=1;
|
s->s2->ssl2_rollback=1;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user