Skip to content

Commit

Permalink
Impl From for SslSignatureAlgorithm
Browse files Browse the repository at this point in the history
This is useful for comparing raw u16s with the various sigalg constants.
  • Loading branch information
rushilmehra committed Jun 14, 2024
1 parent b3eaacc commit b7fea02
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions boring/src/ssl/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -669,6 +669,12 @@ impl SslSignatureAlgorithm {
pub const ED25519: SslSignatureAlgorithm = SslSignatureAlgorithm(ffi::SSL_SIGN_ED25519 as _);
}

impl From<u16> for SslSignatureAlgorithm {
fn from(value: u16) -> Self {
Self(value)
}
}

/// A TLS Curve.
#[repr(transparent)]
#[derive(Debug, Copy, Clone, PartialEq, Eq)]
Expand Down

0 comments on commit b7fea02

Please sign in to comment.