- 11 Jan, 2022 1 commit
-
-
Daniel Kahn Gillmor authored
-
- 25 Aug, 2021 1 commit
-
-
Werner Koch authored
-
- 18 Aug, 2021 3 commits
-
-
Werner Koch authored
* pinentry/pinentry.c (option_handler): Unescape formatted_passphrase_hint.
-
Ingo Klöcker authored
-- GnuPG-bug-id: 5517
-
Ingo Klöcker authored
* qt/pinlineedit.cpp (static const int FormattedPassphraseGroupSize): Set to 5. -- GnuPG-bug-id: 5517
-
- 16 Aug, 2021 1 commit
-
-
Ingo Klöcker authored
* qt/pinentrydialog.cpp (PinEntryDialog::checkConstraints): Set parent of message box. -- Setting the pinentry dialog as parent of the message box should make sure that the message box is centered on top of the pinentry dialog. GnuPG-bug-id: 5517, 5532
-
- 12 Aug, 2021 7 commits
-
-
Ingo Klöcker authored
* qt/accessibility.cpp, qt/accessibility.h: New. * qt/Makefile.am (pinentry_qt_SOURCES): Add new files. * qt/main.cpp (qt_cmd_handler): Use new Accessibility helpers. * qt/pinentryconfirm.cpp (PinentryConfirm::PinentryConfirm): Use new Accessibility helpers. * qt/pinentrydialog.cpp (PinEntryDialog::setDescription, PinEntryDialog::setError, PinEntryDialog::setOkText, PinEntryDialog::setCancelText, PinEntryDialog::setQualityBar, PinEntryDialog::setGenpinLabel, PinEntryDialog::setCapsLockHint, PinEntryDialog::setConstraintsOptions): Use new Accessibility helpers. (PinEntryDialog::textChanged, PinEntryDialog::checkCapsLock): Guard code using accessibility features with #ifndef QT_NO_ACCESSIBILITY. GnuPG-bug-id: 5543
-
Ingo Klöcker authored
* qt/pinentrydialog.cpp (PinEntryDialog::generatePin): Trigger visibility action or check visibility checkbox. -- Now the generated passphrase is also made visible if the visibility checkbox instead of the visibility action exists. GnuPG-bug-id: 5517
-
Ingo Klöcker authored
* qt/pinentrydialog.cpp (PinEntryDialog::toggleVisibility): Check visibility action for nullptr. -- This crash occurs if the visibility checkbox is created instead of the visibility action of the password input field. This happens if the icons for the visibility action cannot be found.
-
Ingo Klöcker authored
* qt/pinlineedit.cpp (PinLineEdit::Private::formattedSelection): Do not include trailing separator in selection. -- GnuPG-bug-id: 5517
-
Ingo Klöcker authored
* qt/pinlineedit.cpp (PinLineEdit::Private::unformattedSelection): Fix calculation. -- GnuPG-bug-id: 5517
-
Ingo Klöcker authored
* qt/main.cpp (qt_cmd_handler): Pass changed formatted passphrase options to the dialog. * qt/pinentrydialog.h (PinEntryDialog): Add field mFormatPassphrase. Remove field mFormattedPassphraseCB. (enum PinEntryDialog::FormattedPassphraseMode): Remove. (struct PinEntryDialog::FormattedPassphraseOptions): Remove fields mode, label, tooltip. Add field formatPassphrase. * qt/pinentrydialog.cpp (PinEntryDialog::PinEntryDialog): Initialize mFormatPassphrase. (PinEntryDialog::setFormattedPassphrase): Set mFormatPassphrase. Update widgets. (PinEntryDialog::toggleFormattedPassphrase): Use mFormatPassphrase instead of state of removed checkbox. -- This simplifies the formatted passphrase feature by removing the possibility to enable/disable the formatting on the fly. Formatting is now controlled exclusively by a configuration option. GnuPG-bug-id: 5553, 5517
-
Ingo Klöcker authored
* pinentry/pinentry.h (struct pinentry): Remove fields formatted_passphrase_label, formatted_passphrase_tt. * pinentry/pinentry.c (pinentry_reset): Remove free'ing of removed fields. (option_handler): Treat option "formatted-passphrase" as simple flag. Remove options "formatted-passphrase-label", "formatted-passphrase-tt". -- GnuPG-bug-id: 5553, 5517
-
- 11 Aug, 2021 6 commits
-
-
Ingo Klöcker authored
* qt/Makefile.am (pinentry_qt_SOURCES): Add header files. -- This ensures that 'make dist' includes all needed files. GnuPG-bug-id: 4950, 5517
-
Ingo Klöcker authored
* qt/pinentry_debug.cpp, qt/pinentry_debug.h: New. * qt/Makefile.am (pinentry_qt_SOURCES): Add new files. * qt/main.cpp (main): Use logging category for debug messages. -- The logging category allows enabling or disabling logging of messages of certain types. By default, only warnings and more severe messages are enabled. GnuPG-bug-id: 3659
-
Ingo Klöcker authored
* qt/pinentrydialog.cpp (PinEntryDialog::setRepeatErrorText): Check for nullptr. -- This fixes a crash if pinentry is used for something other than asking for a new password. GnuPG-bug-id: 5543 Fixes-commit: 8acf47ea
-
Ingo Klöcker authored
* qt/pinentrydialog.cpp (PinEntryDialog::onAccept): Make notification an "information". Use repeat error text as title. -- This makes the type of the messagebox consistent with the messagebox used for password constraint violations. Additionally, it replaces the untranslated title with the translated repeat error text (for lack of a better translated text). GnuPG-bug-id: 5543
-
Ingo Klöcker authored
* qt/pinentrydialog.cpp (PinEntryDialog::setFormattedPassphrase, PinEntryDialog::setConstraintsOptions): Set accessible descriptions and accessible names without HTML markup. -- We use HTML markup for some tooltips and labels for nicer display. To prevent screen readers from reading this HTML markup we need to set the accessible description (takes precedent over the tooltip) and the accessible name (takes precedent over label text) to texts without HTML markup. (Note: For the label text Qt automatically tries to remove HTML markup when asked for the description, but for consistency and better control over the result we do it explicitly.) GnuPG-bug-id: 5543
-
Ingo Klöcker authored
qt/pinentrydialog.cpp (PinEntryDialog::generatePin): Select text in input field. -- Giving the keyboard input focus to the input field does not always seem to select the generated password automatically. Explicitly selecting the password after giving focus makes sure the password is always selected. GnuPG-bug-id: 5543
-
- 10 Aug, 2021 1 commit
-
-
Ingo Klöcker authored
* qt/pinentrydialog.h (PinEntryDialog): Remove unused field mGenerateTT. Remove field mGenerateActionEdit. Add field mGenerateButton. * qt/pinentrydialog.cpp (PinEntryDialog::PinEntryDialog): Initialize new field. Set up new push button. (PinEntryDialog::setGenpinLabel): Set accessible name and update visibility of new push button. (PinEntryDialog::setGenpinLabel): Set tooltip of new push button. (PinEntryDialog::setGenpinLabel): Update visibility of new push button. (PinEntryDialog::generatePin): Focus password input field. -- This change makes the "Generate password" functionality accessible via keyboard and screen reader. GnuPG-bug-id: 5543
-
- 09 Aug, 2021 1 commit
-
-
Ingo Klöcker authored
* qt/pinentrydialog.h (PinEntryDialog): Change type of field mRepeatError from QString to QLabel*. * qt/pinentrydialog.cpp (PinEntryDialog::PinEntryDialog): Initialize mRepeatError. Add widget for "entered passwords do not match" error. Do not make the Ok button the default button. Connect to returnPressed signal of (first) password input field. (PinEntryDialog::focusChanged): Update default state of Ok button. (PinEntryDialog::textChanged): Remove code disabling the Ok button and setting a tooltip. (PinEntryDialog::setRepeatErrorText): Set text of "entered passwords do not match" widget. (PinEntryDialog::onAccept): Show error if entered passwords do not match. -- Accessibility when asking for a new password is improved by: * Move focus from first password input field to second password input field when Return is pressed while first password input field has focus. Previously, nothing happened (unless first and second password matched). * Show an error notification, if entered passwords do not match, instead of disabling the Ok button and setting a tooltip. If the platform requested accessibility information, then we use a more intrusive message box for notifying the user that the entered passwords do not match. This is a workaround because at least the GNOME screen reader ignores the warning label that we make visible. It also ignores our other warning labels, so this is probably only a temporary workaround. GnuPG-bug-id: 5543
-
- 06 Aug, 2021 1 commit
-
-
Andre Heinecke authored
* qt/capslock_win.cpp (capsLockState): Mask toggle bit. -- Checking for equality had the effect that depending on wether or not the key was pressed the caps lock warning could go out of sync with the keyboard indication of capslock. GnuPG-Bug-Id: 4950
-
- 02 Aug, 2021 5 commits
-
-
Ingo Klöcker authored
* qt/main.cpp (main): Check more environment variables on Unix systems. -- QGuiApplication checks all of those environment variables to figure out whether it is running under X11 or Wayland. GnuPG-bug-id: 3659
-
Ingo Klöcker authored
-
Ingo Klöcker authored
qt/pinentrydialog.cpp (PinEntryDialog::checkConstraints): Use property-based API of QMessageBox. -- Using the property-based API of QMessageBox allows us to use the first line of the error message as text and the other lines as "informative text". Use the Information icon instead of the Error icon. GnuPG-bug-id: 5517, 5532
-
Ingo Klöcker authored
* qt/main.cpp (qt_cmd_handler): Use unique_malloced_ptr for malloced strings. * qt/pinentrydialog.cpp (PinEntryDialog::generatePin, PinEntryDialog::checkConstraints): Use unique_malloced_ptr for malloced strings. * qt/util.h: New. -- Introducing unique_malloced_ptr<T> simplifies managing malloced strings by free'ing them automatically, when unique_malloced_ptr is destroyed. Fixes a memory leak in PinEntryDialog::generatePin. GnuPG-bug-id: 5517
-
Ingo Klöcker authored
* qt/pinentrydialog.h, qt/pinentrydialog.cpp (PinentryDialog::cancelTimeout): New. * qt/pinentrydialog.cpp (PinEntryDialog::onBackspace): Cancel timeout. (PinEntryDialog::updateQuality, PinEntryDialog::textChanged): Cancel timeout in PinEntryDialog::textChanged instead of PinEntryDialog::updateQuality. (PinEntryDialog::onAccept): Cancel timeout. -- Additionally to canceling the timeout when the user enters something into the passphrase input field we also cancel the timeout when the user presses Backspace (to disable passphrase echoing) or when the user clicks Ok. In particular, this prevents the pinentry dialog from being closed while the message that empty passphrases are not allowed is shown. GnuPG-bug-id: 5517, 5532
-
- 28 Jul, 2021 2 commits
-
-
Ingo Klöcker authored
* qt/main.cpp (qt_cmd_handler): Pass constraints options to the dialog. * qt/pinentrydialog.h (PinEntryDialog): Add struct ConstraintsOptions. Add enum PassphraseCheckResult. Add fields mEnforceConstraints, mConstraintsHint, mConstraintsErrorTitle. * qt/pinentrydialog.h, qt/pinentrydialog.cpp (PinEntryDialog::setConstraintsOptions, PinEntryDialog::onAccept, PinEntryDialog::checkConstraints): New. * qt/pinentrydialog.cpp (PinEntryDialog::PinEntryDialog): Initialize new fields. Call onAccept() on click on Ok. Add widget for constraints hint. (PinEntryDialog::checkCapsLock): Constify variable. -- This makes pinentry-qt check whether the entered passphrase satisfies the passphrase constraints in case the constraints are enforced by gpg-agent. If the constraints are not satisfied the user is informed, so that they can modify the passphrase. GnuPG-bug-id: 5517, 5532
-
Ingo Klöcker authored
* pinentry/pinentry.h (struct pinentry): Add fields constraints_enforce, constraints_hint_short, constraints_hint_long, constraints_error_title. * pinentry/pinentry.h, pinentry/pinentry.c (pinentry_inq_checkpin): New. * pinentry/pinentry.c (pinentry_reset): Take care of the new fields. (do_unescape_inplace): New. (option_handler): New options "constraints-enforce", "constraints-hint-short", "constraints-hint-long", "constraints-error-title". -- This implements the common pinentry side for checking whether a new passphrase satisfies the passphrase constraints. GnuPG-bug-id: 5517, 5532
-
- 26 Jul, 2021 3 commits
-
-
Ingo Klöcker authored
GnuPG-bug-id: 4950
-
Ingo Klöcker authored
* configure.ac: Check for KF5WaylandClient. Add "-fpic" to CFLAGS. Define PINENTRY_QT_WAYLAND if pinentry-qt should use KF5WaylandClient. * qt/Makefile.am (BUILT_SOURCES, CLEANFILES, nodist_pinentry_qt_SOURCES): Add capslock.moc. (pinentry_qt_SOURCES): Add capslock.cpp. * qt/capslock.cpp: New. * qt/capslock.h (class CapsLockWatcher): New. * qt/capslock_p.h: New. * qt/capslock_unix.cpp (watchingWayland): New static. (capsLockState): Log hint for using CapsLockWatcher on Wayland. (CapsLockWatcher::Private::*): New. * qt/pinentrydialog.cpp: Include config.h. (PinEntryDialog::PinEntryDialog): Set up CapsLockWatcher. -- This adds support for showing a warning if Caps Lock is on on Wayland. Support for Wayland is optional when building pinentry depending on the availability of the KF5WaylandClient library. GnuPG-bug-id: 4950
-
Ingo Klöcker authored
* qt/capslock.h (enum class LockState): New. * qt/capslock.h, qt/capslock_unix.cpp, qt/capslock_win.cpp (capsLockIsOn, capsLockState): Rename former to latter. Change return type to LockState. * qt/capslock_unix.cpp (capsLockState): Remove check for qApp. * qt/pinentrydialog.cpp (checkCapsLock): Adapt to changed function name and return type of capsLockIsOn/capsLockState. -- This change allows the pinentry to ignore an unknown state of Caps Lock. GnuPG-bug-id: 4950
-
- 22 Jul, 2021 1 commit
-
-
Ingo Klöcker authored
* qt/pinentrydialog.cpp (PinEntryDialog::PinEntryDialog): Skip the minimize+raise trick on Wayland. -- When running on Wayland then the following warning was logged: qt.qpa.wayland: Wayland does not support QWindow::requestActivate() Skipping the minimize+raise calls shows the window on Wayland without fancy animation instead of not showing it at all. GnuPG-bug-id: 5528
-
- 21 Jul, 2021 2 commits
-
-
Ingo Klöcker authored
* configure.ac: Check for libX11. Define PINENTRY_QT_X11 if pinentry-qt should use x11. * m4/qt.m4: Check for Qt5X11Extras if libX11 is available. * qt/Makefile.am (pinentry_qt_platform_SOURCES): New. (pinentry_qt_SOURCES): Add pinentry_qt_platform_SOURCES. * qt/capslock.h, qt/capslock_unix.cpp, qt/capslock_win.cpp: New. * qt/main.cpp (qt_cmd_handler): Pass caps lock hint to the dialog. * qt/pinentrydialog.cpp, qt/pinentrydialog.h (PinEntryDialog::setCapsLockHint, PinEntryDialog::keyReleaseEvent, PinEntryDialog::checkCapsLock): New. * qt/pinentrydialog.h (PinEntryDialog): Use Q_SLOTS instead of slots. Add field mCapsLockHint. * qt/pinentrydialog.cpp (PinEntryDialog::PinEntryDialog): Initialize new field. Add new widgets to GUI. Connect to applicationStateChanged() signal. Call checkCapsLock(). -- This adds support for showing a warning if Caps Lock is on. This is supported on X11 and on Windows. GnuPG-bug-id: 4950
-
Ingo Klöcker authored
* pinentry/pinentry.h (struct pinentry): Add field 'default_capshint'. * pinentry/pinentry.cpp (pinentry_reset): Take care of this field. (option_handler): New option "default-capshint". -- GnuPG-bug-id: 4950
-
- 15 Jul, 2021 5 commits
-
-
Ingo Klöcker authored
pinentry/pinentry.h (struct pinentry): Fix comments. -- GnuPG-bug-id: 5517
-
Ingo Klöcker authored
-- GnuPG-bug-id: 5517
-
Ingo Klöcker authored
* qt/pinlineedit.cpp (struct Selection): New. (PinLineEdit::Private::formattedSelection, PinLineEdit::Private::formattedSelection): New. (PinLineEdit::setFormattedPassphrase): Restore adjusted selection after setting formatted/unformatted passphrase. -- GnuPG-bug-id: 5517
-
Ingo Klöcker authored
* qt/pinentrydialog.cpp (PinEntryDialog::generatePin): Enable formatted passphrase option. -- Formatting the passphrase makes the generated passphrase better readable. GnuPG-bug-id: 5517
-
Ingo Klöcker authored
qt/pinentrydialog.cpp (PinEntryDialog::generatePin): Select text in input field. -- Automatically selecting the passphrase after generation allows the user to copy it easily. GnuPG-bug-id: 5517
-