summaryrefslogtreecommitdiffstats
path: root/net/src/lib.rs
diff options
context:
space:
mode:
authorjuga <juga@sequoia-pgp.org>2019-05-24 11:42:22 +0000
committerjuga <juga@sequoia-pgp.org>2019-05-28 11:29:01 +0000
commit32795158e702c70d000b0f48d221950050bd5c2a (patch)
tree4c110943d30e4aa67517d8a74a3ac55921b4a721 /net/src/lib.rs
parenta9f020e55d3102f4662233f70badfcf5e7319433 (diff)
net: Add wkd module implementing a WKD client
- Also add an async::wkd module. - Part of #251.
Diffstat (limited to 'net/src/lib.rs')
-rw-r--r--net/src/lib.rs13
1 files changed, 13 insertions, 0 deletions
diff --git a/net/src/lib.rs b/net/src/lib.rs
index c9f7cd0a..53fcc2dd 100644
--- a/net/src/lib.rs
+++ b/net/src/lib.rs
@@ -34,6 +34,7 @@
extern crate sequoia_openpgp as openpgp;
extern crate sequoia_core;
+extern crate sequoia_rfc2822 as rfc2822;
#[macro_use]
extern crate failure;
@@ -42,11 +43,13 @@ extern crate http;
extern crate hyper;
extern crate hyper_tls;
extern crate native_tls;
+extern crate nettle;
extern crate tokio_core;
extern crate tokio_io;
#[macro_use]
extern crate percent_encoding;
extern crate url;
+extern crate zbase32;
use hyper::client::{ResponseFuture, HttpConnector};
use hyper::{Client, Request, Body};
@@ -62,6 +65,7 @@ use sequoia_core::Context;
pub mod async;
use async::url2uri;
+pub mod wkd;
/// For accessing keyservers using HKP.
pub struct KeyServer {
@@ -169,6 +173,15 @@ pub enum Error {
/// A `native_tls::Error` occurred.
#[fail(display = "TLS Error")]
TlsError(native_tls::Error),
+
+ /// wkd errors:
+ /// An email address is malformed
+ #[fail(display = "Malformed email address {}", _0)]
+ MalformedEmail(String),
+
+ /// An email address was not found in TPK userids.
+ #[fail(display = "Email address {} not found in TPK's userids", _0)]
+ EmailNotInUserids(String),
}
impl From<http::Error> for Error {