diff options
author | 2020-05-10 14:17:47 +0000 | |
---|---|---|
committer | 2020-05-10 14:17:47 +0000 | |
commit | d875fefd47f9f124550eb48e77679245674fcaf2 (patch) | |
tree | fcfeb9eadf343cff3d2ae0611d3dbbe62c0ab100 /lib/libssl/tls13_lib.c | |
parent | Only reset TLS extension state when parsing client hello or server hello. (diff) | |
download | wireguard-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.c | 4 |
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, |