(CONF_DIR_Scratch, $self->upload_filename, CONF_DIR_Staging);
# Staging the file now should avoid the (remote) possibility of
# encountering ENOSPC during installation.
+
+ # Recheck the detached signature to be certain that the file was
+ # transferred successfully.
+ my $fsig_info = verify_detached_signature
+ (map(File::Spec->catfile(CONF_DIR_Staging, $_),
+ $self->target_filepair),
+ $self->auth_keyrings);
+
+ die 'GPG signature found to be invalid after staging file'
+ unless $fsig_info->{exitcode} == 0 && !defined $fsig_info->{TILT};
+ # This is a simple error instead of a structured exception because it
+ # indicates a problem with the server.
+
}
sub install {
exp_continue
}
- -re {^gatekeeper\[[0-9]+\]: \(Test\) \[(?:AA|RP)\]\
+ -re {^gatekeeper\[[0-9]+\]: \(Test\) \[(?:AA|EX|RP)\]\
DEBUG: [^ ]+ size is [[:digit:]]+} {
# from verify_keyring, upon entry
# also from check_files, twice, upon entry
exp_continue
}
- -re {^gatekeeper\[[0-9]+\]: \(Test\) \[(?:AA|RP)\]\
+ -re {^gatekeeper\[[0-9]+\]: \(Test\) \[(?:AA|EX|RP)\]\
DEBUG: gpgv command line: [^\r\n]+} {
# from verify_keyring, tracing gpgv call
exp_continue
}
- -re {^gatekeeper\[[0-9]+\]: \(Test\) \[(?:AA|RP)\]\
+ -re {^gatekeeper\[[0-9]+\]: \(Test\) \[(?:AA|EX|RP)\]\
gpgv exited ([[:digit:]]+)} {
# from verify_keyring, when closing pipe from gpgv
set A(gpgv,exitcode,$expect_out(1,string)) 1