diff options
author | 2020-01-23 10:48:37 +0000 | |
---|---|---|
committer | 2020-01-23 10:48:37 +0000 | |
commit | dc77a1b6be2178ef3b10b1095ac8144db9bc6da5 (patch) | |
tree | e14cb0d1811858e59df6e7e89adbb9434bcec02d /lib/libssl/ssl_both.c | |
parent | Implement sending client certificate requests for 1.3 server (diff) | |
download | wireguard-openbsd-dc77a1b6be2178ef3b10b1095ac8144db9bc6da5.tar.xz wireguard-openbsd-dc77a1b6be2178ef3b10b1095ac8144db9bc6da5.zip |
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@
Diffstat (limited to 'lib/libssl/ssl_both.c')
-rw-r--r-- | lib/libssl/ssl_both.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/lib/libssl/ssl_both.c b/lib/libssl/ssl_both.c index 6bd5f08111a..8ec94542c22 100644 --- a/lib/libssl/ssl_both.c +++ b/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)) { |