summaryrefslogtreecommitdiff
path: root/src/lib/libssl/s3_cbc.c
diff options
context:
space:
mode:
authorjsing <>2020-03-12 17:09:02 +0000
committerjsing <>2020-03-12 17:09:02 +0000
commit8a5e591492888ac3f5e804aaef546ffe93f39818 (patch)
tree61a0513c2ec7ebe3d441481d66f9efe8b9bba584 /src/lib/libssl/s3_cbc.c
parentcf38ddcaf43a2f6fd1de2405aa74feca6523733c (diff)
downloadopenbsd-8a5e591492888ac3f5e804aaef546ffe93f39818.tar.gz
openbsd-8a5e591492888ac3f5e804aaef546ffe93f39818.tar.bz2
openbsd-8a5e591492888ac3f5e804aaef546ffe93f39818.zip
Stop overloading the record type for padding length.
Currently the CBC related code stuffs the padding length in the upper bits of the type field... stop doing that and add a padding_length field to the record struct instead. ok inoguchi@ tb@
Diffstat (limited to 'src/lib/libssl/s3_cbc.c')
-rw-r--r--src/lib/libssl/s3_cbc.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/lib/libssl/s3_cbc.c b/src/lib/libssl/s3_cbc.c
index 371c68cfcc..8ae87d7303 100644
--- a/src/lib/libssl/s3_cbc.c
+++ b/src/lib/libssl/s3_cbc.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: s3_cbc.c,v 1.19 2020/03/12 17:01:53 jsing Exp $ */ 1/* $OpenBSD: s3_cbc.c,v 1.20 2020/03/12 17:09:02 jsing Exp $ */
2/* ==================================================================== 2/* ====================================================================
3 * Copyright (c) 2012 The OpenSSL Project. All rights reserved. 3 * Copyright (c) 2012 The OpenSSL Project. All rights reserved.
4 * 4 *
@@ -169,7 +169,7 @@ tls1_cbc_remove_padding(const SSL* s, SSL3_RECORD_INTERNAL *rec,
169 169
170 padding_length = good & (padding_length + 1); 170 padding_length = good & (padding_length + 1);
171 rec->length -= padding_length; 171 rec->length -= padding_length;
172 rec->type |= padding_length<<8; /* kludge: pass padding length */ 172 rec->padding_length = padding_length;
173 173
174 return (int)((good & 1) | (~good & -1)); 174 return (int)((good & 1) | (~good & -1));
175} 175}