From d01f36627de39df35d37b5b5eb0190e03796fb4b Mon Sep 17 00:00:00 2001 From: jsing <> Date: Mon, 22 Apr 2019 15:12:20 +0000 Subject: Pass the session ID down to the session/ticket handling code as a CBS. Convert ssl_get_prev_session(), tls1_process_ticket() and tls1_decrypt_ticket() to handle the session ID from the client hello as a CBS. While here also swap the order of arguments for tls1_decrypt_ticket() so that it is consistent with the other functions. ok tb@ --- src/lib/libssl/ssl_locl.h | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'src/lib/libssl/ssl_locl.h') diff --git a/src/lib/libssl/ssl_locl.h b/src/lib/libssl/ssl_locl.h index b895de1fd3..c3c762a5fa 100644 --- a/src/lib/libssl/ssl_locl.h +++ b/src/lib/libssl/ssl_locl.h @@ -1,4 +1,4 @@ -/* $OpenBSD: ssl_locl.h,v 1.246 2019/04/22 14:49:42 jsing Exp $ */ +/* $OpenBSD: ssl_locl.h,v 1.247 2019/04/22 15:12:20 jsing Exp $ */ /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) * All rights reserved. * @@ -1096,8 +1096,7 @@ int ssl_cert_add1_chain_cert(CERT *c, X509 *cert); SESS_CERT *ssl_sess_cert_new(void); void ssl_sess_cert_free(SESS_CERT *sc); int ssl_get_new_session(SSL *s, int session); -int ssl_get_prev_session(SSL *s, const unsigned char *session_id, - int session_id_len, CBS *ext_block); +int ssl_get_prev_session(SSL *s, CBS *session_id, CBS *ext_block); int ssl_cipher_id_cmp(const SSL_CIPHER *a, const SSL_CIPHER *b); SSL_CIPHER *OBJ_bsearch_ssl_cipher_id(SSL_CIPHER *key, SSL_CIPHER const *base, int num); @@ -1327,8 +1326,8 @@ int ssl_check_clienthello_tlsext_early(SSL *s); int ssl_check_clienthello_tlsext_late(SSL *s); int ssl_check_serverhello_tlsext(SSL *s); -int tls1_process_ticket(SSL *s, const unsigned char *session_id, - int session_id_len, CBS *ext_block, SSL_SESSION **ret); +int tls1_process_ticket(SSL *s, CBS *session_id, CBS *ext_block, + SSL_SESSION **ret); long ssl_get_algorithm2(SSL *s); -- cgit v1.2.3-55-g6feb