Following the described steps the Kleopatra presents an error message which is not quite user friendly. In fact it should be possible to use a long password (as the one given in the repro steps). I understand that the issue is that the specified password is too long but there are several usability glitches here: 1. the input field to set a password to encrypt the keyfile does allow entering a long password and neither the displayed text hints to any limit there, nor is there a warning/error displayed when clicking OK after having entered the long password - at least there should be some mentioning on the restriction. 2. Given that very long passphrases are generally advertised in all docs related to GnuPG, IMO there should be no character limit for the password here at all. 3. The displayed error in the end is not quite user friendly. It's so cryptic and for someone not reading the whole text in detail it won't directly point to the actual issue (too long password). Such an error should be better presented to the user IMO. A simple error message would suffice: "An error occurred while trying to export the secret key. Error: password too long" Any additional details are only of interest to developers and should not be presented to users. Reproducible: Always Steps to Reproduce: 1.on an existing X.509 key right click and select: "Export Secret Keys...." 2. select an output file and click ok 3. enter the key's passphrase -> press ok 4. enter the following password for the exported key: 0f9guf9dhgsadi90sdg0Ãfd0hdgj0df -> press ok 5. enter the same password to confirm it -> press OK Actual Results: The following error is displayed Title: Secret Key Export Error --- Kleopatra An error occurred while trying to export the secret key. The output from E:\Program Files (x86)\GNU\GnuPG\gpgsm.exe was: gpgsm: gpg-protect-tool: AllowSetForegroundWindow(6380) failed: Access is denied. gpgsm: gpgsm: gpg-protect-tool: AllowSetForegroundWindow(3692) failed: Access is denied. gpgsm: gpgsm: gpg-protect-tool: password too long gpgsm: gpg-protect-tool: password too long gpgsm: gpg-protect-tool: password too long gpgsm: error running 'E:\Program Files (x86)\GNU\GnuPG\gpg-protect-tool.exe': exit status 2 Expected Results: Password file is generated without errors.
On a related note: Regardless of the error, the output file is created (it's empty however, in the error case). It would be better, if the file would either not be created, if there was an error, or that the file is removed and not being left behind, if exporting failed.
Thank you for reporting this bug in KDE software. As it has been a while since this issue was reported, can we please ask you to see if you can reproduce the issue with a recent software version? If you can reproduce the issue, please change the status to "CONFIRMED" when replying. Thank you!
Dear Bug Submitter, This bug has been in NEEDSINFO status with no change for at least 15 days. Please provide the requested information as soon as possible and set the bug status as REPORTED. Due to regular bug tracker maintenance, if the bug is still in NEEDSINFO status with no change in 30 days the bug will be closed as RESOLVED > WORKSFORME due to lack of needed information. For more information about our bug triaging procedures please read the wiki located here: https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging If you have already provided the requested information, please mark the bug as REPORTED so that the KDE team knows that the bug is ready to be confirmed. Thank you for helping us make KDE software even better for everyone!
This bug has been in NEEDSINFO status with no change for at least 30 days. The bug is now closed as RESOLVED > WORKSFORME due to lack of needed information. For more information about our bug triaging procedures please read the wiki located here: https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging Thank you for helping us make KDE software even better for everyone!