summaryrefslogtreecommitdiffstats
path: root/crypto/objects/objxref.pl
diff options
context:
space:
mode:
authorBernd Edlinger <bernd.edlinger@hotmail.de>2022-01-05 17:25:02 +0100
committerBernd Edlinger <bernd.edlinger@hotmail.de>2022-07-30 12:23:26 +0200
commit26cfeb76cfda55ba5248219f40252af7c2b22be1 (patch)
treec8bb147764d9bc6de10932c59b9b29c3a125fd5d /crypto/objects/objxref.pl
parent7dfe4aa2b08d1c3111b0861e26cac0246e3e8f58 (diff)
Fix copyright year issues
Fixes: #13765 Reviewed-by: Paul Dale <pauli@openssl.org> Reviewed-by: Tomas Mraz <tomas@openssl.org> (Merged from https://github.com/openssl/openssl/pull/17706)
Diffstat (limited to 'crypto/objects/objxref.pl')
-rw-r--r--crypto/objects/objxref.pl11
1 files changed, 5 insertions, 6 deletions
diff --git a/crypto/objects/objxref.pl b/crypto/objects/objxref.pl
index ce76cadae3..168d4be9f8 100644
--- a/crypto/objects/objxref.pl
+++ b/crypto/objects/objxref.pl
@@ -8,18 +8,17 @@
use strict;
+use FindBin;
+use lib "$FindBin::Bin/../../util/perl";
+use OpenSSL::copyright;
my %xref_tbl;
my %oid_tbl;
my ($mac_file, $xref_file) = @ARGV;
-# Output year depends on the year of the script and the input file.
-my $YEAR = [localtime([stat($0)]->[9])]->[5] + 1900;
-my $iYEAR = [localtime([stat($mac_file)]->[9])]->[5] + 1900;
-$YEAR = $iYEAR if $iYEAR > $YEAR;
-$iYEAR = [localtime([stat($xref_file)]->[9])]->[5] + 1900;
-$YEAR = $iYEAR if $iYEAR > $YEAR;
+# The year the output file is generated.
+my $YEAR = OpenSSL::copyright::latest(($0, $mac_file, $xref_file));
open(IN, $mac_file) || die "Can't open $mac_file, $!\n";