summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNeal H. Walfield <neal@pep.foundation>2023-05-16 10:08:23 +0200
committerNeal H. Walfield <neal@pep.foundation>2023-05-16 10:08:23 +0200
commitb1e6ca1ab750809a07e71e49430fea5c7d9e9e9b (patch)
tree552ba09c7019acceacf0928f14db0545722e733a
parentb69c6bd25a5081d634f69aa36addefd8083f96ef (diff)
net: Upgrade base64.
- Upgrade base64 to version 0.21.
-rw-r--r--Cargo.lock2
-rw-r--r--net/Cargo.toml2
-rw-r--r--net/src/pks.rs5
3 files changed, 6 insertions, 3 deletions
diff --git a/Cargo.lock b/Cargo.lock
index 3a2eff2f..f7d9aecf 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -2288,7 +2288,7 @@ name = "sequoia-net"
version = "0.27.0"
dependencies = [
"anyhow",
- "base64 0.13.1",
+ "base64 0.21.0",
"futures-util",
"http",
"hyper",
diff --git a/net/Cargo.toml b/net/Cargo.toml
index 30d4daa5..283c36b5 100644
--- a/net/Cargo.toml
+++ b/net/Cargo.toml
@@ -37,7 +37,7 @@ thiserror = "1.0.2"
url = "2.1"
zbase32 = "0.1.2"
tokio = { version = "1.13.1", features = [ "macros" ] }
-base64 = ">=0.12, <0.20"
+base64 = "0.21"
trust-dns-client = "0.22"
trust-dns-resolver = { version = "0.22", features = ["dnssec-openssl"]}
diff --git a/net/src/pks.rs b/net/src/pks.rs
index 4497a154..f1bbc6bd 100644
--- a/net/src/pks.rs
+++ b/net/src/pks.rs
@@ -30,6 +30,9 @@ use openpgp::Fingerprint;
use hyper::{Body, Client, Uri, client::HttpConnector, Request, HeaderMap, header::HeaderValue};
use hyper_tls::HttpsConnector;
+use base64::Engine;
+use base64::engine::general_purpose::STANDARD as base64std;
+
use super::Result;
use url::Url;
@@ -104,7 +107,7 @@ fn create_request_params(store_uri: &str, fingerprint: &Fingerprint, capability:
let auth = if !url.username().is_empty() {
let password = url.password().unwrap_or_default();
let credentials = format!("{}:{}", url.username(), password);
- Some(format!("Basic {}", base64::encode(credentials)))
+ Some(format!("Basic {}", base64std.encode(credentials)))
} else {
None
};