From 6f143280d1712ef57cff29402ab1d436d7b2d395 Mon Sep 17 00:00:00 2001 From: Aram Peres <6775216+aramperes@users.noreply.github.com> Date: Mon, 2 Oct 2023 17:07:37 -0400 Subject: [PATCH] Pin older version of base64 for now --- Cargo.lock | 1 + Cargo.toml | 2 +- src/config.rs | 5 +---- 3 files changed, 3 insertions(+), 5 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index c8aa0ac..3578048 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -445,6 +445,7 @@ dependencies = [ "anyhow", "async-recursion", "async-trait", + "base64", "boringtun", "bytes", "clap", diff --git a/Cargo.toml b/Cargo.toml index 4dee3d7..e9054eb 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -22,7 +22,7 @@ async-trait = "0.1" priority-queue = "1.3.0" smoltcp = { version = "0.8.2", default-features = false, features = ["std", "log", "medium-ip", "proto-ipv4", "proto-ipv6", "socket-udp", "socket-tcp"] } bytes = "1" -base64 = "0.21" +base64 = "0.13" # forward boringtuns tracing events to log tracing = { version = "0.1", default-features = false, features = ["log"] } diff --git a/src/config.rs b/src/config.rs index 54839cf..576923a 100644 --- a/src/config.rs +++ b/src/config.rs @@ -6,7 +6,6 @@ use std::net::{IpAddr, SocketAddr, ToSocketAddrs}; use std::sync::Arc; use anyhow::Context; -use base64::prelude::{Engine as _, BASE64_STANDARD}; pub use boringtun::crypto::{X25519PublicKey, X25519SecretKey}; const DEFAULT_PORT_FORWARD_SOURCE: &str = "127.0.0.1"; @@ -317,9 +316,7 @@ fn parse_public_key(s: Option<&str>) -> anyhow::Result { fn parse_preshared_key(s: Option<&str>) -> anyhow::Result> { if let Some(s) = s { - let psk = BASE64_STANDARD - .decode(s) - .with_context(|| "Invalid pre-shared key")?; + let psk = base64::decode(s).with_context(|| "Invalid pre-shared key")?; Ok(Some(psk.try_into().map_err(|_| { anyhow::anyhow!("Unsupported pre-shared key") })?))