From 8ec7576cf4a2adc4616a9d10b4a910b6259e9fa9 Mon Sep 17 00:00:00 2001 From: 0x676e67 Date: Sun, 6 Jul 2025 17:59:49 +0800 Subject: [PATCH] feat: Add Hash impls for extension types (#84) --- boring/src/ssl/mod.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/boring/src/ssl/mod.rs b/boring/src/ssl/mod.rs index 1efc7c8d..f340be1e 100644 --- a/boring/src/ssl/mod.rs +++ b/boring/src/ssl/mod.rs @@ -533,7 +533,7 @@ impl SelectCertError { /// ExtensionType that is not defined by the impl. `From` will be deprecated in favor of `TryFrom` /// in the next major bump of the library. #[repr(transparent)] -#[derive(Debug, Copy, Clone, PartialEq, Eq)] +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] pub struct ExtensionType(u16); impl ExtensionType { @@ -581,7 +581,7 @@ impl From for ExtensionType { } /// An SSL/TLS protocol version. -#[derive(Copy, Clone, PartialEq, Eq)] +#[derive(Copy, Clone, Hash, PartialEq, Eq)] pub struct SslVersion(u16); impl SslVersion { @@ -836,7 +836,7 @@ impl CompliancePolicy { } // IANA assigned identifier of compression algorithm. See https://www.rfc-editor.org/rfc/rfc8879.html#name-compression-algorithms -#[derive(Debug, Copy, Clone, PartialEq, Eq)] +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] pub struct CertificateCompressionAlgorithm(u16); impl CertificateCompressionAlgorithm {