Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

console/gpg.pm: Handle pinentry 1.3.0 #19742

Merged
merged 1 commit into from
Jul 15, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
37 changes: 29 additions & 8 deletions tests/console/gpg.pm
Original file line number Diff line number Diff line change
Expand Up @@ -96,14 +96,35 @@ EOF
}

assert_screen("gpg-passphrase-enter");
enter_cmd "REALSECRETPHRASE"; # Input insecure passphrase
assert_screen("gpg-passphrase-insecure");
send_key 'tab';
send_key 'ret';
assert_screen("gpg-passphrase-enter");
enter_cmd "$passwd";
assert_screen("gpg-passphrase-reenter");
enter_cmd "$passwd";

# Different behavior for pinentry >= 1.3.0, which has a single dialog
# for passphrase entry and repetition with strength meter.
# Would use match_has_tag here, but old tags match the new screen as well.
if (check_screen "gpg-passphrase-enter-with-repeat") {
# Attempt an insecure passphrase first
type_string "REALSECRETPHRASE";
send_key 'tab';
type_string "REALSECRETPHRASE";
send_key 'ret';

assert_screen("gpg-passphrase-insecure");
send_key 'tab';
send_key 'ret';

type_string "$passwd";
send_key 'tab';
type_string "$passwd";
send_key 'ret';
} else {
enter_cmd "REALSECRETPHRASE"; # Input insecure passphrase
assert_screen("gpg-passphrase-insecure");
send_key 'tab';
send_key 'ret';
assert_screen("gpg-passphrase-enter");
enter_cmd "$passwd";
assert_screen("gpg-passphrase-reenter");
enter_cmd "$passwd";
}

# According to FIPS PUB 186-4 Digital Signature Standard (DSS), only the
# 2048 and 3072 key length should be supported by default.
Expand Down
Loading