From f6cad3f00ad53e59ae0066a0554855dba18b6a13 Mon Sep 17 00:00:00 2001 From: jsing <> Date: Thu, 23 Jan 2020 10:48:37 +0000 Subject: Remove the ssl_get_message function pointer from SSL_METHOD_INTERNAL. ssl_get_message is essentially a switch between ssl3_get_message and dtls1_get_message, both only used by the legacy stack. Instead, use SSL_IS_DTLS() in ssl3_get_message to call the DTLS function when necessary. ok beck@ inoguchi@ tb@ --- src/lib/libssl/ssl_both.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'src/lib/libssl/ssl_both.c') diff --git a/src/lib/libssl/ssl_both.c b/src/lib/libssl/ssl_both.c index 6bd5f08111..8ec94542c2 100644 --- a/src/lib/libssl/ssl_both.c +++ b/src/lib/libssl/ssl_both.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ssl_both.c,v 1.15 2019/03/25 16:35:48 jsing Exp $ */ +/* $OpenBSD: ssl_both.c,v 1.16 2020/01/23 10:48:37 jsing Exp $ */ /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) * All rights reserved. * @@ -248,7 +248,7 @@ ssl3_get_finished(SSL *s, int a, int b) CBS cbs; /* should actually be 36+4 :-) */ - n = s->method->internal->ssl_get_message(s, a, b, SSL3_MT_FINISHED, 64, &ok); + n = ssl3_get_message(s, a, b, SSL3_MT_FINISHED, 64, &ok); if (!ok) return ((int)n); @@ -447,6 +447,9 @@ ssl3_get_message(SSL *s, int st1, int stn, int mt, long max, int *ok) CBS cbs; uint8_t u8; + if (SSL_IS_DTLS(s)) + return (dtls1_get_message(s, st1, stn, mt, max, ok)); + if (S3I(s)->tmp.reuse_message) { S3I(s)->tmp.reuse_message = 0; if ((mt >= 0) && (S3I(s)->tmp.message_type != mt)) { -- cgit v1.2.3-55-g6feb