mirror of
https://github.com/mofeng-git/One-KVM.git
synced 2026-10-30 01:10:50 +08:00
refactor: 将 DTLS 本地依赖迁移到 libs 目录
This commit is contained in:
17
libs/dtls/src/curve/mod.rs
Normal file
17
libs/dtls/src/curve/mod.rs
Normal file
@@ -0,0 +1,17 @@
|
||||
pub mod named_curve;
|
||||
|
||||
// https://www.iana.org/assignments/tls-parameters/tls-parameters.xhtml#tls-parameters-10
|
||||
#[derive(Copy, Clone, PartialEq, Eq, Debug)]
|
||||
pub enum EllipticCurveType {
|
||||
NamedCurve = 0x03,
|
||||
Unsupported,
|
||||
}
|
||||
|
||||
impl From<u8> for EllipticCurveType {
|
||||
fn from(val: u8) -> Self {
|
||||
match val {
|
||||
0x03 => EllipticCurveType::NamedCurve,
|
||||
_ => EllipticCurveType::Unsupported,
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user