From 2c5bb57394ae3bd0d749e60f9e5489396e6f7d75 Mon Sep 17 00:00:00 2001 From: jsing <> Date: Sun, 10 May 2020 14:17:48 +0000 Subject: 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@ --- src/lib/libssl/tls13_lib.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/lib/libssl/tls13_lib.c') diff --git a/src/lib/libssl/tls13_lib.c b/src/lib/libssl/tls13_lib.c index ad78d5b597..29c81afba3 100644 --- a/src/lib/libssl/tls13_lib.c +++ b/src/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 * Copyright (c) 2019 Bob Beck @@ -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, -- cgit v1.2.3-55-g6feb