openssl/ssl
Maxim Masiutin 62f27ab9dc TLS AEAD ciphers: more bytes for key_block than needed
Fixes #12007
The key_block length was not written to trace, thus it was not obvious
that extra key_bytes were generated for TLS AEAD.

The problem was that EVP_CIPHER_iv_length was called even for AEAD ciphers
to figure out how many bytes from the key_block were needed for the IV.
The correct way was to take cipher mode (GCM, CCM, etc) into
consideration rather than simply callin the general function
EVP_CIPHER_iv_length.

The new function tls_iv_length_within_key_block takes this into
consideration.

Besides that, the order of addendums was counter-intuitive MAC length
was second, but it have to be first to correspond the order given in the RFC.

Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Tomas Mraz <tmraz@fedoraproject.org>
(Merged from https://github.com/openssl/openssl/pull/13035)
2020-10-02 08:49:47 +02:00
..
record
statem Run the withlibctx.pl script 2020-10-01 09:25:20 +01:00
bio_ssl.c
build.info
d1_lib.c
d1_msg.c
d1_srtp.c
ktls.c
methods.c
pqueue.c
s3_cbc.c
s3_enc.c
s3_lib.c optimise ssl3_get_cipher_by_std_name() 2020-09-27 21:09:54 +03:00
s3_msg.c
ssl_asn1.c
ssl_cert_table.h
ssl_cert.c Run the withlibctx.pl script 2020-10-01 09:25:20 +01:00
ssl_ciph.c Ignore unused return values from some sk_*() macros 2020-09-13 11:11:57 +01:00
ssl_conf.c Run the withlibctx.pl script 2020-10-01 09:25:20 +01:00
ssl_err.c
ssl_init.c
ssl_lib.c Run the withlibctx.pl script 2020-10-01 09:25:20 +01:00
ssl_local.h Increase PSK_MAX_PSK_LEN to 512 2020-09-21 10:26:08 +02:00
ssl_mcnf.c
ssl_rsa.c Run the withlibctx.pl script 2020-10-01 09:25:20 +01:00
ssl_sess.c Fix safestack issues in x509.h 2020-09-13 11:09:45 +01:00
ssl_stat.c
ssl_txt.c
ssl_utst.c
t1_enc.c TLS AEAD ciphers: more bytes for key_block than needed 2020-10-02 08:49:47 +02:00
t1_lib.c Fix ssl_hmac_new() so that it uses the propq 2020-09-23 17:31:40 +10:00
t1_trce.c
tls13_enc.c
tls_srp.c