summaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authorNeal H. Walfield <neal@pep.foundation>2018-07-24 15:55:14 +0200
committerNeal H. Walfield <neal@pep.foundation>2018-07-24 16:34:35 +0200
commit33fa2b6736ab0fbfa9d8e0d46686db64e8e1fc6d (patch)
treebd18333243576e36eaf3d97d93d08501fdf2573b /net
parent1ddd3a210e97a2f604873eacb7eb6eaf94bcb876 (diff)
openpgp: Support setting ASCII-armor's headers
Diffstat (limited to 'net')
-rw-r--r--net/src/async.rs7
1 files changed, 6 insertions, 1 deletions
diff --git a/net/src/async.rs b/net/src/async.rs
index 65e6cfed..7af6f2ae 100644
--- a/net/src/async.rs
+++ b/net/src/async.rs
@@ -155,7 +155,12 @@ impl KeyServer {
let mut armored_blob = vec![];
{
- let mut w = Writer::new(&mut armored_blob, Kind::PublicKey);
+ let mut w = match Writer::new(&mut armored_blob,
+ Kind::PublicKey, &[][..]) {
+ Err(e) => return Box::new(future::err(e.into())),
+ Ok(w) => w,
+ };
+
if let Err(e) = key.serialize(&mut w) {
return Box::new(future::err(e));
}