summaryrefslogtreecommitdiffstats
path: root/util
diff options
context:
space:
mode:
authorMatt Caswell <matt@openssl.org>2017-03-13 15:21:15 +0000
committerMatt Caswell <matt@openssl.org>2017-03-16 14:20:38 +0000
commit11c67eeaf4dd0376d84a90590e307d5d2e12f025 (patch)
tree3e7903a8c70b6ad63d33be996548251ce439014f /util
parent9e0ac6a2f1237ab72f0f26a032199864c7b71f2e (diff)
HelloRetryRequest updates for draft-19
Draft-19 changes the HRR transcript hash so that the initial ClientHello is replaced in the transcript with a special synthetic message_hash message that just contains a hash of ClientHello1 as its message body. Reviewed-by: Rich Salz <rsalz@openssl.org> (Merged from https://github.com/openssl/openssl/pull/2895)
Diffstat (limited to 'util')
-rw-r--r--util/TLSProxy/HelloRetryRequest.pm13
1 files changed, 13 insertions, 0 deletions
diff --git a/util/TLSProxy/HelloRetryRequest.pm b/util/TLSProxy/HelloRetryRequest.pm
index a15c05463d..94fe4ee802 100644
--- a/util/TLSProxy/HelloRetryRequest.pm
+++ b/util/TLSProxy/HelloRetryRequest.pm
@@ -47,6 +47,9 @@ sub parse
$server_version = TLSProxy::Record::VERS_TLS_1_3;
}
+ my $ciphersuite = unpack('n', substr($self->data, $ptr));
+ $ptr += 2;
+
my $extensions_len = unpack('n', substr($self->data, $ptr));
if (!defined $extensions_len) {
$extensions_len = 0;
@@ -75,6 +78,7 @@ sub parse
}
$self->server_version($server_version);
+ $self->ciphersuite($ciphersuite);
$self->extension_data(\%extensions);
print " Extensions Len:".$extensions_len."\n";
@@ -100,6 +104,7 @@ sub set_message_contents
}
$data = pack('n', $self->server_version);
+ $data .= pack('n', $self->ciphersuite);
$data .= pack('n', length($extensions));
$data .= $extensions;
$self->data($data);
@@ -114,6 +119,14 @@ sub server_version
}
return $self->{server_version};
}
+sub ciphersuite
+{
+ my $self = shift;
+ if (@_) {
+ $self->{ciphersuite} = shift;
+ }
+ return $self->{ciphersuite};
+}
sub extension_data
{
my $self = shift;