summaryrefslogtreecommitdiff
path: root/Master/texmf-dist
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2016-04-21 19:08:52 +0000
committerKarl Berry <karl@freefriends.org>2016-04-21 19:08:52 +0000
commit5aa28567dca799a746db5c20e400edcfc4031be1 (patch)
tree58ef62fb29b5c4f38158036b3d640c42ce73f2df /Master/texmf-dist
parent525c559215b4d53a04b0f291b9c45619bc0f0f21 (diff)
TLCrypto.pm: new module with all the functions using digests/gpg,
extracted from TLUtils.pm. TLUtils.pm: functions moved from here, change calls. TLConfig.pm: doc. TLPDB.pm, TLPOBJ.pm, install-tl, tlmgr.pl: use TLCrypto, change calls, doc. git-svn-id: svn://tug.org/texlive/trunk@40652 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist')
-rwxr-xr-xMaster/texmf-dist/scripts/texlive/tlmgr.pl40
1 files changed, 21 insertions, 19 deletions
diff --git a/Master/texmf-dist/scripts/texlive/tlmgr.pl b/Master/texmf-dist/scripts/texlive/tlmgr.pl
index 8efa365f719..5dc5f755f48 100755
--- a/Master/texmf-dist/scripts/texlive/tlmgr.pl
+++ b/Master/texmf-dist/scripts/texlive/tlmgr.pl
@@ -91,7 +91,6 @@ BEGIN {
use Cwd qw/abs_path/;
use File::Spec;
-use Digest::MD5;
use Pod::Usage;
use Getopt::Long qw(:config no_autoabbrev permute);
use strict;
@@ -103,6 +102,7 @@ use TeXLive::TLUtils;
use TeXLive::TLWinGoo;
use TeXLive::TLDownload;
use TeXLive::TLConfFile;
+use TeXLive::TLCrypto;
TeXLive::TLUtils->import(qw(member info give_ctan_mirror win32 dirname
mkdirhier copy debug tlcmp));
use TeXLive::TLPaper;
@@ -5710,7 +5710,7 @@ sub handle_gpg_config_settings {
}
# now we know whether we setup gpg or not
if ($do_setup_gpg) {
- if (TeXLive::TLUtils::setup_gpg($Master)) {
+ if (TeXLive::TLCrypto::setup_gpg($Master)) {
debug("will verify cryptographic signatures\n")
} else {
my $prefix = "$prg: No gpg found"; # just to shorten the strings
@@ -5894,7 +5894,7 @@ sub setup_one_remotetlpdb {
my $local_copy_tlpdb_used = 0;
if ($location =~ m;^(http|ftp)://;) {
# first check that the saved tlpdb is present at all
- my $loc_digest = TeXLive::TLUtils::tl_short_digest($location);
+ my $loc_digest = TeXLive::TLCrypto::tl_short_digest($location);
my $loc_copy_of_remote_tlpdb =
"$Master/$InfraLocation/texlive.tlpdb.$loc_digest";
ddebug("loc_digest = $loc_digest\n");
@@ -5906,7 +5906,8 @@ sub setup_one_remotetlpdb {
my $path = "$location/$InfraLocation/$DatabaseName.$TeXLive::TLConfig::ChecksumExtension";
ddebug("remote path of digest = $path\n");
- my ($ret, $msg) = TeXLive::TLUtils::verify_checksum($loc_copy_of_remote_tlpdb, $path);
+ my ($ret,$msg)
+ = TeXLive::TLCrypto::verify_checksum($loc_copy_of_remote_tlpdb, $path);
if ($ret == -1) {
info(<<END_NO_INTERNET);
No connection to the internet.
@@ -6021,7 +6022,7 @@ FROZEN
# make sure that the writeout of the tlpdb is done in UNIX mode
# since otherwise the checksum will change.
if (!$local_copy_tlpdb_used && $location =~ m;^(http|ftp)://;) {
- my $loc_digest = TeXLive::TLUtils::tl_short_digest($location);
+ my $loc_digest = TeXLive::TLCrypto::tl_short_digest($location);
my $loc_copy_of_remote_tlpdb =
"$Master/$InfraLocation/texlive.tlpdb.$loc_digest";
my $tlfh;
@@ -7574,11 +7575,11 @@ a different hash), it's harmless to delete them.
=head1 CRYPTOGRAPHIC VERIFICATION
-If a working GnuPG binary (C<gpg>) is found (see below for how it is
-searched), by default verification of
-downloaded files is performed. This can be supressed by specifying
-C<--no-verify-downloads> on the command line, or adding an entry
-C<verify-downloads = 0> to a tlmgr config file.
+If a working GnuPG binary (C<gpg>) is found (see below for the search
+method), by default verification of downloaded files is performed. This
+can be suppressed by specifying C<--no-verify-downloads> on the command
+line, or adding an entry C<verify-downloads = 0> to a tlmgr config file
+(described in another section below).
Verification is performed as follows: For each C<texlive.tlpdb> loaded
for a repository, the respective checksum C<texlive.tlpdb.sha512> is
@@ -7586,11 +7587,12 @@ always downloaded, too, and C<tlmgr> confirms whether the checksum
of the download tlpdb file agrees with the download data. This is done
in any case.
-If cryptographic verification is done, then a signature of the checksum
-file is downloaded and the signature verified. The signature is done with
-the TeX Live Distribution GPG key 0x06BAB6BC, which in turn is signed
-by Karl Berry's key 0x9DEB46C0 and Norbert Preining's key 0x6CACA448.
-All of these keys are obtainable from the standard key servers.
+If cryptographic verification is also requested, then a signature of the
+checksum file is downloaded and the signature verified. The signature is
+done with the TeX Live Distribution GPG key 0x06BAB6BC, which in turn is
+signed by Karl Berry's key 0x9DEB46C0 and Norbert Preining's key
+0x6CACA448. All of these keys are obtainable from the standard key
+servers.
=head2 Configuration of GnuPG invocation
@@ -7598,10 +7600,10 @@ The executable used for GnuPG is searched as follows: If the environment
variable C<TL_GNUPG> is set, it is tested and used. Otherwise C<gpg> is
checked, and finally C<gpg2>.
-Further adaption of the invocation of C<gpg> can be done using the
-two enviroment variables C<TL_GNUPGHOME>, which is passed to
-C<gpg> with C<--homedir>, and C<TL_GNUPGARGS>, which replaces the
-default arguments C<--no-secmem-warning --no-permission-warning>.
+Further adaptation of the C<gpg> invocation can be made using the two
+enviroment variables C<TL_GNUPGHOME>, which is passed to C<gpg> as the
+value for C<--homedir>, and C<TL_GNUPGARGS>, which replaces the default
+arguments C<--no-secmem-warning --no-permission-warning>.
=head1 USER MODE