openssl/util
Matt Caswell 6c61b27496 Remove a spurious TLSProxy byte in TLSv1.3
When the proxy re-encrypted a TLSv1.3 record it was adding a spurious
byte onto the end. This commit removes that.

The "extra" byte was intended to be the inner content type of the record.
However, TLSProxy was actually adding the original encrypted data into the
record (which already has the inner content type in it) and then adding
the spurious additional content type byte on the end (and adjusting the
record length accordingly).

It is interesting to look at why this didn't cause a failure:

The receiving peer first attempts to decrypt the data. Because this is
TLSProxy we always use a GCM based ciphersuite with a 16 byte tag. When
we decrypt this it actually gets diverted to the ossltest engine. All this
does is go through the motions of encrypting/decrypting but just passes
back the original data. Crucially it will never fail because of a bad tag!
The receiving party thinks the spurious additional byte is part of the
tag and the ossltest engine ignores it.

This means the data that gets passed back to the record layer still has
an additional spurious byte on it - but because the 16 byte tag has been
removed, this is actually the first byte of the original tag. Again
because we are using ossltest engine we aren't actually creating "real"
tags - we only ever emit 16, 0 bytes for the tag. So the spurious
additional byte always has the value 0. The TLSv1.3 spec says that records
can have additional 0 bytes on the end of them - this is "padding". So the
record layer interprets this 0 byte as padding and strips it off to end up
with the originally transmitted record data - which it can now process
successfully.

Reviewed-by: Bernd Edlinger <bernd.edlinger@hotmail.de>
(Merged from https://github.com/openssl/openssl/pull/5370)
2018-02-21 11:07:34 +00:00
..
perl Remove a spurious TLSProxy byte in TLSv1.3 2018-02-21 11:07:34 +00:00
build.info VMS: throw away [.util]shareable_image_wrap.c.in and add replacement scripts 2017-03-14 22:27:17 +01:00
ck_errf.pl Perltidy ck_errf 2017-05-03 14:16:58 -04:00
copy.pl util/copy.pl: work around glob quirk in some of earlier 5.1x Perl versions. 2017-11-10 09:39:29 +01:00
dofile.pl Many spelling fixes/typo's corrected. 2017-11-11 19:03:10 -05:00
find-doc-nits Copyright update of more files that have changed this year 2018-01-19 13:34:03 +01:00
find-unused-errs Add -f -r flags to find-unused-errs 2017-04-16 07:57:12 -04:00
indent.pro Fix invalid function type casts. 2017-12-15 19:33:48 +01:00
libcrypto.num Add BIO_bind function to bind local address for a socket. 2018-02-19 22:58:37 +01:00
libssl.num Add TLSv1.3 post-handshake authentication (PHA) 2018-02-01 17:07:56 +00:00
local_shlib.com.in VMS: don't use /DSF, turn off CALL_DEBUG instead 2017-03-15 03:09:57 +01:00
mkbuildinf.pl Fix SOURCE_DATE_EPOCH bug; use UTC 2017-11-27 14:34:14 -05:00
mkdef.pl util/mkdef.pl: use better array in search of 'DEPRECATEDIN_' 2018-02-08 12:33:08 +01:00
mkdir-p.pl utils/mkdir-p: check if dir exists also after mkdir failed 2016-06-23 11:10:29 -04:00
mkerr.pl Small simplification in mkerr.pl 2018-02-09 07:04:32 -05:00
mkrc.pl Fix curly braces on util/mkrc.pl 2017-05-03 14:16:58 -04:00
openssl-format-source Fix some Typos and indents 2017-08-11 10:16:33 -04:00
openssl-update-copyright Enhance util/openssl-update-copyright shell script 2018-01-10 18:23:28 +01:00
opensslwrap.sh opensslwrap.sh to respect $OPENSSL_ENGINES. 2006-12-29 15:00:36 +00:00
private.num Add accessors for AdmissionSyntax 2018-01-22 11:29:52 -05:00
process_docs.pl Additional name for all commands 2017-10-18 15:33:56 -04:00
shlib_wrap.sh.in Remove automatic RPATH - adapt shlib_wrap.sh 2016-10-13 02:21:51 +02:00
su-filter.pl Remove trailing whitespace from some files. 2016-10-10 23:36:21 +01:00
unlocal_shlib.com.in VMS: don't use /DSF, turn off CALL_DEBUG instead 2017-03-15 03:09:57 +01:00