chiark / gitweb /
Bump base64 dependency to 0.21 and fix code to build with it
authorPeter Michael Green <plugwash@debian.org>
Thu, 15 Jun 2023 01:27:41 +0000 (02:27 +0100)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Thu, 15 Jun 2023 01:38:47 +0000 (02:38 +0100)
Make debian dependency on base64 match the versioning in Cargo.toml.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
Cargo.toml
client/client.rs
debian/control
server/sweb.rs
src/prelude.rs

index 16f9cd740200998657ac665f9172de6f61c2de4a..ebb5c77037a6bcd83eefa8524e8fd53fd6659c86 100644 (file)
@@ -30,7 +30,7 @@ hippotat-macros = { version = "1.1.3", path = "macros" }
 # versions specified here are mostly just guesses at what is needed
 # (or currently available):
 backtrace = "0.3"
-base64 = "0.13" # 0.20 has substantially incompatible API (there's no 0.14)
+base64 = "0.21" # 0.20 has substantially incompatible API (there's no 0.14)
 clap = { version = "3", features = ["derive"] }
 easy-ext = "1"
 educe = "0.4"
index 77a816473574fe854b42c377ad1ccc9f720a1d99..0f03a6a342270c93fb7e03807fa94ad685b7af22 100644 (file)
@@ -71,7 +71,7 @@ fn submit_request<'r, 'c:'r, C:Hcc>(
   //dbg!(DumpHex(&hmac));
   let mut token = time_t;
   write!(token, " ").unwrap();
-  base64::encode_config_buf(hmac, BASE64_CONFIG, &mut token);
+  BASE64_CONFIG.encode_string(hmac, &mut token);
 
   let req_num = { *req_num += 1; *req_num };
 
index be235c36c5f2d5b2751212b1971ecbdb072a41b7..07fdcda09d79b5a6594237e798acc96e8ec303be 100644 (file)
@@ -9,7 +9,7 @@ Build-Depends: debhelper (>= 12), cargo, rustc, python3-sphinx,
                moreutils, libssl-dev (>= 1.1), pkg-config,
 # debian/update-build-deps manages these:
     librust-backtrace-dev <!upstream-cargo>,
-    librust-base64-dev <!upstream-cargo>,
+    librust-base64-0.21-dev <!upstream-cargo>,
     librust-clap-3+derive-dev <!upstream-cargo>,
     librust-easy-ext-dev <!upstream-cargo>,
     librust-educe-dev <!upstream-cargo>,
index 3d0c29eed1ce51bc781ef95b92eb0272863428b6..dc962c17a4b17865312c75baef9cafe9b4346751 100644 (file)
@@ -121,7 +121,7 @@ pub async fn handle(
       let time_t = u64::from_str_radix(time_t, 16).context("parse time_t")?;
       let l = io::copy(
         &mut base64::read::DecoderReader::new(&mut hmac_b64.as_bytes(),
-                                              BASE64_CONFIG),
+                                              &BASE64_CONFIG),
         &mut &mut hmac_got[..]
       ).context("parse b64 token")?;
       let l = l.try_into()?;
index 105734561e21b3cdca46d863bea2aad6a5cab409..799c27c6b4dc0958fa8b995bda2ce13baeef7e04 100644 (file)
@@ -83,6 +83,7 @@ pub const SLIP_MIME_ESC: u8 = b'-'; // 2d
 
 pub const MAX_OVERHEAD: usize = 2_000;
 
-pub use base64::STANDARD as BASE64_CONFIG;
+pub use base64::engine::Engine;
+pub use base64::engine::general_purpose::STANDARD as BASE64_CONFIG;
 
 pub fn default<T:Default>() -> T { Default::default() }