summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJustus Winter <justus@sequoia-pgp.org>2022-06-16 14:02:05 +0200
committerJustus Winter <justus@sequoia-pgp.org>2022-06-16 14:02:05 +0200
commit50fe7b13f17ca79b787b721d093a7d9929742cbc (patch)
tree6687a8bf163d1e9c14f42725420314477e7cfdbc
parenta6220348fea48481064f754041a7f76beab8eb24 (diff)
xxx armor before importing
-rw-r--r--ipc/tests/gpg-agent.rs8
1 files changed, 7 insertions, 1 deletions
diff --git a/ipc/tests/gpg-agent.rs b/ipc/tests/gpg-agent.rs
index 5f4d3d95..6e32534b 100644
--- a/ipc/tests/gpg-agent.rs
+++ b/ipc/tests/gpg-agent.rs
@@ -69,7 +69,13 @@ fn gpg_import(ctx: &Context, what: &[u8]) -> openpgp::Result<()> {
use std::process::{Command, Stdio};
let mut import_me = tempfile::NamedTempFile::new()?;
- import_me.write_all(what)?;
+ {
+ use openpgp::armor;
+ let mut w =
+ armor::Writer::new(&mut import_me, armor::Kind::SecretKey)?;
+ w.write_all(what)?;
+ w.finalize()?;
+ }
let import_me = import_me.into_temp_path();
let gpg = Command::new("gpg")