mirror of
https://github.com/aramperes/onetun.git
synced 2025-09-09 06:38:32 -04:00
Pin older version of base64 for now
This commit is contained in:
parent
653c314409
commit
6f143280d1
3 changed files with 3 additions and 5 deletions
1
Cargo.lock
generated
1
Cargo.lock
generated
|
@ -445,6 +445,7 @@ dependencies = [
|
|||
"anyhow",
|
||||
"async-recursion",
|
||||
"async-trait",
|
||||
"base64",
|
||||
"boringtun",
|
||||
"bytes",
|
||||
"clap",
|
||||
|
|
|
@ -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"] }
|
||||
|
|
|
@ -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<X25519PublicKey> {
|
|||
|
||||
fn parse_preshared_key(s: Option<&str>) -> anyhow::Result<Option<[u8; 32]>> {
|
||||
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")
|
||||
})?))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue