From cdc0e904c0db18d8a94dbc75555c41585f6a7867 Mon Sep 17 00:00:00 2001 From: jsing <> Date: Sun, 10 Aug 2014 14:42:56 +0000 Subject: 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. --- src/lib/libssl/s3_clnt.c | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) (limited to 'src/lib/libssl/s3_clnt.c') 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 @@ -/* $OpenBSD: s3_clnt.c,v 1.85 2014/08/07 01:24:10 deraadt Exp $ */ +/* $OpenBSD: s3_clnt.c,v 1.86 2014/08/10 14:42:56 jsing Exp $ */ /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) * All rights reserved. * @@ -183,8 +183,6 @@ const SSL_METHOD SSLv3_client_method_data = { .ssl_dispatch_alert = ssl3_dispatch_alert, .ssl_ctrl = ssl3_ctrl, .ssl_ctx_ctrl = ssl3_ctx_ctrl, - .get_cipher_by_char = ssl3_get_cipher_by_char, - .put_cipher_by_char = ssl3_put_cipher_by_char, .ssl_pending = ssl3_pending, .num_ciphers = ssl3_num_ciphers, .get_cipher = ssl3_get_cipher, @@ -719,7 +717,7 @@ ssl3_client_hello(SSL *s) } /* Ciphers supported */ - i = ssl_cipher_list_to_bytes(s, SSL_get_ciphers(s), &(p[2]), 0); + i = ssl_cipher_list_to_bytes(s, SSL_get_ciphers(s), &p[2]); if (i == 0) { SSLerr(SSL_F_SSL3_CLIENT_HELLO, SSL_R_NO_CIPHERS_AVAILABLE); @@ -856,7 +854,7 @@ ssl3_get_server_hello(SSL *s) &s->session->master_key_length, NULL, &pref_cipher, s->tls_session_secret_cb_arg)) { s->session->cipher = pref_cipher ? - pref_cipher : ssl_get_cipher_by_char(s, p + j); + pref_cipher : ssl3_get_cipher_by_char(p + j); s->s3->flags |= SSL3_FLAGS_CCS_OK; } } @@ -890,7 +888,7 @@ ssl3_get_server_hello(SSL *s) memcpy(s->session->session_id,p,j); /* j could be 0 */ } p += j; - c = ssl_get_cipher_by_char(s, p); + c = ssl3_get_cipher_by_char(p); if (c == NULL) { /* unknown cipher */ al = SSL_AD_ILLEGAL_PARAMETER; @@ -906,7 +904,7 @@ ssl3_get_server_hello(SSL *s) SSL_R_WRONG_CIPHER_RETURNED); goto f_err; } - p += ssl_put_cipher_by_char(s, NULL, NULL); + p += ssl3_put_cipher_by_char(NULL, NULL); sk = ssl_get_ciphers_by_id(s); i = sk_SSL_CIPHER_find(sk, c); -- cgit v1.2.3-55-g6feb