summaryrefslogtreecommitdiffstats
path: root/crypto/objects
diff options
context:
space:
mode:
authorRich Salz <rsalz@akamai.com>2020-01-07 15:50:20 -0500
committerRich Salz <rsalz@akamai.com>2020-01-07 15:53:15 -0500
commit339638b586e77c189e8294f931b99b03d1f08dbd (patch)
treef3731fd5a71dad5fcbfde3680624e5281e56c361 /crypto/objects
parent018aaeb47874272e157d35c05c68e826301d57f5 (diff)
Make generated copyright year be "now"
Always use the current year in generating output files, rather than trying to base is on the modtime of the script or input, as that can vary depending on the ability of the local OS to keep those accurate. Fixes #10744 Reviewed-by: Shane Lontis <shane.lontis@oracle.com> Reviewed-by: Richard Levitte <levitte@openssl.org> (Merged from https://github.com/openssl/openssl/pull/10776)
Diffstat (limited to 'crypto/objects')
-rw-r--r--crypto/objects/obj_dat.pl6
-rw-r--r--crypto/objects/objects.pl8
-rw-r--r--crypto/objects/objxref.pl8
3 files changed, 6 insertions, 16 deletions
diff --git a/crypto/objects/obj_dat.pl b/crypto/objects/obj_dat.pl
index 24f09b49e5..2cee3e19ea 100644
--- a/crypto/objects/obj_dat.pl
+++ b/crypto/objects/obj_dat.pl
@@ -36,10 +36,8 @@ sub der_it
return $ret;
}
-# 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($ARGV[0])]->[9])]->[5] + 1900;
-$YEAR = $iYEAR if $iYEAR > $YEAR;
+# The year the output file is generated.
+my $YEAR = [localtime()]->[5] + 1900;
# Read input, parse all #define's into OID name and value.
# Populate %ln and %sn with long and short names (%dupln and %dupsn)
diff --git a/crypto/objects/objects.pl b/crypto/objects/objects.pl
index 62d6b44bab..f4f11fa452 100644
--- a/crypto/objects/objects.pl
+++ b/crypto/objects/objects.pl
@@ -11,12 +11,8 @@ use Getopt::Std;
our($opt_n);
getopts('n');
-# 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($ARGV[0])]->[9])]->[5] + 1900;
-$YEAR = $iYEAR if $iYEAR > $YEAR;
-$iYEAR = [localtime([stat($ARGV[1])]->[9])]->[5] + 1900;
-$YEAR = $iYEAR if $iYEAR > $YEAR;
+# The year the output file is generated.
+my $YEAR = [localtime()]->[5] + 1900;
open (NUMIN,"$ARGV[1]") || die "Can't open number file $ARGV[1]";
$max_nid=0;
diff --git a/crypto/objects/objxref.pl b/crypto/objects/objxref.pl
index e6b69a8309..01ecf438f0 100644
--- a/crypto/objects/objxref.pl
+++ b/crypto/objects/objxref.pl
@@ -14,12 +14,8 @@ 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 = [localtime()]->[5] + 1900;
open(IN, $mac_file) || die "Can't open $mac_file, $!\n";