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/ssl_locl.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/lib/libssl/ssl_locl.h') diff --git a/src/lib/libssl/ssl_locl.h b/src/lib/libssl/ssl_locl.h index 0212166678..e222348ea9 100644 --- a/src/lib/libssl/ssl_locl.h +++ b/src/lib/libssl/ssl_locl.h @@ -1,4 +1,4 @@ -/* $OpenBSD: ssl_locl.h,v 1.272 2020/04/18 14:07:56 jsing Exp $ */ +/* $OpenBSD: ssl_locl.h,v 1.273 2020/05/10 14:17:47 jsing Exp $ */ /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) * All rights reserved. * @@ -747,9 +747,10 @@ typedef struct ssl_internal_st { /* OCSP status request only */ STACK_OF(OCSP_RESPID) *tlsext_ocsp_ids; X509_EXTENSIONS *tlsext_ocsp_exts; + /* OCSP response received or to be sent */ unsigned char *tlsext_ocsp_resp; - int tlsext_ocsp_resplen; + size_t tlsext_ocsp_resp_len; /* RFC4507 session ticket expected to be received or sent */ int tlsext_ticket_expected; -- cgit v1.2.3-55-g6feb