TLSProxy update
Add function to delete extensions and fix ClientHello repacking. Reviewed-by: Matt Caswell <matt@openssl.org>
This commit is contained in:
parent
4160936143
commit
040c878350
@ -169,6 +169,7 @@ sub set_message_contents
|
||||
{
|
||||
my $self = shift;
|
||||
my $data;
|
||||
my $extensions = "";
|
||||
|
||||
$data = pack('n', $self->client_version);
|
||||
$data .= $self->random;
|
||||
@ -178,14 +179,17 @@ sub set_message_contents
|
||||
$data .= pack("n*", @{$self->ciphersuites});
|
||||
$data .= pack('C', $self->comp_meth_len);
|
||||
$data .= pack("C*", @{$self->comp_meths});
|
||||
$data .= pack('n', $self->extensions_len);
|
||||
|
||||
foreach my $key (keys %{$self->extension_data}) {
|
||||
my $extdata = ${$self->extension_data}{$key};
|
||||
$data .= pack("n", $key);
|
||||
$data .= pack("n", length($extdata));
|
||||
$data .= $extdata;
|
||||
$extensions .= pack("n", $key);
|
||||
$extensions .= pack("n", length($extdata));
|
||||
$extensions .= $extdata;
|
||||
}
|
||||
|
||||
$data .= pack('n', length($extensions));
|
||||
$data .= $extensions;
|
||||
|
||||
$self->data($data);
|
||||
}
|
||||
|
||||
@ -270,4 +274,9 @@ sub extension_data
|
||||
}
|
||||
return $self->{extension_data};
|
||||
}
|
||||
sub delete_extension
|
||||
{
|
||||
my ($self, $ext_type) = @_;
|
||||
delete $self->{extension_data}{$ext_type};
|
||||
}
|
||||
1;
|
||||
|
@ -230,4 +230,9 @@ sub set_extension
|
||||
my ($self, $ext_type, $ext_data) = @_;
|
||||
$self->{extension_data}{$ext_type} = $ext_data;
|
||||
}
|
||||
sub delete_extension
|
||||
{
|
||||
my ($self, $ext_type) = @_;
|
||||
delete $self->{extension_data}{$ext_type};
|
||||
}
|
||||
1;
|
||||
|
Loading…
Reference in New Issue
Block a user