summaryrefslogtreecommitdiffstats
path: root/masterkey.pl
diff options
context:
space:
mode:
Diffstat (limited to 'masterkey.pl')
-rwxr-xr-xmasterkey.pl11
1 files changed, 7 insertions, 4 deletions
diff --git a/masterkey.pl b/masterkey.pl
index f3b18cf..d24a5a5 100755
--- a/masterkey.pl
+++ b/masterkey.pl
@@ -46,9 +46,9 @@ sub main {
'body' => 'Hi,
This mail is about having your GPG key signed by an Arch Linux master key.
-Please reply with an email that is signed with your key ({$recipient_key})
+Please reply with an email that is signed with your key or a subkey of it ({$recipient_key})
and contains the token listed below. It is not necessary to encrypt the mail,
-however, signing the mail with your key is required.
+however, signing the mail with your key or a subkey of it is required.
If you do not have GPG configured in your mail client, it is sufficient to
send the signed token as an attachment.
@@ -144,19 +144,22 @@ fun gpg_get_users($key) {
my $user = Encode::decode('utf8', $uid->as_string);
unless ($user =~ m/^(?<name>.*?) (?:\((?<comment>.*?)\) )?\<(?<email>.*?@.*?)\>$/) {
- die "Failed to parse GPG user information for key $key; got $user";
+ warn "Warning: Failed to parse GPG user information for key $key; got '$user'. Ignoring...\n";
}
push @users, {%+};
}
+ die "Failed to parse even one UID from key. Giving up" unless (0+@users > 0);
+
return \@users;
}
fun gpg_get_user($key, $email_regex) {
my $users = gpg_get_users($key);
- return $users->[0] if $users->@* == 1;
+ # Disable this since we only want to use the userid matching the regex
+ #return $users->[0] if $users->@* == 1;
my $user = first {$_->{email} =~ m/$email_regex/} $users->@*;