summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNeal H. Walfield <neal@pep.foundation>2023-10-26 14:03:38 +0200
committerNeal H. Walfield <neal@pep.foundation>2023-10-26 14:03:38 +0200
commit27e4f81462879b059471f44acec465050d99c72d (patch)
treed920bd71fafc8f6cbe17ea4ac3e201ae1c77c1ac
parent20556b4d61e8f5e4c087af8064ea87c3270e28a2 (diff)
openpgp: Drop generic-array direct dependency
- Use `cipher`'s reexport of `generic-array` instead of directly depending on `generic-array` and having to worry about synchronizing the versions.
-rw-r--r--Cargo.lock1
-rw-r--r--openpgp/Cargo.toml3
-rw-r--r--openpgp/src/crypto/backend/rust.rs2
-rw-r--r--openpgp/src/crypto/backend/rust/aead.rs2
-rw-r--r--openpgp/src/crypto/backend/rust/symmetric.rs2
5 files changed, 4 insertions, 6 deletions
diff --git a/Cargo.lock b/Cargo.lock
index b9ba7f77..f0c26712 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -2577,7 +2577,6 @@ dependencies = [
"ed25519",
"ed25519-dalek",
"flate2",
- "generic-array",
"getrandom",
"idea",
"idna 0.3.0",
diff --git a/openpgp/Cargo.toml b/openpgp/Cargo.toml
index 50d450de..11ad3c9f 100644
--- a/openpgp/Cargo.toml
+++ b/openpgp/Cargo.toml
@@ -78,7 +78,6 @@ ecdsa = { version = "0.16", optional = true, features = ["hazmat", "arithmetic"]
# std::error::Error.
ed25519 = { version = "2", default-features = false, features = ["std"], optional = true }
ed25519-dalek = { version = "2", features = ["rand_core", "zeroize"], optional = true }
-generic-array = { version = "0.14.4", optional = true }
idea = { version = "0.5", optional = true, features = ["zeroize"] }
md-5 = { version = "0.10", features = ["oid"], optional = true }
num-bigint-dig = { version = "0.8", default-features = false, optional = true }
@@ -113,7 +112,7 @@ default = ["compression", "crypto-nettle"]
crypto-nettle = ["nettle"]
crypto-rust = [
"aes", "block-padding", "blowfish", "camellia", "cast5", "cfb-mode", "cipher", "des",
- "digest", "eax", "ecb", "ed25519", "ed25519-dalek", "generic-array", "idea",
+ "digest", "eax", "ecb", "ed25519", "ed25519-dalek", "idea",
"md-5", "num-bigint-dig", "ripemd", "rsa", "sha2",
"sha1collisiondetection/digest-trait", "sha1collisiondetection/oid",
"twofish", "typenum", "x25519-dalek", "p256",
diff --git a/openpgp/src/crypto/backend/rust.rs b/openpgp/src/crypto/backend/rust.rs
index 90e0ed16..e373dba3 100644
--- a/openpgp/src/crypto/backend/rust.rs
+++ b/openpgp/src/crypto/backend/rust.rs
@@ -1,7 +1,7 @@
//! Implementation of Sequoia crypto API using pure Rust cryptographic
//! libraries.
-use generic_array::{ArrayLength, GenericArray};
+use cipher::generic_array::{ArrayLength, GenericArray};
use crate::{Error, Result};
use crate::types::*;
diff --git a/openpgp/src/crypto/backend/rust/aead.rs b/openpgp/src/crypto/backend/rust/aead.rs
index 9bd4a317..69f67940 100644
--- a/openpgp/src/crypto/backend/rust/aead.rs
+++ b/openpgp/src/crypto/backend/rust/aead.rs
@@ -6,7 +6,7 @@ use std::cmp::Ordering;
use cipher::{BlockCipher, BlockEncrypt, BlockSizeUser, KeyInit, Unsigned};
use cipher::consts::{U12, U16};
use eax::online::{Eax, Encrypt, Decrypt};
-use generic_array::GenericArray;
+use cipher::generic_array::GenericArray;
use crate::{Error, Result};
use crate::crypto::aead::{Aead, CipherOp};
diff --git a/openpgp/src/crypto/backend/rust/symmetric.rs b/openpgp/src/crypto/backend/rust/symmetric.rs
index 1869f1b9..f96def91 100644
--- a/openpgp/src/crypto/backend/rust/symmetric.rs
+++ b/openpgp/src/crypto/backend/rust/symmetric.rs
@@ -4,7 +4,7 @@ use cipher::BlockDecryptMut;
use cipher::BlockEncryptMut;
use cipher::KeyInit;
use cipher::KeyIvInit;
-use generic_array::{ArrayLength, GenericArray};
+use cipher::generic_array::{ArrayLength, GenericArray};
use crate::{Error, Result};
use crate::crypto::symmetric::Mode;