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

Error during importing Public keys from a file #5146

Closed
DenBond7 opened this issue May 10, 2023 · 8 comments · Fixed by #5155
Closed

Error during importing Public keys from a file #5146

DenBond7 opened this issue May 10, 2023 · 8 comments · Fixed by #5155
Assignees
Labels

Comments

@DenBond7
Copy link

I'm working on FlowCrypt/flowcrypt-android#1692. After trying to import the provided file with public keys I saw the following
image

This file contains a lot of public keys. Maybe we have to allow importing good keys and show a warning for bad keys.
@sosnovsky I will send you the file.

@sosnovsky
Copy link
Collaborator

This file contains a lot of public keys. Maybe we have to allow importing good keys and show a warning for bad keys.
@sosnovsky I will send you the file.

Usually it works the way you described - valid keys are imported, and for invalid ones we show warning (https://github.com/FlowCrypt/flowcrypt-browser/blob/master/extension/chrome/settings/modules/contacts.ts#L111).

Maybe currently all keys are invalid in provided file, as it's more than 1 year old and keys can expire since then.

@DenBond7 were you able to import any key from this file on Android?

@DenBond7
Copy link
Author

Usually it works the way you described - valid keys are imported, and for invalid ones we show warning

Yes, for example for this file pub_keys_5_good_1_unsupported.txt

image

@DenBond7 were you able to import any key from this file on Android?

Yup. This one FlowCrypt/flowcrypt-android#2326 allows doing that.

@sosnovsky
Copy link
Collaborator

Yes, for example for this file pub_keys_5_good_1_unsupported.txt

Yeah, current UI isn't very informative, I'll file separate issue for it, thanks for reporting!

@ioanmo226
Copy link
Collaborator

Please send me key file you are testing

@DenBond7
Copy link
Author

Please send me key file you are testing

I've sent ))

@sosnovsky
Copy link
Collaborator

@ioanmo226 during my check I found that issue probably happens at getSortedUserids

@ioanmo226
Copy link
Collaborator

ioanmo226 commented May 10, 2023

From my research, this error happens at below line (OpenPGP verifyAllUsers function returns error for current key)and I can see that Mart already reported issue at OpenPGP.
@sosnovsky I think we should wait for next OpenPGP release and just update OpenPGP version.
Let me know what you think.

...Value.arr.unique((await key.verifyAllUsers()).filter(x => x.valid && x.userID !== primaryUserId).map(x => x.userID)),

openpgpjs/openpgpjs#1637

@sosnovsky
Copy link
Collaborator

@sosnovsky I think we should wait for next OpenPGP release and just update OpenPGP version.

Agree 👍 Then nothing needs to be done here for now, just re-check that issue is fixed with the next openpgp release.
Thanks for checking!

sosnovsky pushed a commit that referenced this issue May 17, 2023
* fix: import multiple public keys issue

* fix: remove console.log

* feat: added ui test

* fix: ui test
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants