OpenPGP: import public key fails silently
Categories
(MailNews Core :: Security: OpenPGP, defect)
Tracking
(thunderbird78 fixed)
Tracking | Status | |
---|---|---|
thunderbird78 | --- | fixed |
People
(Reporter: chriechers, Assigned: KaiE)
References
Details
Attachments
(2 files)
(deleted),
text/x-phabricator-request
|
Details | |
(deleted),
text/x-phabricator-request
|
wsmwk
:
approval-comm-beta+
|
Details |
TB daily 78.0a1 (2020-05-15) (64-bit), Linux
Trying to import a new public key from an .asc file via OpenPGP Key Management.
An Import prompt pops up. Upon clicking OK the key doesn't get imported. No error message or warning is shown. It fails silently without ever warning the user.
Messages from the error console:
Error: rnp_key_have_secret failed
addKeyAttributes chrome://openpgp/content/modules/RNP.jsm:83
getKeyInfoFromHandle chrome://openpgp/content/modules/RNP.jsm:413
getKeysFromFFI chrome://openpgp/content/modules/RNP.jsm:235
getKeyListFromKeyBlock chrome://openpgp/content/modules/RNP.jsm:1190
getKeyListFromKeyBlock chrome://openpgp/content/modules/cryptoAPI/RNPCryptoAPI.jsm:242
getKeyListFromKeyBlock chrome://openpgp/content/modules/key.jsm:148
getKeyListFromKeyFile chrome://openpgp/content/modules/key.jsm:182
EnigmailCommon_importKeysFromFile chrome://openpgp/content/ui/commonWorkflows.js:69
oncommand chrome://openpgp/content/ui/enigmailKeyManager.xhtml:1
RNP.jsm:246:19
CryptoAPI.sync() failed result: Error: RNP.importToFFI failed
importKeyBlock chrome://openpgp/content/modules/RNP.jsm:1228
importKeyFromFile chrome://openpgp/content/modules/cryptoAPI/RNPCryptoAPI.jsm:111
importKeyFromFile chrome://openpgp/content/modules/keyRing.jsm:354
EnigmailCommon_importKeysFromFile chrome://openpgp/content/ui/commonWorkflows.js:107
oncommand chrome://openpgp/content/ui/enigmailKeyManager.xhtml:1
interface.js:48:17
Uncaught TypeError: can't access property "length", res.importedKeys is undefined
importKeyFromFile chrome://openpgp/content/modules/keyRing.jsm:364
EnigmailCommon_importKeysFromFile chrome://openpgp/content/ui/commonWorkflows.js:107
oncommand chrome://openpgp/content/ui/enigmailKeyManager.xhtml:1
keyRing.jsm:364:9
Updated•4 years ago
|
See also bug 1638194 for similar problems.
Assignee | ||
Comment 2•4 years ago
|
||
Also adds feedback if key discovery yields no results.
Updated•4 years ago
|
Pushed by kaie@kuix.de:
https://hg.mozilla.org/comm-central/rev/f08360126daf
Give feedback on OpenPGP key import failure. r=PatrickBrunschwig
Updated•4 years ago
|
Assignee | ||
Comment 5•4 years ago
|
||
Found another scenario in which we don't give feedback.
Assignee | ||
Updated•4 years ago
|
Assignee | ||
Comment 6•4 years ago
|
||
Pushed by kaie@kuix.de:
https://hg.mozilla.org/comm-central/rev/e2a4ff696d51
Follow-up, show error message in additional failure scenario. r=PatrickBrunschwig
Assignee | ||
Comment 8•4 years ago
|
||
Comment on attachment 9154246 [details]
Bug 1638537 - Follow-up, show error message in additional failure scenario. r=PatrickBrunschwig
openpgp error feedback completeness
Comment 9•4 years ago
|
||
Comment on attachment 9154246 [details]
Bug 1638537 - Follow-up, show error message in additional failure scenario. r=PatrickBrunschwig
Approved for beta
Assignee | ||
Comment 10•4 years ago
|
||
Comment 11•4 years ago
|
||
Hi,
I have a .asc file containing a public key. I see that the option for import with open pgp key manager is greyed out. I am using Thunderbird 78.4.0 (64-bit). However I can click on the option to Decrypt and when that happens I get a popup with an message "null". Please let me know if I should create a new bug for this. I have tried the key file on both windows and Mac OS .
Assignee | ||
Comment 12•4 years ago
|
||
(In reply to shabrina.sharmin489 from comment #11)
Hi,
I have a .asc file containing a public key. I see that the option for import with open pgp key manager is greyed out.
It's not clear to which option you're referring. In key manager, the command "file / import public key from file" should never be greyed out.
However I can click on the option to Decrypt
Where do you see an option to decrypt?
Now it sounds like you weren't talking about openpgp key manager. It sounds like you are talking about an email, which had an .asc file attached, and you used the right click menu to open the popup menu, and you saw a menu entry "import openpgp key" which was disabled / greyed out.
This option is enabled, only, if we're certain that the attachment contains a key. We only are certain if the sending email program has indicated a special "type" of attachment (content type: application/pgp-keys).
It sounds like in your scenario we don't see this content type, and therefore disable the command.
You can use the following work around: Right click the attachment, and use Save As to save it to a file. Then open the OpenPGP key manager, and use command "file / import public key from file", and select the file you have saved.
Comment 13•4 years ago
|
||
Hope this is the right place to
I have a similar issue, but when importing an attached public key from an email (without using the key management). Most of the time the import fails silently. saving the key to disk and then importing as a file from key management works fine, so the problem is not with the keys.
I am using thunderbird (75.5.0) as a flatpak package and only running it via cli does not produce any outputs. I don't know which keyword is appropriate to get a useful debug log however.
Comment 14•4 years ago
|
||
(In reply to usi from comment #13)
Hope this is the right place to
I have a similar issue, but when importing an attached public key from an email (without using the key management). Most of the time the import fails silently. saving the key to disk and then importing as a file from key management works fine, so the problem is not with the keys.I am using thunderbird (75.5.0) as a flatpak package and only running it via cli does not produce any outputs. I don't know which keyword is appropriate to get a useful debug log however.
I can confirm usi's problems on Windows with TB 78.5.1.
Should we reopen this ticket or file a new one, because it concerns attachments?
Assignee | ||
Comment 15•4 years ago
|
||
usi, Thomas, are you using macOS ?
If yes, it's probably because of regression bug 1680757.
Comment 16•4 years ago
|
||
(In reply to Kai Engert (:KaiE:) from comment #15)
usi, Thomas, are you using macOS ?
If yes, it's probably because of regression bug 1680757.
I'm using the flatpak build on manjaro linux.
Comment 17•4 years ago
|
||
(In reply to Kai Engert (:KaiE:) from comment #15)
usi, Thomas, are you using macOS ?
If yes, it's probably because of regression bug 1680757.
No, Windows 10 1909.
Saving the attached public key and importing it from within Key Management works fine. It's just when clicking on the attachment and answering the message box that pops up, if TB should import the key, with yes, it will fail.
Comment 18•4 years ago
|
||
I also experience silent import failures with Firefox 78.5.1 (64-bit) and with the current Firefox beta (the nightly build does not have this bug) on macOS Bug Sur 11.0.1. But in my case the error console reports a 'TypeError: "x" is not a function' error:
Uncaught (in promise) TypeError: fileObj.exists is not a function
readFile chrome://openpgp/content/modules/files.jsm:200
getKeyListFromKeyFile chrome://openpgp/content/modules/key.jsm:188
importSecretKey chrome://openpgp/content/ui/keyWizard.js:792
Should I open a separate issue for this bug or is this the the right place?
Assignee | ||
Comment 19•4 years ago
|
||
78.6.0 will have to fixes for handling of key attachments, and to key importing.
At this point it is unclear to me if your reports are related to those, or if they are different.
I would like to ask you, please test if your scenarios are fixed with 78.6.0.
If it still doesn't work, please file a new bug report, and describe in detail what exactly you click, and ideally, please provide a copy of the message that contains the attached key.
We usually don't open up old bug reports, because that is confusing for tracking fixes and the versions they are fixed in. If a bug is fixed, and a new problem is found, it's usually a different cause.
Comment 20•4 years ago
|
||
With 78.6.0 Thunderbird will no longer try to import the attached public key. Here, on Windows, it opens up the external key management software Kleopatra -- which is not really helpful but at least it no longer pretends to have imported the key.
Comment 21•4 years ago
|
||
Ahh: I discovered the import option in the context menu of the attachment, which seems to work now.
Comment 22•4 years ago
|
||
78.6.0 fixed the problem for me I had with importing keys (TypeError: fileObj.exists is not a function
).
Description
•