diff options
| author | jsing <> | 2020-05-10 14:17:48 +0000 |
|---|---|---|
| committer | jsing <> | 2020-05-10 14:17:48 +0000 |
| commit | 4749b6f55a603d6923ae5901d112961ff3c56b38 (patch) | |
| tree | b66a408927dda1a4853152273bf1767b1576d8e2 /src/lib/libssl/ssl_lib.c | |
| parent | 81c0dc68dcd1bad4e24db7fee4739e273ac59ca1 (diff) | |
| download | openbsd-4749b6f55a603d6923ae5901d112961ff3c56b38.tar.gz openbsd-4749b6f55a603d6923ae5901d112961ff3c56b38.tar.bz2 openbsd-4749b6f55a603d6923ae5901d112961ff3c56b38.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 '')
| -rw-r--r-- | src/lib/libssl/ssl_lib.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/lib/libssl/ssl_lib.c b/src/lib/libssl/ssl_lib.c index 0c9b90be85..1c4ab636a1 100644 --- a/src/lib/libssl/ssl_lib.c +++ b/src/lib/libssl/ssl_lib.c | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | /* $OpenBSD: ssl_lib.c,v 1.212 2020/03/16 15:25:14 tb Exp $ */ | 1 | /* $OpenBSD: ssl_lib.c,v 1.213 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 | * |
| @@ -299,7 +299,7 @@ SSL_new(SSL_CTX *ctx) | |||
| 299 | s->internal->tlsext_ocsp_ids = NULL; | 299 | s->internal->tlsext_ocsp_ids = NULL; |
| 300 | s->internal->tlsext_ocsp_exts = NULL; | 300 | s->internal->tlsext_ocsp_exts = NULL; |
| 301 | s->internal->tlsext_ocsp_resp = NULL; | 301 | s->internal->tlsext_ocsp_resp = NULL; |
| 302 | s->internal->tlsext_ocsp_resplen = -1; | 302 | s->internal->tlsext_ocsp_resp_len = 0; |
| 303 | CRYPTO_add(&ctx->references, 1, CRYPTO_LOCK_SSL_CTX); | 303 | CRYPTO_add(&ctx->references, 1, CRYPTO_LOCK_SSL_CTX); |
| 304 | s->initial_ctx = ctx; | 304 | s->initial_ctx = ctx; |
| 305 | 305 | ||
