libtls: Allow tls_aead_t to change the content type
The actual content type is encrypted with TLS 1.3, the type in the record header is always Application Data.
This commit is contained in:
@@ -76,7 +76,7 @@ METHOD(tls_protection_t, process, status_t,
|
||||
if (this->aead_in)
|
||||
{
|
||||
if (!this->aead_in->decrypt(this->aead_in, this->version,
|
||||
type, this->seq_in, &data))
|
||||
&type, this->seq_in, &data))
|
||||
{
|
||||
DBG1(DBG_TLS, "TLS record decryption failed");
|
||||
this->alert->add(this->alert, TLS_FATAL, TLS_BAD_RECORD_MAC);
|
||||
@@ -111,7 +111,7 @@ METHOD(tls_protection_t, build, status_t,
|
||||
if (this->aead_out)
|
||||
{
|
||||
if (!this->aead_out->encrypt(this->aead_out, this->version,
|
||||
*type, this->seq_out, data))
|
||||
type, this->seq_out, data))
|
||||
{
|
||||
DBG1(DBG_TLS, "TLS record encryption failed");
|
||||
chunk_free(data);
|
||||
|
||||
Reference in New Issue
Block a user