From dd1a8feef3ef54128aab53a720a711d669b98c21 Mon Sep 17 00:00:00 2001 From: doug <> Date: Sat, 18 Jul 2015 01:42:26 +0000 Subject: Remove support for the SSL_OP_TLS_D5_BUG compat hack from SSLeay. This is a 17 year old workaround from SSLeay 0.9.0b. It was for clients that send RSA client key exchange in TLS using SSLv3 format (no length prefix). ok jsing@ --- src/lib/libssl/doc/SSL_CTX_set_options.3 | 8 +++++--- src/lib/libssl/s3_srvr.c | 12 ++++-------- src/lib/libssl/src/doc/ssl/SSL_CTX_set_options.3 | 8 +++++--- src/lib/libssl/src/ssl/s3_srvr.c | 12 ++++-------- src/lib/libssl/src/ssl/ssl.h | 5 ++--- src/lib/libssl/ssl.h | 5 ++--- 6 files changed, 22 insertions(+), 28 deletions(-) (limited to 'src') diff --git a/src/lib/libssl/doc/SSL_CTX_set_options.3 b/src/lib/libssl/doc/SSL_CTX_set_options.3 index 91a1c9ad92..0ffa025ce2 100644 --- a/src/lib/libssl/doc/SSL_CTX_set_options.3 +++ b/src/lib/libssl/doc/SSL_CTX_set_options.3 @@ -1,7 +1,7 @@ .\" -.\" $OpenBSD: SSL_CTX_set_options.3,v 1.8 2015/07/17 15:50:37 doug Exp $ +.\" $OpenBSD: SSL_CTX_set_options.3,v 1.9 2015/07/18 01:42:26 doug Exp $ .\" -.Dd $Mdocdate: July 17 2015 $ +.Dd $Mdocdate: July 18 2015 $ .Dt SSL_CTX_SET_OPTIONS 3 .Os .Sh NAME @@ -124,7 +124,9 @@ As of .Ox 5.8 , this option has no effect. .It Dv SSL_OP_TLS_D5_BUG -\&... +As of +.Ox 5.8 , +this option has no effect. .It Dv SSL_OP_TLS_BLOCK_PADDING_BUG As of .Ox 5.8 , diff --git a/src/lib/libssl/s3_srvr.c b/src/lib/libssl/s3_srvr.c index e70f8af440..cd5bc2a6cb 100644 --- a/src/lib/libssl/s3_srvr.c +++ b/src/lib/libssl/s3_srvr.c @@ -1,4 +1,4 @@ -/* $OpenBSD: s3_srvr.c,v 1.110 2015/07/14 05:16:47 doug Exp $ */ +/* $OpenBSD: s3_srvr.c,v 1.111 2015/07/18 01:42:26 doug Exp $ */ /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) * All rights reserved. * @@ -1708,13 +1708,9 @@ ssl3_get_client_key_exchange(SSL *s) goto truncated; n2s(p, i); if (n != i + 2) { - if (!(s->options & SSL_OP_TLS_D5_BUG)) { - SSLerr( - SSL_F_SSL3_GET_CLIENT_KEY_EXCHANGE, - SSL_R_TLS_RSA_ENCRYPTED_VALUE_LENGTH_IS_WRONG); - goto err; - } else - p -= 2; + SSLerr(SSL_F_SSL3_GET_CLIENT_KEY_EXCHANGE, + SSL_R_TLS_RSA_ENCRYPTED_VALUE_LENGTH_IS_WRONG); + goto err; } else n = i; } diff --git a/src/lib/libssl/src/doc/ssl/SSL_CTX_set_options.3 b/src/lib/libssl/src/doc/ssl/SSL_CTX_set_options.3 index 91a1c9ad92..0ffa025ce2 100644 --- a/src/lib/libssl/src/doc/ssl/SSL_CTX_set_options.3 +++ b/src/lib/libssl/src/doc/ssl/SSL_CTX_set_options.3 @@ -1,7 +1,7 @@ .\" -.\" $OpenBSD: SSL_CTX_set_options.3,v 1.8 2015/07/17 15:50:37 doug Exp $ +.\" $OpenBSD: SSL_CTX_set_options.3,v 1.9 2015/07/18 01:42:26 doug Exp $ .\" -.Dd $Mdocdate: July 17 2015 $ +.Dd $Mdocdate: July 18 2015 $ .Dt SSL_CTX_SET_OPTIONS 3 .Os .Sh NAME @@ -124,7 +124,9 @@ As of .Ox 5.8 , this option has no effect. .It Dv SSL_OP_TLS_D5_BUG -\&... +As of +.Ox 5.8 , +this option has no effect. .It Dv SSL_OP_TLS_BLOCK_PADDING_BUG As of .Ox 5.8 , diff --git a/src/lib/libssl/src/ssl/s3_srvr.c b/src/lib/libssl/src/ssl/s3_srvr.c index e70f8af440..cd5bc2a6cb 100644 --- a/src/lib/libssl/src/ssl/s3_srvr.c +++ b/src/lib/libssl/src/ssl/s3_srvr.c @@ -1,4 +1,4 @@ -/* $OpenBSD: s3_srvr.c,v 1.110 2015/07/14 05:16:47 doug Exp $ */ +/* $OpenBSD: s3_srvr.c,v 1.111 2015/07/18 01:42:26 doug Exp $ */ /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) * All rights reserved. * @@ -1708,13 +1708,9 @@ ssl3_get_client_key_exchange(SSL *s) goto truncated; n2s(p, i); if (n != i + 2) { - if (!(s->options & SSL_OP_TLS_D5_BUG)) { - SSLerr( - SSL_F_SSL3_GET_CLIENT_KEY_EXCHANGE, - SSL_R_TLS_RSA_ENCRYPTED_VALUE_LENGTH_IS_WRONG); - goto err; - } else - p -= 2; + SSLerr(SSL_F_SSL3_GET_CLIENT_KEY_EXCHANGE, + SSL_R_TLS_RSA_ENCRYPTED_VALUE_LENGTH_IS_WRONG); + goto err; } else n = i; } diff --git a/src/lib/libssl/src/ssl/ssl.h b/src/lib/libssl/src/ssl/ssl.h index 33aaadcd20..7d3e3c8171 100644 --- a/src/lib/libssl/src/ssl/ssl.h +++ b/src/lib/libssl/src/ssl/ssl.h @@ -1,4 +1,4 @@ -/* $OpenBSD: ssl.h,v 1.89 2015/07/17 15:50:37 doug Exp $ */ +/* $OpenBSD: ssl.h,v 1.90 2015/07/18 01:42:26 doug Exp $ */ /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) * All rights reserved. * @@ -520,7 +520,6 @@ struct ssl_session_st { #define SSL_OP_LEGACY_SERVER_CONNECT 0x00000004L #define SSL_OP_TLSEXT_PADDING 0x00000010L #define SSL_OP_MICROSOFT_BIG_SSLV3_BUFFER 0x00000020L -#define SSL_OP_TLS_D5_BUG 0x00000100L /* Disable SSL 3.0/TLS 1.0 CBC vulnerability workaround that was added * in OpenSSL 0.9.6d. Usually (depending on the application protocol) @@ -574,7 +573,6 @@ struct ssl_session_st { (SSL_OP_LEGACY_SERVER_CONNECT | \ SSL_OP_TLSEXT_PADDING | \ SSL_OP_MICROSOFT_BIG_SSLV3_BUFFER | \ - SSL_OP_TLS_D5_BUG | \ SSL_OP_CRYPTOPRO_TLSEXT_BUG) /* Obsolete flags kept for compatibility. No sane code should use them. */ @@ -592,6 +590,7 @@ struct ssl_session_st { #define SSL_OP_SSLEAY_080_CLIENT_DH_BUG 0x0 #define SSL_OP_SSLREF2_REUSE_CERT_TYPE_BUG 0x0 #define SSL_OP_TLS_BLOCK_PADDING_BUG 0x0 +#define SSL_OP_TLS_D5_BUG 0x0 /* Allow SSL_write(..., n) to return r with 0 < r < n (i.e. report success * when just a single record has been written): */ diff --git a/src/lib/libssl/ssl.h b/src/lib/libssl/ssl.h index 33aaadcd20..7d3e3c8171 100644 --- a/src/lib/libssl/ssl.h +++ b/src/lib/libssl/ssl.h @@ -1,4 +1,4 @@ -/* $OpenBSD: ssl.h,v 1.89 2015/07/17 15:50:37 doug Exp $ */ +/* $OpenBSD: ssl.h,v 1.90 2015/07/18 01:42:26 doug Exp $ */ /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) * All rights reserved. * @@ -520,7 +520,6 @@ struct ssl_session_st { #define SSL_OP_LEGACY_SERVER_CONNECT 0x00000004L #define SSL_OP_TLSEXT_PADDING 0x00000010L #define SSL_OP_MICROSOFT_BIG_SSLV3_BUFFER 0x00000020L -#define SSL_OP_TLS_D5_BUG 0x00000100L /* Disable SSL 3.0/TLS 1.0 CBC vulnerability workaround that was added * in OpenSSL 0.9.6d. Usually (depending on the application protocol) @@ -574,7 +573,6 @@ struct ssl_session_st { (SSL_OP_LEGACY_SERVER_CONNECT | \ SSL_OP_TLSEXT_PADDING | \ SSL_OP_MICROSOFT_BIG_SSLV3_BUFFER | \ - SSL_OP_TLS_D5_BUG | \ SSL_OP_CRYPTOPRO_TLSEXT_BUG) /* Obsolete flags kept for compatibility. No sane code should use them. */ @@ -592,6 +590,7 @@ struct ssl_session_st { #define SSL_OP_SSLEAY_080_CLIENT_DH_BUG 0x0 #define SSL_OP_SSLREF2_REUSE_CERT_TYPE_BUG 0x0 #define SSL_OP_TLS_BLOCK_PADDING_BUG 0x0 +#define SSL_OP_TLS_D5_BUG 0x0 /* Allow SSL_write(..., n) to return r with 0 < r < n (i.e. report success * when just a single record has been written): */ -- cgit v1.2.3-55-g6feb