diff options
author | jsing <> | 2014-11-08 15:21:02 +0000 |
---|---|---|
committer | jsing <> | 2014-11-08 15:21:02 +0000 |
commit | 2f8b4cc5ff3e9b07f35636bc6abdcbca9e9df7ca (patch) | |
tree | f3b2b35f9d59031749e317e4d4a663d19278f14e | |
parent | 69b02c2789e54ca6f1a0639f0a408d25d17ecc6f (diff) | |
download | openbsd-2f8b4cc5ff3e9b07f35636bc6abdcbca9e9df7ca.tar.gz openbsd-2f8b4cc5ff3e9b07f35636bc6abdcbca9e9df7ca.tar.bz2 openbsd-2f8b4cc5ff3e9b07f35636bc6abdcbca9e9df7ca.zip |
Clean up more SSLv2 remnants.
-rw-r--r-- | src/lib/libssl/src/ssl/ssl_ciph.c | 22 | ||||
-rw-r--r-- | src/lib/libssl/src/ssl/ssl_locl.h | 3 | ||||
-rw-r--r-- | src/lib/libssl/src/ssl/ssl_sess.c | 19 | ||||
-rw-r--r-- | src/lib/libssl/ssl_ciph.c | 22 | ||||
-rw-r--r-- | src/lib/libssl/ssl_locl.h | 3 | ||||
-rw-r--r-- | src/lib/libssl/ssl_sess.c | 19 |
6 files changed, 30 insertions, 58 deletions
diff --git a/src/lib/libssl/src/ssl/ssl_ciph.c b/src/lib/libssl/src/ssl/ssl_ciph.c index 1645f6af49..6193cd1a66 100644 --- a/src/lib/libssl/src/ssl/ssl_ciph.c +++ b/src/lib/libssl/src/ssl/ssl_ciph.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: ssl_ciph.c,v 1.71 2014/11/02 10:42:38 jsing Exp $ */ | 1 | /* $OpenBSD: ssl_ciph.c,v 1.72 2014/11/08 15:21:02 jsing Exp $ */ |
2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) | 2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) |
3 | * All rights reserved. | 3 | * All rights reserved. |
4 | * | 4 | * |
@@ -450,10 +450,6 @@ static const SSL_CIPHER cipher_aliases[] = { | |||
450 | 450 | ||
451 | /* protocol version aliases */ | 451 | /* protocol version aliases */ |
452 | { | 452 | { |
453 | .name = SSL_TXT_SSLV2, | ||
454 | .algorithm_ssl = SSL_SSLV2, | ||
455 | }, | ||
456 | { | ||
457 | .name = SSL_TXT_SSLV3, | 453 | .name = SSL_TXT_SSLV3, |
458 | .algorithm_ssl = SSL_SSLV3, | 454 | .algorithm_ssl = SSL_SSLV3, |
459 | }, | 455 | }, |
@@ -872,9 +868,8 @@ CIPHER_ORDER **head_p, CIPHER_ORDER **tail_p) | |||
872 | 868 | ||
873 | /* | 869 | /* |
874 | * We have num_of_ciphers descriptions compiled in, depending on the | 870 | * We have num_of_ciphers descriptions compiled in, depending on the |
875 | * method selected (SSLv2 and/or SSLv3, TLSv1 etc). | 871 | * method selected (SSLv3, TLSv1, etc). These will later be sorted in |
876 | * These will later be sorted in a linked list with at most num | 872 | * a linked list with at most num entries. |
877 | * entries. | ||
878 | */ | 873 | */ |
879 | 874 | ||
880 | /* Get the initial list of ciphers */ | 875 | /* Get the initial list of ciphers */ |
@@ -1560,9 +1555,7 @@ SSL_CIPHER_description(const SSL_CIPHER *cipher, char *buf, int len) | |||
1560 | 1555 | ||
1561 | alg2 = cipher->algorithm2; | 1556 | alg2 = cipher->algorithm2; |
1562 | 1557 | ||
1563 | if (alg_ssl & SSL_SSLV2) | 1558 | if (alg_ssl & SSL_SSLV3) |
1564 | ver = "SSLv2"; | ||
1565 | else if (alg_ssl & SSL_SSLV3) | ||
1566 | ver = "SSLv3"; | 1559 | ver = "SSLv3"; |
1567 | else if (alg_ssl & SSL_TLSV1_2) | 1560 | else if (alg_ssl & SSL_TLSV1_2) |
1568 | ver = "TLSv1.2"; | 1561 | ver = "TLSv1.2"; |
@@ -1691,15 +1684,10 @@ SSL_CIPHER_description(const SSL_CIPHER *cipher, char *buf, int len) | |||
1691 | char * | 1684 | char * |
1692 | SSL_CIPHER_get_version(const SSL_CIPHER *c) | 1685 | SSL_CIPHER_get_version(const SSL_CIPHER *c) |
1693 | { | 1686 | { |
1694 | int i; | ||
1695 | |||
1696 | if (c == NULL) | 1687 | if (c == NULL) |
1697 | return("(NONE)"); | 1688 | return("(NONE)"); |
1698 | i = (int)(c->id >> 24L); | 1689 | if ((c->id >> 24) == 3) |
1699 | if (i == 3) | ||
1700 | return("TLSv1/SSLv3"); | 1690 | return("TLSv1/SSLv3"); |
1701 | else if (i == 2) | ||
1702 | return("SSLv2"); | ||
1703 | else | 1691 | else |
1704 | return("unknown"); | 1692 | return("unknown"); |
1705 | } | 1693 | } |
diff --git a/src/lib/libssl/src/ssl/ssl_locl.h b/src/lib/libssl/src/ssl/ssl_locl.h index 9aa9bc60ff..8888d6c5a5 100644 --- a/src/lib/libssl/src/ssl/ssl_locl.h +++ b/src/lib/libssl/src/ssl/ssl_locl.h | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: ssl_locl.h,v 1.74 2014/11/02 10:42:38 jsing Exp $ */ | 1 | /* $OpenBSD: ssl_locl.h,v 1.75 2014/11/08 15:21:02 jsing Exp $ */ |
2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) | 2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) |
3 | * All rights reserved. | 3 | * All rights reserved. |
4 | * | 4 | * |
@@ -301,7 +301,6 @@ | |||
301 | #define SSL_AEAD 0x00000040L | 301 | #define SSL_AEAD 0x00000040L |
302 | 302 | ||
303 | /* Bits for algorithm_ssl (protocol version) */ | 303 | /* Bits for algorithm_ssl (protocol version) */ |
304 | #define SSL_SSLV2 0x00000001L | ||
305 | #define SSL_SSLV3 0x00000002L | 304 | #define SSL_SSLV3 0x00000002L |
306 | #define SSL_TLSV1 SSL_SSLV3 /* for now */ | 305 | #define SSL_TLSV1 SSL_SSLV3 /* for now */ |
307 | #define SSL_TLSV1_2 0x00000004L | 306 | #define SSL_TLSV1_2 0x00000004L |
diff --git a/src/lib/libssl/src/ssl/ssl_sess.c b/src/lib/libssl/src/ssl/ssl_sess.c index d76fb8b9c8..8f6032a491 100644 --- a/src/lib/libssl/src/ssl/ssl_sess.c +++ b/src/lib/libssl/src/ssl/ssl_sess.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: ssl_sess.c,v 1.42 2014/10/18 16:13:16 jsing Exp $ */ | 1 | /* $OpenBSD: ssl_sess.c,v 1.43 2014/11/08 15:21:02 jsing Exp $ */ |
2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) | 2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) |
3 | * All rights reserved. | 3 | * All rights reserved. |
4 | * | 4 | * |
@@ -238,15 +238,14 @@ SSL_SESSION_get_compress_id(const SSL_SESSION *s) | |||
238 | } | 238 | } |
239 | 239 | ||
240 | /* | 240 | /* |
241 | * Even with SSLv2, we have 16 bytes (128 bits) of session ID space. | 241 | * SSLv3/TLSv1 has 32 bytes (256 bits) of session ID space. As such, filling |
242 | * SSLv3/TLSv1 has 32 bytes (256 bits). As such, filling the ID with random | 242 | * the ID with random gunk repeatedly until we have no conflict is going to |
243 | * gunk repeatedly until we have no conflict is going to complete in one | 243 | * complete in one iteration pretty much "most" of the time (btw: |
244 | * iteration pretty much "most" of the time (btw: understatement). So, if it | 244 | * understatement). So, if it takes us 10 iterations and we still can't avoid |
245 | * takes us 10 iterations and we still can't avoid a conflict - well that's a | 245 | * a conflict - well that's a reasonable point to call it quits. Either the |
246 | * reasonable point to call it quits. Either the RAND code is broken or someone | 246 | * arc4random code is broken or someone is trying to open roughly very close to |
247 | * is trying to open roughly very close to 2^128 (or 2^256) SSL sessions to our | 247 | * 2^128 (or 2^256) SSL sessions to our server. How you might store that many |
248 | * server. How you might store that many sessions is perhaps a more interesting | 248 | * sessions is perhaps a more interesting question... |
249 | * question... | ||
250 | */ | 249 | */ |
251 | 250 | ||
252 | #define MAX_SESS_ID_ATTEMPTS 10 | 251 | #define MAX_SESS_ID_ATTEMPTS 10 |
diff --git a/src/lib/libssl/ssl_ciph.c b/src/lib/libssl/ssl_ciph.c index 1645f6af49..6193cd1a66 100644 --- a/src/lib/libssl/ssl_ciph.c +++ b/src/lib/libssl/ssl_ciph.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: ssl_ciph.c,v 1.71 2014/11/02 10:42:38 jsing Exp $ */ | 1 | /* $OpenBSD: ssl_ciph.c,v 1.72 2014/11/08 15:21:02 jsing Exp $ */ |
2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) | 2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) |
3 | * All rights reserved. | 3 | * All rights reserved. |
4 | * | 4 | * |
@@ -450,10 +450,6 @@ static const SSL_CIPHER cipher_aliases[] = { | |||
450 | 450 | ||
451 | /* protocol version aliases */ | 451 | /* protocol version aliases */ |
452 | { | 452 | { |
453 | .name = SSL_TXT_SSLV2, | ||
454 | .algorithm_ssl = SSL_SSLV2, | ||
455 | }, | ||
456 | { | ||
457 | .name = SSL_TXT_SSLV3, | 453 | .name = SSL_TXT_SSLV3, |
458 | .algorithm_ssl = SSL_SSLV3, | 454 | .algorithm_ssl = SSL_SSLV3, |
459 | }, | 455 | }, |
@@ -872,9 +868,8 @@ CIPHER_ORDER **head_p, CIPHER_ORDER **tail_p) | |||
872 | 868 | ||
873 | /* | 869 | /* |
874 | * We have num_of_ciphers descriptions compiled in, depending on the | 870 | * We have num_of_ciphers descriptions compiled in, depending on the |
875 | * method selected (SSLv2 and/or SSLv3, TLSv1 etc). | 871 | * method selected (SSLv3, TLSv1, etc). These will later be sorted in |
876 | * These will later be sorted in a linked list with at most num | 872 | * a linked list with at most num entries. |
877 | * entries. | ||
878 | */ | 873 | */ |
879 | 874 | ||
880 | /* Get the initial list of ciphers */ | 875 | /* Get the initial list of ciphers */ |
@@ -1560,9 +1555,7 @@ SSL_CIPHER_description(const SSL_CIPHER *cipher, char *buf, int len) | |||
1560 | 1555 | ||
1561 | alg2 = cipher->algorithm2; | 1556 | alg2 = cipher->algorithm2; |
1562 | 1557 | ||
1563 | if (alg_ssl & SSL_SSLV2) | 1558 | if (alg_ssl & SSL_SSLV3) |
1564 | ver = "SSLv2"; | ||
1565 | else if (alg_ssl & SSL_SSLV3) | ||
1566 | ver = "SSLv3"; | 1559 | ver = "SSLv3"; |
1567 | else if (alg_ssl & SSL_TLSV1_2) | 1560 | else if (alg_ssl & SSL_TLSV1_2) |
1568 | ver = "TLSv1.2"; | 1561 | ver = "TLSv1.2"; |
@@ -1691,15 +1684,10 @@ SSL_CIPHER_description(const SSL_CIPHER *cipher, char *buf, int len) | |||
1691 | char * | 1684 | char * |
1692 | SSL_CIPHER_get_version(const SSL_CIPHER *c) | 1685 | SSL_CIPHER_get_version(const SSL_CIPHER *c) |
1693 | { | 1686 | { |
1694 | int i; | ||
1695 | |||
1696 | if (c == NULL) | 1687 | if (c == NULL) |
1697 | return("(NONE)"); | 1688 | return("(NONE)"); |
1698 | i = (int)(c->id >> 24L); | 1689 | if ((c->id >> 24) == 3) |
1699 | if (i == 3) | ||
1700 | return("TLSv1/SSLv3"); | 1690 | return("TLSv1/SSLv3"); |
1701 | else if (i == 2) | ||
1702 | return("SSLv2"); | ||
1703 | else | 1691 | else |
1704 | return("unknown"); | 1692 | return("unknown"); |
1705 | } | 1693 | } |
diff --git a/src/lib/libssl/ssl_locl.h b/src/lib/libssl/ssl_locl.h index 9aa9bc60ff..8888d6c5a5 100644 --- a/src/lib/libssl/ssl_locl.h +++ b/src/lib/libssl/ssl_locl.h | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: ssl_locl.h,v 1.74 2014/11/02 10:42:38 jsing Exp $ */ | 1 | /* $OpenBSD: ssl_locl.h,v 1.75 2014/11/08 15:21:02 jsing Exp $ */ |
2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) | 2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) |
3 | * All rights reserved. | 3 | * All rights reserved. |
4 | * | 4 | * |
@@ -301,7 +301,6 @@ | |||
301 | #define SSL_AEAD 0x00000040L | 301 | #define SSL_AEAD 0x00000040L |
302 | 302 | ||
303 | /* Bits for algorithm_ssl (protocol version) */ | 303 | /* Bits for algorithm_ssl (protocol version) */ |
304 | #define SSL_SSLV2 0x00000001L | ||
305 | #define SSL_SSLV3 0x00000002L | 304 | #define SSL_SSLV3 0x00000002L |
306 | #define SSL_TLSV1 SSL_SSLV3 /* for now */ | 305 | #define SSL_TLSV1 SSL_SSLV3 /* for now */ |
307 | #define SSL_TLSV1_2 0x00000004L | 306 | #define SSL_TLSV1_2 0x00000004L |
diff --git a/src/lib/libssl/ssl_sess.c b/src/lib/libssl/ssl_sess.c index d76fb8b9c8..8f6032a491 100644 --- a/src/lib/libssl/ssl_sess.c +++ b/src/lib/libssl/ssl_sess.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: ssl_sess.c,v 1.42 2014/10/18 16:13:16 jsing Exp $ */ | 1 | /* $OpenBSD: ssl_sess.c,v 1.43 2014/11/08 15:21:02 jsing Exp $ */ |
2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) | 2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) |
3 | * All rights reserved. | 3 | * All rights reserved. |
4 | * | 4 | * |
@@ -238,15 +238,14 @@ SSL_SESSION_get_compress_id(const SSL_SESSION *s) | |||
238 | } | 238 | } |
239 | 239 | ||
240 | /* | 240 | /* |
241 | * Even with SSLv2, we have 16 bytes (128 bits) of session ID space. | 241 | * SSLv3/TLSv1 has 32 bytes (256 bits) of session ID space. As such, filling |
242 | * SSLv3/TLSv1 has 32 bytes (256 bits). As such, filling the ID with random | 242 | * the ID with random gunk repeatedly until we have no conflict is going to |
243 | * gunk repeatedly until we have no conflict is going to complete in one | 243 | * complete in one iteration pretty much "most" of the time (btw: |
244 | * iteration pretty much "most" of the time (btw: understatement). So, if it | 244 | * understatement). So, if it takes us 10 iterations and we still can't avoid |
245 | * takes us 10 iterations and we still can't avoid a conflict - well that's a | 245 | * a conflict - well that's a reasonable point to call it quits. Either the |
246 | * reasonable point to call it quits. Either the RAND code is broken or someone | 246 | * arc4random code is broken or someone is trying to open roughly very close to |
247 | * is trying to open roughly very close to 2^128 (or 2^256) SSL sessions to our | 247 | * 2^128 (or 2^256) SSL sessions to our server. How you might store that many |
248 | * server. How you might store that many sessions is perhaps a more interesting | 248 | * sessions is perhaps a more interesting question... |
249 | * question... | ||
250 | */ | 249 | */ |
251 | 250 | ||
252 | #define MAX_SESS_ID_ATTEMPTS 10 | 251 | #define MAX_SESS_ID_ATTEMPTS 10 |