-# Copyright 2016 The OpenSSL Project Authors. All Rights Reserved.
+# Copyright 2016-2018 The OpenSSL Project Authors. All Rights Reserved.
#
# Licensed under the OpenSSL license (the "License"). You may not use
# this file except in compliance with the License. You can obtain a copy
use constant {
VERS_TLS_1_4 => 0x0305,
- VERS_TLS_1_3_DRAFT => 0x7f16,
+ VERS_TLS_1_3_DRAFT => 0x7f17,
VERS_TLS_1_3 => 0x0304,
VERS_TLS_1_2 => 0x0303,
VERS_TLS_1_1 => 0x0302,
substr($packet, TLS_RECORD_HEADER_LENGTH, $len_real)
);
- if (!TLSProxy::Proxy->is_tls13() || $content_type != RT_CCS) {
+ if ($content_type != RT_CCS) {
if (($server && $server_encrypting)
|| (!$server && $client_encrypting)) {
if (!TLSProxy::Proxy->is_tls13() && $etm) {
$record->decrypt();
}
$record->encrypted(1);
- }
- if (TLSProxy::Proxy->is_tls13()) {
- print " Inner content type: "
- .$record_type{$record->content_type()}."\n";
+ if (TLSProxy::Proxy->is_tls13()) {
+ print " Inner content type: "
+ .$record_type{$record->content_type()}."\n";
+ }
}
}
my $self = shift;
my $server = shift;
my $data;
- my $tls13_enc = 0;
if ($self->sslv2) {
$data = pack('n', $self->len | 0x8000);
} else {
if (TLSProxy::Proxy->is_tls13() && $self->encrypted) {
$data = pack('Cnn', $self->outer_content_type, $self->version,
- $self->len + 1);
- $tls13_enc = 1;
+ $self->len);
} else {
$data = pack('Cnn', $self->content_type, $self->version,
$self->len);
}
$data .= $self->data;
- if ($tls13_enc) {
- $data .= pack('C', $self->content_type);
- }
-
return $data;
}