deltachat-core-rust
deltachat-core-rust copied to clipboard
Attempt to import encrypted key fails with `nom` parser error
I generated a passphrase-protected key:
$ sq key generate --userid [email protected] --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
Upstream issue: https://github.com/rpgp/rpgp/issues/46
This issue can be closed once we update rPGP.