diff options
author | jsing <> | 2020-05-10 14:17:48 +0000 |
---|---|---|
committer | jsing <> | 2020-05-10 14:17:48 +0000 |
commit | 2c5bb57394ae3bd0d749e60f9e5489396e6f7d75 (patch) | |
tree | b66a408927dda1a4853152273bf1767b1576d8e2 /src/lib/libssl/ssl_locl.h | |
parent | 460f8be5c360d203bab35f98b05092261d9701b0 (diff) | |
download | openbsd-2c5bb57394ae3bd0d749e60f9e5489396e6f7d75.tar.gz openbsd-2c5bb57394ae3bd0d749e60f9e5489396e6f7d75.tar.bz2 openbsd-2c5bb57394ae3bd0d749e60f9e5489396e6f7d75.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 'src/lib/libssl/ssl_locl.h')
-rw-r--r-- | src/lib/libssl/ssl_locl.h | 5 |
1 files changed, 3 insertions, 2 deletions
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 @@ | |||
1 | /* $OpenBSD: ssl_locl.h,v 1.272 2020/04/18 14:07:56 jsing Exp $ */ | 1 | /* $OpenBSD: ssl_locl.h,v 1.273 2020/05/10 14:17:47 jsing Exp $ */ |
2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) | 2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) |
3 | * All rights reserved. | 3 | * All rights reserved. |
4 | * | 4 | * |
@@ -747,9 +747,10 @@ typedef struct ssl_internal_st { | |||
747 | /* OCSP status request only */ | 747 | /* OCSP status request only */ |
748 | STACK_OF(OCSP_RESPID) *tlsext_ocsp_ids; | 748 | STACK_OF(OCSP_RESPID) *tlsext_ocsp_ids; |
749 | X509_EXTENSIONS *tlsext_ocsp_exts; | 749 | X509_EXTENSIONS *tlsext_ocsp_exts; |
750 | |||
750 | /* OCSP response received or to be sent */ | 751 | /* OCSP response received or to be sent */ |
751 | unsigned char *tlsext_ocsp_resp; | 752 | unsigned char *tlsext_ocsp_resp; |
752 | int tlsext_ocsp_resplen; | 753 | size_t tlsext_ocsp_resp_len; |
753 | 754 | ||
754 | /* RFC4507 session ticket expected to be received or sent */ | 755 | /* RFC4507 session ticket expected to be received or sent */ |
755 | int tlsext_ticket_expected; | 756 | int tlsext_ticket_expected; |