diff options
author | Neal H. Walfield <neal@pep.foundation> | 2019-05-10 15:53:40 +0200 |
---|---|---|
committer | Neal H. Walfield <neal@pep.foundation> | 2019-05-10 15:53:40 +0200 |
commit | 907331e6ace0c355d0e00614a31758c8d120b698 (patch) | |
tree | 08896a2f651a6a533e9a549ef8f88f865de861b1 /net | |
parent | b1e50de55bbfa5a2fcbde1baf30dc28f929f2f4e (diff) |
openpgp: Add a new parsing mode to the Armor Reader
- Add a strict "mode" to the armor reader that requires an armor
header line, but doesn't care what the header is.
- Closes issue #254.
Diffstat (limited to 'net')
-rw-r--r-- | net/src/async.rs | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/net/src/async.rs b/net/src/async.rs index 75885272..bc355eef 100644 --- a/net/src/async.rs +++ b/net/src/async.rs @@ -132,7 +132,9 @@ impl KeyServer { StatusCode::OK => { let c = Cursor::new(body.as_ref()); let r = armor::Reader::new( - c, Some(armor::Kind::PublicKey)); + c, + armor::ReaderMode::Tolerant( + Some(armor::Kind::PublicKey))); future::done(TPK::from_reader(r)) }, StatusCode::NOT_FOUND => |