update to alpha.6

This commit is contained in:
Jan Rüth 2023-11-30 17:16:50 +01:00 committed by Jan
commit 9af16cef17
5 changed files with 8 additions and 12 deletions

View file

@ -19,9 +19,9 @@ resolver = "2"
[workspace.dependencies] [workspace.dependencies]
boring = { version = "4", default-features = false } boring = { version = "4", default-features = false }
boring-sys = { version = "4", default-features = false } boring-sys = { version = "4", default-features = false }
rustls = { version = "=0.22.0-alpha.5", default-features = false } rustls = { version = "=0.22.0-alpha.6", default-features = false }
rustls-pemfile = { version = "=2.0.0-alpha.2" } rustls-pemfile = { version = "=2.0.0-alpha.2" }
rustls-pki-types = { version = "=0.2.2" } rustls-pki-types = { version = "0.2.3" }
tokio-rustls = { version = "0.25.0-alpha.3" } tokio-rustls = { version = "0.25.0-alpha.4" }
webpki = { package = "rustls-webpki", version = "0.102.0-alpha.7", default-features = false, features = ["alloc", "std"] } webpki = { package = "rustls-webpki", version = "0.102.0-alpha.7", default-features = false }
webpki-roots = { version = "=0.26.0-alpha.2" } webpki-roots = { version = "=0.26.0-alpha.2" }

View file

@ -7,8 +7,6 @@ use crate::helper::{cvt, log_and_map};
pub struct PrfTls1WithDigest(pub boring::nid::Nid); pub struct PrfTls1WithDigest(pub boring::nid::Nid);
pub struct MySecret(Vec<u8>);
impl crypto::tls12::Prf for PrfTls1WithDigest { impl crypto::tls12::Prf for PrfTls1WithDigest {
fn for_key_exchange( fn for_key_exchange(
&self, &self,
@ -23,12 +21,7 @@ impl crypto::tls12::Prf for PrfTls1WithDigest {
let secret = kx.complete(peer_pub_key)?; let secret = kx.complete(peer_pub_key)?;
let secret: MySecret = unsafe { prf(digest, output, secret.secret_bytes(), label, seed)
// I don't see another way to get to the secret...
std::mem::transmute(secret)
};
prf(digest, output, &secret.0, label, seed)
.map_err(|e| log_and_map("prf", e, rustls::Error::General("failed on prf".into()))) .map_err(|e| log_and_map("prf", e, rustls::Error::General("failed on prf".into())))
} }

View file

@ -4,6 +4,7 @@ use rustls_pki_types::{InvalidSignature, SignatureVerificationAlgorithm};
use crate::helper; use crate::helper;
#[derive(Debug)]
pub struct BoringEcVerifier(SignatureScheme); pub struct BoringEcVerifier(SignatureScheme);
impl BoringEcVerifier { impl BoringEcVerifier {

View file

@ -7,6 +7,7 @@ use rustls_pki_types::{InvalidSignature, SignatureVerificationAlgorithm};
use crate::helper::{cvt_p, log_and_map}; use crate::helper::{cvt_p, log_and_map};
#[derive(Debug)]
pub struct BoringEdVerifier(SignatureScheme); pub struct BoringEdVerifier(SignatureScheme);
impl BoringEdVerifier { impl BoringEdVerifier {

View file

@ -11,6 +11,7 @@ use spki::der::Reader;
use crate::helper::log_and_map; use crate::helper::log_and_map;
#[derive(Debug)]
pub struct BoringRsaVerifier(SignatureScheme); pub struct BoringRsaVerifier(SignatureScheme);
impl BoringRsaVerifier { impl BoringRsaVerifier {