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

Attempt to import encrypted key fails with nom parser error #5095

Closed
link2xt opened this issue Dec 9, 2023 · 1 comment
Closed

Attempt to import encrypted key fails with nom parser error #5095

link2xt opened this issue Dec 9, 2023 · 1 comment
Assignees
Labels
bug Something is not working

Comments

@link2xt
Copy link
Collaborator

link2xt commented Dec 9, 2023

I generated a passphrase-protected key:

$ sq key generate --userid bob@example.org --output key.asc --with-password 
Enter password to protect the key: 
Repeat the password once more:

(entered 123 as a password twice)

Then tried to import the key:

$ RUST_LOG=deltachat_repl=info cargo run -p deltachat-repl -- deltachat-db
...
Delta Chat Core is awaiting your commands.
 INFO  deltachat_repl > src/sql.rs:292: Opened database "deltachat-db".
> import-keys key.asc
 INFO  deltachat_repl > src/imex.rs:378: Import/export dir: key.asc
 INFO  deltachat_repl > Received IMEX_PROGRESS(10 ‰)
 INFO  deltachat_repl > src/imex.rs:616: Importing secret key from key.asc as the default key.
Error: incomplete input: Size(5220)
 ERROR deltachat_repl > IMEX failed to complete: incomplete input: Size(5220)
 INFO  deltachat_repl > Received IMEX_PROGRESS(0 ‰)

This actually should be fixed in rPGP, but I have not tried to make a testcase for rPGP yet.

"incomplete input" is an internal parser error rather than a proper error that tells users what the problem is.
Originally reported at https://support.delta.chat/t/cannot-import-private-key-from-text-file/2846

@link2xt link2xt added the bug Something is not working label Dec 9, 2023
@link2xt link2xt self-assigned this Dec 17, 2023
@link2xt
Copy link
Collaborator Author

link2xt commented Dec 17, 2023

Upstream issue: rpgp/rpgp#46

This issue can be closed once we update rPGP.

@link2xt link2xt closed this as completed Apr 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something is not working
Projects
None yet
Development

No branches or pull requests

1 participant