mirror of
https://github.com/vincentmli/bpfire.git
synced 2026-04-27 19:23:24 +02:00
pakfire: Properly check if we have our key with our fingerprint
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
This commit is contained in:
@@ -901,16 +901,15 @@ sub senduuid {
|
|||||||
|
|
||||||
sub checkcryptodb {
|
sub checkcryptodb {
|
||||||
logger("CRYPTO INFO: Checking GnuPG Database");
|
logger("CRYPTO INFO: Checking GnuPG Database");
|
||||||
my $ret = system("gpg --list-keys | grep -q $myid");
|
system("gpg --fingerprint $myid >/dev/null");
|
||||||
unless ( "$ret" eq "0" ) {
|
return if ($? == 0);
|
||||||
message("CRYPTO WARN: The GnuPG isn't configured correctly. Trying now to fix this.");
|
|
||||||
message("CRYPTO WARN: It's normal to see this on first execution.");
|
message("CRYPTO WARN: The GnuPG isn't configured correctly. Trying now to fix this.");
|
||||||
message("CRYPTO WARN: If this message is being shown repeatedly, check if time and date are set correctly, and if IPFire can connect via port 11371 TCP.");
|
message("CRYPTO WARN: It's normal to see this on first execution.");
|
||||||
my $command = "gpg --keyserver pgp.ipfire.org --always-trust --status-fd 2";
|
message("CRYPTO WARN: If this message is being shown repeatedly, check if time and date are set correctly, and if IPFire can connect via port 11371 TCP.");
|
||||||
system("$command --recv-key $myid >> $Conf::logdir/gnupg-database.log 2>&1");
|
|
||||||
} else {
|
my $command = "gpg --keyserver pgp.ipfire.org --always-trust --status-fd 2";
|
||||||
logger("CRYPTO INFO: Database is okay");
|
system("$command --recv-key $myid >> $Conf::logdir/gnupg-database.log 2>&1");
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
sub callback {
|
sub callback {
|
||||||
|
|||||||
Reference in New Issue
Block a user