aboutsummaryrefslogtreecommitdiff
path: root/doh/ffi.rs
diff options
context:
space:
mode:
Diffstat (limited to 'doh/ffi.rs')
-rw-r--r--doh/ffi.rs3
1 files changed, 2 insertions, 1 deletions
diff --git a/doh/ffi.rs b/doh/ffi.rs
index 6e9f64ad..4ae49a80 100644
--- a/doh/ffi.rs
+++ b/doh/ffi.rs
@@ -19,6 +19,7 @@
use crate::boot_time::{timeout, BootTime, Duration};
use crate::dispatcher::{Command, Dispatcher, Response, ServerInfo};
use crate::network::{SocketTagger, ValidationReporter};
+use base64::{prelude::BASE64_URL_SAFE_NO_PAD, Engine};
use futures::FutureExt;
use libc::{c_char, int32_t, size_t, ssize_t, uint32_t, uint64_t};
use log::{error, warn};
@@ -270,7 +271,7 @@ pub unsafe extern "C" fn doh_query(
if let Some(expired_time) = BootTime::now().checked_add(t) {
let cmd = Command::Query {
net_id,
- base64_query: base64::encode_config(q, base64::URL_SAFE_NO_PAD),
+ base64_query: BASE64_URL_SAFE_NO_PAD.encode(q),
expired_time,
resp: resp_tx,
};