use OpenSSL::Test qw/:DEFAULT cmdstr srctop_file bldtop_dir/;
use OpenSSL::Test::Utils;
use TLSProxy::Proxy;
+use TLSProxy::Message;
my $test_name = "test_sslrecords";
setup($test_name);
# We're only interested in the initial ClientHello
if ($proxy->flight != 0) {
- $fatal_alert = 1 if @{$records}[-1]->is_fatal_alert(1) == 10;
+ $fatal_alert = 1 if @{$records}[-1]->is_fatal_alert(1) == TLSProxy::Message::AL_DESC_UNEXPECTED_MESSAGE;
return;
}
# We're only interested in the initial ClientHello
if ($proxy->flight != 0) {
- $fatal_alert = 1 if @{$records}[-1]->is_fatal_alert(1) == 10;
+ $fatal_alert = 1 if @{$records}[-1]->is_fatal_alert(1) == TLSProxy::Message::AL_DESC_UNEXPECTED_MESSAGE;
return;
}
$added_record = 0;
return;
} elsif ($proxy->flight != 1 || $added_record) {
- $fatal_alert = 1 if @{$records}[-1]->is_fatal_alert(0) == 10;
+ $fatal_alert = 1 if @{$records}[-1]->is_fatal_alert(0) == TLSProxy::Message::AL_DESC_UNEXPECTED_MESSAGE;
return;
}
# We'll change a version after the initial version neg has taken place
if ($proxy->flight != 1) {
- $fatal_alert = 1 if @{$records}[-1]->is_fatal_alert(0) == 70;
+ $fatal_alert = 1 if @{$records}[-1]->is_fatal_alert(0) == TLSProxy::Message::AL_DESC_PROTOCOL_VERSION;
return;
}
# We'll change a record after the initial version neg has taken place
if ($proxy->flight != 1) {
- $fatal_alert = 1 if @{$records}[-1]->is_fatal_alert(0) == 10;
+ $fatal_alert = 1 if @{$records}[-1]->is_fatal_alert(0) == TLSProxy::Message::AL_DESC_UNEXPECTED_MESSAGE;
return;
}
#Find server's first flight
if ($proxy->flight != 1) {
- $fatal_alert = 1 if @{$records}[-1]->is_fatal_alert(0) == 10;
+ $fatal_alert = 1 if @{$records}[-1]->is_fatal_alert(0) == TLSProxy::Message::AL_DESC_UNEXPECTED_MESSAGE;
return;
}