return $ERR{$_[0]};
}
-1;
+no warnings 'void'; 1;
# been run yet.
my $configdata = bldtop_file("configdata.pm");
eval { require $configdata;
+ no warnings 'once';
%available_protocols = %configdata::available_protocols;
%disabled = %configdata::disabled;
%config = %configdata::config;
sub produce_param_decoder {
my $s;
- open local *STDOUT, '>', \$s;
+ open(local *STDOUT, '>', \$s);
output_param_decoder(@_);
return $s;
}
my $self = $class->SUPER::new(
$isdtls,
$server,
- TLSProxy::Message::MT_CERTIFICATE,
+ TLSProxy::Message::MT_CERTIFICATE(),
$msgseq,
$msgfrag,
$msgfragoffs,
my $self = $class->SUPER::new(
$isdtls,
$server,
- TLSProxy::Message::MT_CERTIFICATE_REQUEST,
+ TLSProxy::Message::MT_CERTIFICATE_REQUEST(),
$msgseq,
$msgfrag,
$msgfragoffs,
my $self = $class->SUPER::new(
$isdtls,
$server,
- TLSProxy::Message::MT_CERTIFICATE_VERIFY,
+ TLSProxy::Message::MT_CERTIFICATE_VERIFY(),
$msgseq,
$msgfrag,
$msgfragoffs,
my $record = ${$self->records}[0];
if (TLSProxy::Proxy->is_tls13()
- || $record->version() == TLSProxy::Record::VERS_TLS_1_2
- || $record->version() == TLSProxy::Record::VERS_DTLS_1_2) {
+ || $record->version() == TLSProxy::Record::VERS_TLS_1_2()
+ || $record->version() == TLSProxy::Record::VERS_DTLS_1_2()) {
$sigalg = unpack('n', $remdata);
$remdata = substr($remdata, 2);
}
my $self = $class->SUPER::new(
$isdtls,
$server,
- TLSProxy::Message::MT_ENCRYPTED_EXTENSIONS,
+ TLSProxy::Message::MT_ENCRYPTED_EXTENSIONS(),
$msgseq,
$msgfrag,
$msgfragoffs,
}
$server = $serverin;
- if ($record->content_type == TLSProxy::Record::RT_CCS) {
+ if ($record->content_type == TLSProxy::Record::RT_CCS()) {
if ($payload ne "") {
#We can't handle this yet
die "CCS received before message data complete\n";
TLSProxy::Record->client_encrypting(1);
}
}
- } elsif ($record->content_type == TLSProxy::Record::RT_HANDSHAKE) {
+ } elsif ($record->content_type == TLSProxy::Record::RT_HANDSHAKE()) {
if ($record->len == 0 || $record->len_real == 0) {
print " Message truncated\n";
} else {
}
}
}
- } elsif ($record->content_type == TLSProxy::Record::RT_APPLICATION_DATA) {
+ } elsif ($record->content_type == TLSProxy::Record::RT_APPLICATION_DATA()) {
print " [ENCRYPTED APPLICATION DATA]\n";
print " [".$record->decrypt_data."]\n";
$success = 1;
$end = 1;
}
- } elsif ($record->content_type == TLSProxy::Record::RT_ALERT) {
+ } elsif ($record->content_type == TLSProxy::Record::RT_ALERT()) {
my ($alertlev, $alertdesc) = unpack('CC', $record->decrypt_data);
print " [$alertlev, $alertdesc]\n";
#A CloseNotify from the client indicates we have finished successfully
if (TLSProxy::Proxy->is_tls13()) {
#Add content type (1 byte) and 16 tag bytes
$rec->data($rec->decrypt_data
- .pack("C", TLSProxy::Record::RT_HANDSHAKE).("\0"x16));
+ .pack("C", TLSProxy::Record::RT_HANDSHAKE()).("\0"x16));
} elsif ($rec->etm()) {
my $data = $rec->decrypt_data;
#Add padding
$data .= pack("C", $macval);
}
- if ($rec->version() >= TLSProxy::Record::VERS_TLS_1_1) {
+ if ($rec->version() >= TLSProxy::Record::VERS_TLS_1_1()) {
#Explicit IV
$data = ("\0"x16).$data;
}
my $self = $class->SUPER::new(
$isdtls,
$server,
- TLSProxy::Message::MT_NEW_SESSION_TICKET,
+ TLSProxy::Message::MT_NEW_SESSION_TICKET(),
$msgseq,
$msgfrag,
$msgfragoffs,
my $self = $class->SUPER::new(
$isdtls,
$server,
- TLSProxy::Message::MT_NEXT_PROTO,
+ TLSProxy::Message::MT_NEXT_PROTO(),
$msgseq,
$msgfrag,
$msgfragoffs,
if ($random eq $hrrrandom) {
TLSProxy::Proxy->is_tls13(1);
- } elsif ($neg_version == TLSProxy::Record::VERS_TLS_1_3) {
+ } elsif ($neg_version == TLSProxy::Record::VERS_TLS_1_3()) {
TLSProxy::Proxy->is_tls13(1);
TLSProxy::Record->server_encrypting(1);
my $self = $class->SUPER::new(
$isdtls,
$server,
- TLSProxy::Message::MT_SERVER_KEY_EXCHANGE,
+ TLSProxy::Message::MT_SERVER_KEY_EXCHANGE(),
$msgseq,
$msgfrag,
$msgfragoffs,
#Minimal SKE parsing. Only supports one known DHE ciphersuite at the moment
return if TLSProxy::Proxy->ciphersuite()
- != TLSProxy::Message::CIPHER_ADH_AES_128_SHA
+ != TLSProxy::Message::CIPHER_ADH_AES_128_SHA()
&& TLSProxy::Proxy->ciphersuite()
- != TLSProxy::Message::CIPHER_DHE_RSA_AES_128_SHA;
+ != TLSProxy::Message::CIPHER_DHE_RSA_AES_128_SHA();
my $p_len = unpack('n', $self->data);
my $ptr = 2;
my $record = ${$self->records}[0];
if (TLSProxy::Proxy->is_tls13()
- || $record->version() == TLSProxy::Record::VERS_TLS_1_2) {
+ || $record->version() == TLSProxy::Record::VERS_TLS_1_2()) {
$sigalg = unpack('n', substr($self->data, $ptr));
$ptr += 2;
}