diff options
author | jsing <> | 2014-08-10 14:42:56 +0000 |
---|---|---|
committer | jsing <> | 2014-08-10 14:42:56 +0000 |
commit | cdc0e904c0db18d8a94dbc75555c41585f6a7867 (patch) | |
tree | 2aa183c3a15875e9ec36793e3cb35c3a765c0fcc /src/lib/libssl/s3_clnt.c | |
parent | f26635d06fdd0bb26d5ee990a796492daaa92b29 (diff) | |
download | openbsd-cdc0e904c0db18d8a94dbc75555c41585f6a7867.tar.gz openbsd-cdc0e904c0db18d8a94dbc75555c41585f6a7867.tar.bz2 openbsd-cdc0e904c0db18d8a94dbc75555c41585f6a7867.zip |
Since we no longer need to support SSLv2-style cipher lists, start
unravelling the maze of function pointers and callbacks by directly
calling ssl3_{get,put}_cipher_by_char() and removing the
ssl_{get,put}_cipher_by_char macros.
Prompted by similar changes in boringssl.
ok guenther.
Diffstat (limited to 'src/lib/libssl/s3_clnt.c')
-rw-r--r-- | src/lib/libssl/s3_clnt.c | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/src/lib/libssl/s3_clnt.c b/src/lib/libssl/s3_clnt.c index af6c81dae5..63e8135185 100644 --- a/src/lib/libssl/s3_clnt.c +++ b/src/lib/libssl/s3_clnt.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: s3_clnt.c,v 1.85 2014/08/07 01:24:10 deraadt Exp $ */ | 1 | /* $OpenBSD: s3_clnt.c,v 1.86 2014/08/10 14:42:56 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 | * |
@@ -183,8 +183,6 @@ const SSL_METHOD SSLv3_client_method_data = { | |||
183 | .ssl_dispatch_alert = ssl3_dispatch_alert, | 183 | .ssl_dispatch_alert = ssl3_dispatch_alert, |
184 | .ssl_ctrl = ssl3_ctrl, | 184 | .ssl_ctrl = ssl3_ctrl, |
185 | .ssl_ctx_ctrl = ssl3_ctx_ctrl, | 185 | .ssl_ctx_ctrl = ssl3_ctx_ctrl, |
186 | .get_cipher_by_char = ssl3_get_cipher_by_char, | ||
187 | .put_cipher_by_char = ssl3_put_cipher_by_char, | ||
188 | .ssl_pending = ssl3_pending, | 186 | .ssl_pending = ssl3_pending, |
189 | .num_ciphers = ssl3_num_ciphers, | 187 | .num_ciphers = ssl3_num_ciphers, |
190 | .get_cipher = ssl3_get_cipher, | 188 | .get_cipher = ssl3_get_cipher, |
@@ -719,7 +717,7 @@ ssl3_client_hello(SSL *s) | |||
719 | } | 717 | } |
720 | 718 | ||
721 | /* Ciphers supported */ | 719 | /* Ciphers supported */ |
722 | i = ssl_cipher_list_to_bytes(s, SSL_get_ciphers(s), &(p[2]), 0); | 720 | i = ssl_cipher_list_to_bytes(s, SSL_get_ciphers(s), &p[2]); |
723 | if (i == 0) { | 721 | if (i == 0) { |
724 | SSLerr(SSL_F_SSL3_CLIENT_HELLO, | 722 | SSLerr(SSL_F_SSL3_CLIENT_HELLO, |
725 | SSL_R_NO_CIPHERS_AVAILABLE); | 723 | SSL_R_NO_CIPHERS_AVAILABLE); |
@@ -856,7 +854,7 @@ ssl3_get_server_hello(SSL *s) | |||
856 | &s->session->master_key_length, NULL, &pref_cipher, | 854 | &s->session->master_key_length, NULL, &pref_cipher, |
857 | s->tls_session_secret_cb_arg)) { | 855 | s->tls_session_secret_cb_arg)) { |
858 | s->session->cipher = pref_cipher ? | 856 | s->session->cipher = pref_cipher ? |
859 | pref_cipher : ssl_get_cipher_by_char(s, p + j); | 857 | pref_cipher : ssl3_get_cipher_by_char(p + j); |
860 | s->s3->flags |= SSL3_FLAGS_CCS_OK; | 858 | s->s3->flags |= SSL3_FLAGS_CCS_OK; |
861 | } | 859 | } |
862 | } | 860 | } |
@@ -890,7 +888,7 @@ ssl3_get_server_hello(SSL *s) | |||
890 | memcpy(s->session->session_id,p,j); /* j could be 0 */ | 888 | memcpy(s->session->session_id,p,j); /* j could be 0 */ |
891 | } | 889 | } |
892 | p += j; | 890 | p += j; |
893 | c = ssl_get_cipher_by_char(s, p); | 891 | c = ssl3_get_cipher_by_char(p); |
894 | if (c == NULL) { | 892 | if (c == NULL) { |
895 | /* unknown cipher */ | 893 | /* unknown cipher */ |
896 | al = SSL_AD_ILLEGAL_PARAMETER; | 894 | al = SSL_AD_ILLEGAL_PARAMETER; |
@@ -906,7 +904,7 @@ ssl3_get_server_hello(SSL *s) | |||
906 | SSL_R_WRONG_CIPHER_RETURNED); | 904 | SSL_R_WRONG_CIPHER_RETURNED); |
907 | goto f_err; | 905 | goto f_err; |
908 | } | 906 | } |
909 | p += ssl_put_cipher_by_char(s, NULL, NULL); | 907 | p += ssl3_put_cipher_by_char(NULL, NULL); |
910 | 908 | ||
911 | sk = ssl_get_ciphers_by_id(s); | 909 | sk = ssl_get_ciphers_by_id(s); |
912 | i = sk_SSL_CIPHER_find(sk, c); | 910 | i = sk_SSL_CIPHER_find(sk, c); |