Use rustls-platform-verifier for TLS certificate verification instead of webpki + Use aws-lc for cryptographic operations instead of ring

This commit is contained in:
Maurus Decimus
2026-04-04 12:23:30 +02:00
parent c44d3da6dc
commit 71f54f7e84
80 changed files with 1921 additions and 2198 deletions

View File

@@ -1,6 +1,6 @@
[package]
name = "email"
version = "0.15.5"
version = "0.16.0"
edition = "2024"
[dependencies]
@@ -25,9 +25,9 @@ aes = "0.8.3"
aes-gcm = "0.10.1"
aes-gcm-siv = "0.11.1"
cbc = { version = "0.1.2", features = ["alloc"] }
rasn = "0.10"
rasn-cms = "0.10"
rasn-pkix = "0.10"
rasn = "0.28"
rasn-cms = "0.28"
rasn-pkix = "0.28"
rsa = "0.9.2"
rand = "0.8"
sequoia-openpgp = { version = "2.0", default-features = false, features = ["crypto-rust", "allow-experimental-crypto", "allow-variable-time-crypto"] }

View File

@@ -17,7 +17,7 @@ use openpgp::{
types::{KeyFlags, SymmetricAlgorithm},
};
use rand::{RngCore, SeedableRng, rngs::StdRng};
use rasn::types::{ObjectIdentifier, OctetString};
use rasn::types::{ObjectIdentifier, OctetString, SetOf};
use rasn_cms::{
AlgorithmIdentifier, CONTENT_DATA, CONTENT_ENVELOPED_DATA, EncryptedContent,
EncryptedContentInfo, EncryptedKey, EnvelopedData, IssuerAndSerialNumber,
@@ -27,7 +27,7 @@ use rasn_cms::{
};
use rsa::{Pkcs1v15Encrypt, RsaPublicKey, pkcs1::DecodeRsaPublicKey};
use sequoia_openpgp as openpgp;
use std::{collections::BTreeSet, io::Cursor};
use std::io::Cursor;
#[derive(Debug)]
pub enum EncryptMessageError {
@@ -199,8 +199,7 @@ impl EncryptMessage for Message<'_> {
})?;
// Encrypt key using public keys
#[allow(clippy::mutable_key_type)]
let mut recipient_infos = BTreeSet::new();
let mut recipient_infos = SetOf::new();
for cert in keys.iter() {
let cert = rasn::der::decode::<rasn_pkix::Certificate>(cert).map_err(|err| {
EncryptMessageError::Error(format!("Failed to parse certificate: {}", err))