]> git.ipfire.org Git - thirdparty/openssl.git/commitdiff
Fix perl warnings on various scripts
authorNorbert Pocs <norbertp@openssl.org>
Tue, 15 Jul 2025 09:54:23 +0000 (11:54 +0200)
committerNeil Horman <nhorman@openssl.org>
Wed, 23 Jul 2025 12:59:53 +0000 (08:59 -0400)
Resolves: https://github.com/openssl/project/issues/1273

Signed-off-by: Norbert Pocs <norbertp@openssl.org>
Reviewed-by: Neil Horman <nhorman@openssl.org>
Reviewed-by: Saša Nedvědický <sashan@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/28046)

12 files changed:
crypto/perlasm/s390x.pm
util/perl/OpenSSL/Test/Utils.pm
util/perl/OpenSSL/paramnames.pm
util/perl/TLSProxy/Certificate.pm
util/perl/TLSProxy/CertificateRequest.pm
util/perl/TLSProxy/CertificateVerify.pm
util/perl/TLSProxy/EncryptedExtensions.pm
util/perl/TLSProxy/Message.pm
util/perl/TLSProxy/NewSessionTicket.pm
util/perl/TLSProxy/NextProto.pm
util/perl/TLSProxy/ServerHello.pm
util/perl/TLSProxy/ServerKeyExchange.pm

index dbf48426813cb4e2ff0469957b47a8207fe6881c..ad3712d5289306b44a693a5748dbd990e3b86a06 100644 (file)
@@ -3172,4 +3172,4 @@ sub err {
        return $ERR{$_[0]};
 }
 
-1;
+no warnings 'void'; 1;
index 34eafc4659a5df1dff7ab15b708cea3ef529e0e5..7d253514dd7164f25c65d8474c1bdf1e63a5e54a 100644 (file)
@@ -91,6 +91,7 @@ sub load_configdata {
     # 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;
index a698b7d157d7a449f5c4c04f1146779b309b2de2..bcb27cf4f371e5376aed5eb278ae870de021781d 100644 (file)
@@ -808,7 +808,7 @@ sub output_param_decoder {
 sub produce_param_decoder {
     my $s;
 
-    open local *STDOUT, '>', \$s;
+    open(local *STDOUT, '>', \$s);
     output_param_decoder(@_);
     return $s;
 }
index 437716974765ed928b4749655341f9b83e25cd09..e28e1de5045d99f81092f92619be97f24bae1f09 100644 (file)
@@ -28,7 +28,7 @@ sub new
     my $self = $class->SUPER::new(
         $isdtls,
         $server,
-        TLSProxy::Message::MT_CERTIFICATE,
+        TLSProxy::Message::MT_CERTIFICATE(),
         $msgseq,
         $msgfrag,
         $msgfragoffs,
index 67943490bd18bcc0cc04fcf8f342a572223c59ee..a686d76fcde885dd922ea50dc0979bacc31ebefe 100644 (file)
@@ -28,7 +28,7 @@ sub new
     my $self = $class->SUPER::new(
         $isdtls,
         $server,
-        TLSProxy::Message::MT_CERTIFICATE_REQUEST,
+        TLSProxy::Message::MT_CERTIFICATE_REQUEST(),
         $msgseq,
         $msgfrag,
         $msgfragoffs,
index 637298525da93b665fbb4706bacd9976d5429d61..e20555667b30ccfc9362a0ee8851e2cc418433d8 100644 (file)
@@ -28,7 +28,7 @@ sub new
     my $self = $class->SUPER::new(
         $isdtls,
         $server,
-        TLSProxy::Message::MT_CERTIFICATE_VERIFY,
+        TLSProxy::Message::MT_CERTIFICATE_VERIFY(),
         $msgseq,
         $msgfrag,
         $msgfragoffs,
@@ -52,8 +52,8 @@ sub parse
     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);
     }
index 8b1e76afd5d8c6c2b20efd34feee57c3f6b17312..a17bf20e543f173bd5f850c3dd841cb9356f4951 100644 (file)
@@ -28,7 +28,7 @@ sub new
     my $self = $class->SUPER::new(
         $isdtls,
         $server,
-        TLSProxy::Message::MT_ENCRYPTED_EXTENSIONS,
+        TLSProxy::Message::MT_ENCRYPTED_EXTENSIONS(),
         $msgseq,
         $msgfrag,
         $msgfragoffs,
index 82db4022c24fde65edb8604e821fe66146e8c4b5..fee6d489a286140ef4c5bb697f9a2881b028efeb 100644 (file)
@@ -190,7 +190,7 @@ sub get_messages
     }
     $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";
@@ -202,7 +202,7 @@ sub get_messages
                 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 {
@@ -302,7 +302,7 @@ sub get_messages
                 }
             }
         }
-    } 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";
 
@@ -310,7 +310,7 @@ sub get_messages
             $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
@@ -617,7 +617,7 @@ sub repack
             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
@@ -632,7 +632,7 @@ sub repack
                     $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;
                 }
index 26dcc17bb05a4cb26cb0b75cebbcf5afd26434bc..e8dc8a2f57eafb0ade0068066d5069d0dc6cd889 100644 (file)
@@ -76,7 +76,7 @@ sub init{
     my $self = $class->SUPER::new(
         $isdtls,
         $server,
-        TLSProxy::Message::MT_NEW_SESSION_TICKET,
+        TLSProxy::Message::MT_NEW_SESSION_TICKET(),
         $msgseq,
         $msgfrag,
         $msgfragoffs,
index 0825ea744f47ad04d95fd11ff78fab7ac144dc18..819b2a010c412600a6b505126ec94fb7cd9e42f6 100644 (file)
@@ -28,7 +28,7 @@ sub new
     my $self = $class->SUPER::new(
         $isdtls,
         $server,
-        TLSProxy::Message::MT_NEXT_PROTO,
+        TLSProxy::Message::MT_NEXT_PROTO(),
         $msgseq,
         $msgfrag,
         $msgfragoffs,
index a1dabaa2b3847b394ae33674d539fcc0041d89e6..c5662bec96f1b9b115f4cb389aa581bfa0ede8e0 100644 (file)
@@ -111,7 +111,7 @@ sub parse
 
     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);
index 15dd9a8898e262b2262b784cb6c879ed7fb74f03..5716b7b62d3d18810e805ea75bbb333e1346ac41 100644 (file)
@@ -28,7 +28,7 @@ sub new
     my $self = $class->SUPER::new(
         $isdtls,
         $server,
-        TLSProxy::Message::MT_SERVER_KEY_EXCHANGE,
+        TLSProxy::Message::MT_SERVER_KEY_EXCHANGE(),
         $msgseq,
         $msgfrag,
         $msgfragoffs,
@@ -54,9 +54,9 @@ sub parse
 
     #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;
@@ -77,7 +77,7 @@ sub parse
     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;
     }