diff options
author | Joel Sing <jsing@cvs.openbsd.org> | 2021-07-19 08:39:29 +0000 |
---|---|---|
committer | Joel Sing <jsing@cvs.openbsd.org> | 2021-07-19 08:39:29 +0000 |
commit | 3b39938ee9030ed211d57467de9b9cd7f95c1109 (patch) | |
tree | 2054ec008a565cb637ee567131361223e748a667 /lib/libssl/d1_pkt.c | |
parent | 734e9a77421fce4a6415a5e853e30cd071ae9446 (diff) |
Inline DTLS1_CCS_HEADER_LENGTH rather than having a single use variable.
ok tb@
Diffstat (limited to 'lib/libssl/d1_pkt.c')
-rw-r--r-- | lib/libssl/d1_pkt.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/lib/libssl/d1_pkt.c b/lib/libssl/d1_pkt.c index 17be6dd182d..36dd2557227 100644 --- a/lib/libssl/d1_pkt.c +++ b/lib/libssl/d1_pkt.c @@ -1,4 +1,4 @@ -/* $OpenBSD: d1_pkt.c,v 1.99 2021/06/19 17:21:39 jsing Exp $ */ +/* $OpenBSD: d1_pkt.c,v 1.100 2021/07/19 08:39:28 jsing Exp $ */ /* * DTLS implementation written by Nagendra Modadugu * (nagendra@cs.stanford.edu) for the OpenSSL project 2005. @@ -836,14 +836,13 @@ dtls1_read_bytes(SSL *s, int type, unsigned char *buf, int len, int peek) if (rr->type == SSL3_RT_CHANGE_CIPHER_SPEC) { struct ccs_header_st ccs_hdr; - unsigned int ccs_hdr_len = DTLS1_CCS_HEADER_LENGTH; dtls1_get_ccs_header(rr->data, &ccs_hdr); /* 'Change Cipher Spec' is just a single byte, so we know * exactly what the record payload has to look like */ /* XDTLS: check that epoch is consistent */ - if ((rr->length != ccs_hdr_len) || + if ((rr->length != DTLS1_CCS_HEADER_LENGTH) || (rr->off != 0) || (rr->data[0] != SSL3_MT_CCS)) { al = SSL_AD_DECODE_ERROR; SSLerror(s, SSL_R_BAD_CHANGE_CIPHER_SPEC); |