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_srvr.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_srvr.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/lib/libssl/ssl_srvr.c b/src/lib/libssl/ssl_srvr.c index 72419dcf3a..e78099cdad 100644 --- a/src/lib/libssl/ssl_srvr.c +++ b/src/lib/libssl/ssl_srvr.c | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | /* $OpenBSD: ssl_srvr.c,v 1.74 2020/05/09 13:51:44 tb Exp $ */ | 1 | /* $OpenBSD: ssl_srvr.c,v 1.75 2020/05/10 14:17:48 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 | * |
| @@ -2624,7 +2624,7 @@ ssl3_send_cert_status(SSL *s) | |||
| 2624 | if (!CBB_add_u24_length_prefixed(&certstatus, &ocspresp)) | 2624 | if (!CBB_add_u24_length_prefixed(&certstatus, &ocspresp)) |
| 2625 | goto err; | 2625 | goto err; |
| 2626 | if (!CBB_add_bytes(&ocspresp, s->internal->tlsext_ocsp_resp, | 2626 | if (!CBB_add_bytes(&ocspresp, s->internal->tlsext_ocsp_resp, |
| 2627 | s->internal->tlsext_ocsp_resplen)) | 2627 | s->internal->tlsext_ocsp_resp_len)) |
| 2628 | goto err; | 2628 | goto err; |
| 2629 | if (!ssl3_handshake_msg_finish(s, &cbb)) | 2629 | if (!ssl3_handshake_msg_finish(s, &cbb)) |
| 2630 | goto err; | 2630 | goto err; |
