summaryrefslogtreecommitdiffstats
path: root/lib/libssl/tls13_lib.c
diff options
context:
space:
mode:
authorjsing <jsing@openbsd.org>2020-05-10 14:17:47 +0000
committerjsing <jsing@openbsd.org>2020-05-10 14:17:47 +0000
commitd875fefd47f9f124550eb48e77679245674fcaf2 (patch)
treefcfeb9eadf343cff3d2ae0611d3dbbe62c0ab100 /lib/libssl/tls13_lib.c
parentOnly reset TLS extension state when parsing client hello or server hello. (diff)
downloadwireguard-openbsd-d875fefd47f9f124550eb48e77679245674fcaf2.tar.xz
wireguard-openbsd-d875fefd47f9f124550eb48e77679245674fcaf2.zip
Use size_t for OCSP response length.
The OCSP response length is currently an integer, which is overloaded with -1 meaning "unset". Use a size_t for the OCSP response length and infer unset from the OCSP response being NULL. This makes code more readable, simpler and less error prone. ok beck@
Diffstat (limited to 'lib/libssl/tls13_lib.c')
-rw-r--r--lib/libssl/tls13_lib.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/libssl/tls13_lib.c b/lib/libssl/tls13_lib.c
index ad78d5b597b..29c81afba3c 100644
--- a/lib/libssl/tls13_lib.c
+++ b/lib/libssl/tls13_lib.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: tls13_lib.c,v 1.39 2020/05/10 14:03:14 jsing Exp $ */
+/* $OpenBSD: tls13_lib.c,v 1.40 2020/05/10 14:17:48 jsing Exp $ */
/*
* Copyright (c) 2018, 2019 Joel Sing <jsing@openbsd.org>
* Copyright (c) 2019 Bob Beck <beck@openbsd.org>
@@ -170,7 +170,7 @@ tls13_legacy_ocsp_status_recv_cb(void *arg)
int ret;
if (s->ctx->internal->tlsext_status_cb == NULL ||
- s->internal->tlsext_ocsp_resplen == -1)
+ s->internal->tlsext_ocsp_resp == NULL)
return 1;
ret = s->ctx->internal->tlsext_status_cb(s,