diff options
author | Neal H. Walfield <neal@pep.foundation> | 2023-05-16 10:19:56 +0200 |
---|---|---|
committer | Neal H. Walfield <neal@pep.foundation> | 2023-05-16 10:19:56 +0200 |
commit | 413b77d178cd4d13d31a2b0bfd4afe655b9434d7 (patch) | |
tree | c942f66af6715735d8168c9df54ab04a2a066154 | |
parent | b1e6ca1ab750809a07e71e49430fea5c7d9e9e9b (diff) |
autocrypt: Upgrade base64.
- Upgrade base64 to version 0.21.
-rw-r--r-- | Cargo.lock | 12 | ||||
-rw-r--r-- | autocrypt/Cargo.toml | 2 | ||||
-rw-r--r-- | autocrypt/src/lib.rs | 7 |
3 files changed, 9 insertions, 12 deletions
@@ -95,12 +95,6 @@ checksum = "4c7f02d4ea65f2c1853089ffd8d2787bdbc63de2f0d29dedbcf8ccdfa0ccd4cf" [[package]] name = "base64" -version = "0.13.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9e1b586273c5702936fe7b7d6896644d8be71e6314cfe09d3167c95f712589e8" - -[[package]] -name = "base64" version = "0.21.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a4a4ddaa51a5bc52a6948f74c06d20aaaddb71924eab79b8c97a8c556e942d6a" @@ -2242,7 +2236,7 @@ dependencies = [ name = "sequoia-autocrypt" version = "0.25.0" dependencies = [ - "base64 0.13.1", + "base64", "sequoia-openpgp", ] @@ -2288,7 +2282,7 @@ name = "sequoia-net" version = "0.27.0" dependencies = [ "anyhow", - "base64 0.21.0", + "base64", "futures-util", "http", "hyper", @@ -2313,7 +2307,7 @@ version = "1.15.0" dependencies = [ "aes", "anyhow", - "base64 0.21.0", + "base64", "block-padding", "blowfish", "botan", diff --git a/autocrypt/Cargo.toml b/autocrypt/Cargo.toml index b91c3edc..a25223c5 100644 --- a/autocrypt/Cargo.toml +++ b/autocrypt/Cargo.toml @@ -23,7 +23,7 @@ maintenance = { status = "actively-developed" } [dependencies] sequoia-openpgp = { path = "../openpgp", version = "1.13", default-features = false } -base64 = ">=0.12, <0.20" +base64 = "0.21" [lib] bench = false diff --git a/autocrypt/src/lib.rs b/autocrypt/src/lib.rs index ba88fcef..e5fae326 100644 --- a/autocrypt/src/lib.rs +++ b/autocrypt/src/lib.rs @@ -21,6 +21,9 @@ use std::path::Path; use std::fs::File; use std::str; +use base64::Engine; +use base64::engine::general_purpose::STANDARD as base64std; + use sequoia_openpgp as openpgp; use openpgp::armor; use openpgp::Error; @@ -203,7 +206,7 @@ impl AutocryptHeader { let mut buf = Vec::new(); self.key.as_ref().unwrap().serialize(&mut buf)?; - write!(o, "keydata={} ", base64::encode(&buf))?; + write!(o, "keydata={} ", base64std.encode(&buf))?; Ok(()) } @@ -309,7 +312,7 @@ impl AutocryptHeaders { }; if key == "keydata" { - if let Ok(decoded) = base64::decode( + if let Ok(decoded) = base64std.decode( &value.replace(' ', "")[..]) { if let Ok(cert) = Cert::from_bytes(&decoded[..]) { header.key = Some(cert); |