From 3d4bd17a2ea0540254c66f8da0d3080a16d6d2fb Mon Sep 17 00:00:00 2001 From: nighthawk24 Date: Tue, 20 Feb 2024 15:59:29 +0100 Subject: [PATCH] net/transport/tls | crypto/constants : Match the order of impl members with the trait --- src/net/transport/tls.rs | 20 ++++++++++---------- src/sdk/src/crypto/constants/fixed_bases.rs | 2 +- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/src/net/transport/tls.rs b/src/net/transport/tls.rs index df14ab9ff..7f8a2b9ed 100644 --- a/src/net/transport/tls.rs +++ b/src/net/transport/tls.rs @@ -71,10 +71,6 @@ fn validate_dnsname(cert: &X509Certificate) -> std::result::Result<(), rustls::E #[derive(Debug)] struct ServerCertificateVerifier; impl ServerCertVerifier for ServerCertificateVerifier { - fn supported_verify_schemes(&self) -> Vec { - vec![SignatureScheme::ED25519] - } - fn verify_server_cert( &self, end_entity: &CertificateDer, @@ -151,20 +147,20 @@ impl ServerCertVerifier for ServerCertificateVerifier { Ok(HandshakeSignatureValid::assertion()) } + + fn supported_verify_schemes(&self) -> Vec { + vec![SignatureScheme::ED25519] + } } #[derive(Debug)] struct ClientCertificateVerifier; impl ClientCertVerifier for ClientCertificateVerifier { - fn supported_verify_schemes(&self) -> Vec { - vec![SignatureScheme::ED25519] - } - - fn client_auth_mandatory(&self) -> bool { + fn offer_client_auth(&self) -> bool { true } - fn offer_client_auth(&self) -> bool { + fn client_auth_mandatory(&self) -> bool { true } @@ -246,6 +242,10 @@ impl ClientCertVerifier for ClientCertificateVerifier { Ok(HandshakeSignatureValid::assertion()) } + + fn supported_verify_schemes(&self) -> Vec { + vec![SignatureScheme::ED25519] + } } pub struct TlsUpgrade { diff --git a/src/sdk/src/crypto/constants/fixed_bases.rs b/src/sdk/src/crypto/constants/fixed_bases.rs index d73280a38..495f1920c 100644 --- a/src/sdk/src/crypto/constants/fixed_bases.rs +++ b/src/sdk/src/crypto/constants/fixed_bases.rs @@ -133,8 +133,8 @@ impl ConstBaseFieldElement { impl FixedPoints for OrchardFixedBases { type FullScalar = OrchardFixedBasesFull; - type Base = ConstBaseFieldElement; type ShortScalar = ValueCommitV; + type Base = ConstBaseFieldElement; } impl FixedPoint for OrchardFixedBasesFull {