diff options
author | Rich Salz <rsalz@openssl.org> | 2018-02-13 13:09:02 -0500 |
---|---|---|
committer | Rich Salz <rsalz@openssl.org> | 2018-02-13 13:22:30 -0500 |
commit | 97d37b85d4e1a218fdc61dbe0dff3e7c8ff36121 (patch) | |
tree | b7af9616b57456e5606683507bab2d81e44aa1f6 /crypto/objects/objxref.pl | |
parent | d7c402c4f2d9c311a91616fd75c24a15afabe2e5 (diff) |
Generate copyright year properly
Output copyright year depends on any input file(s) and the script.
This is not perfect, but better than what we had.
Also run 'make update'
Reviewed-by: Richard Levitte <levitte@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/5350)
Diffstat (limited to 'crypto/objects/objxref.pl')
-rw-r--r-- | crypto/objects/objxref.pl | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/crypto/objects/objxref.pl b/crypto/objects/objxref.pl index 53f9bd604c..6a33130c6f 100644 --- a/crypto/objects/objxref.pl +++ b/crypto/objects/objxref.pl @@ -14,6 +14,13 @@ 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; + open(IN, $mac_file) || die "Can't open $mac_file, $!\n"; # Read in OID nid values for a lookup table. @@ -71,7 +78,7 @@ print <<EOF; * WARNING: do not edit! * Generated by $pname * - * Copyright 1998-2016 The OpenSSL Project Authors. All Rights Reserved. + * Copyright 1998-$YEAR The OpenSSL Project Authors. All Rights Reserved. * * Licensed under the OpenSSL license (the "License"). You may not use * this file except in compliance with the License. You can obtain a copy |