summaryrefslogtreecommitdiffstats
path: root/lib/libssl/t1_lib.c
diff options
context:
space:
mode:
authorjsing <jsing@openbsd.org>2016-12-18 13:52:53 +0000
committerjsing <jsing@openbsd.org>2016-12-18 13:52:53 +0000
commit8894004c44314e5ce071eeaa644c65d85d87eb40 (patch)
tree33df4542db3b894188c94102ab7501ada5d8c9e3 /lib/libssl/t1_lib.c
parentRemove duplicated lines of code introduced in my previous tcpdump commit. (diff)
downloadwireguard-openbsd-8894004c44314e5ce071eeaa644c65d85d87eb40.tar.xz
wireguard-openbsd-8894004c44314e5ce071eeaa644c65d85d87eb40.zip
Convert ssl3_get_server_hello() to CBS.
ok doug@
Diffstat (limited to 'lib/libssl/t1_lib.c')
-rw-r--r--lib/libssl/t1_lib.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/lib/libssl/t1_lib.c b/lib/libssl/t1_lib.c
index 090259cf1f2..0a5958341b7 100644
--- a/lib/libssl/t1_lib.c
+++ b/lib/libssl/t1_lib.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: t1_lib.c,v 1.94 2016/11/05 08:26:37 jsing Exp $ */
+/* $OpenBSD: t1_lib.c,v 1.95 2016/12/18 13:52:53 jsing Exp $ */
/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
* All rights reserved.
*
@@ -1607,14 +1607,13 @@ ssl_next_proto_validate(const unsigned char *d, unsigned int len)
}
int
-ssl_parse_serverhello_tlsext(SSL *s, unsigned char **p, unsigned char *d,
- int n, int *al)
+ssl_parse_serverhello_tlsext(SSL *s, unsigned char **p, size_t n, int *al)
{
unsigned short type;
unsigned short size;
unsigned short len;
unsigned char *data = *p;
- unsigned char *end = d + n;
+ unsigned char *end = *p + n;
int tlsext_servername = 0;
int renegotiate_seen = 0;
@@ -1790,7 +1789,7 @@ ssl_parse_serverhello_tlsext(SSL *s, unsigned char **p, unsigned char *d,
}
- if (data != d + n) {
+ if (data != end) {
*al = SSL_AD_DECODE_ERROR;
return 0;
}