summaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authorJustus Winter <justus@sequoia-pgp.org>2019-06-10 15:12:09 +0200
committerJustus Winter <justus@sequoia-pgp.org>2019-06-10 16:56:48 +0200
commit2e1d21846d399dd50d2c4bb3c1dbf6b14ca97449 (patch)
tree6fd0ec1a310d3766d97414cca76fd9322b6114e9 /net
parentcdb25fd7dfb5957a103eadec3b26b4d98a98fa41 (diff)
net: Drop unused parameter.
Diffstat (limited to 'net')
-rw-r--r--net/src/async.rs11
-rw-r--r--net/src/lib.rs4
2 files changed, 7 insertions, 8 deletions
diff --git a/net/src/async.rs b/net/src/async.rs
index 0b000e84..68a5b61f 100644
--- a/net/src/async.rs
+++ b/net/src/async.rs
@@ -13,7 +13,6 @@ use native_tls::{Certificate, TlsConnector};
use percent_encoding::{percent_encode, DEFAULT_ENCODE_SET};
use std::convert::From;
use std::io::Cursor;
-use tokio_core::reactor::Handle;
use url::Url;
use openpgp::TPK;
@@ -43,7 +42,7 @@ const DNS_WORKER: usize = 4;
impl KeyServer {
/// Returns a handle for the given URI.
- pub fn new(ctx: &Context, uri: &str, _handle: &Handle) -> Result<Self> {
+ pub fn new(ctx: &Context, uri: &str) -> Result<Self> {
let uri: Url = uri.parse()
.or_else(|_| format!("hkps://{}", uri).parse())?;
@@ -62,8 +61,8 @@ impl KeyServer {
/// Returns a handle for the given URI.
///
/// `cert` is used to authenticate the server.
- pub fn with_cert(ctx: &Context, uri: &str, cert: Certificate,
- _handle: &Handle) -> Result<Self> {
+ pub fn with_cert(ctx: &Context, uri: &str, cert: Certificate)
+ -> Result<Self> {
let uri: Url = uri.parse()?;
let client: Box<AClient> = {
@@ -85,11 +84,11 @@ impl KeyServer {
/// The pool `hkps://hkps.pool.sks-keyservers.net` provides HKP
/// services over https. It is authenticated using a certificate
/// included in this library. It is a good default choice.
- pub fn sks_pool(ctx: &Context, handle: &Handle) -> Result<Self> {
+ pub fn sks_pool(ctx: &Context) -> Result<Self> {
let uri = "hkps://hkps.pool.sks-keyservers.net";
let cert = Certificate::from_der(
include_bytes!("sks-keyservers.netCA.der")).unwrap();
- Self::with_cert(ctx, uri, cert, handle)
+ Self::with_cert(ctx, uri, cert)
}
/// Common code for the above functions.
diff --git a/net/src/lib.rs b/net/src/lib.rs
index 53fcc2dd..45415e67 100644
--- a/net/src/lib.rs
+++ b/net/src/lib.rs
@@ -77,7 +77,7 @@ impl KeyServer {
/// Returns a handle for the given URI.
pub fn new(ctx: &Context, uri: &str) -> Result<Self> {
let core = Core::new()?;
- let ks = async::KeyServer::new(ctx, uri, &core.handle())?;
+ let ks = async::KeyServer::new(ctx, uri)?;
Ok(KeyServer{core: core, ks: ks})
}
@@ -86,7 +86,7 @@ impl KeyServer {
/// `cert` is used to authenticate the server.
pub fn with_cert(ctx: &Context, uri: &str, cert: Certificate) -> Result<Self> {
let core = Core::new()?;
- let ks = async::KeyServer::with_cert(ctx, uri, cert, &core.handle())?;
+ let ks = async::KeyServer::with_cert(ctx, uri, cert)?;
Ok(KeyServer{core: core, ks: ks})
}