Skip to content

Commit 762f502

Browse files
committed
Correctly convert all NamedGroups to NIDs
Where there isn't a NID (the X25519MLKEM768 hybrid doesn't have one) use the fall-back form.
1 parent f7615c8 commit 762f502

1 file changed

Lines changed: 1 addition & 2 deletions

File tree

src/constants.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -146,8 +146,7 @@ pub fn named_group_to_nid(group: NamedGroup) -> Option<c_int> {
146146
FFDHE4096 => Some(NID_FFDHE4096),
147147
FFDHE6144 => Some(NID_FFDHE6144),
148148
FFDHE8192 => Some(NID_FFDHE8192),
149-
Unknown(id) => Some(TLSEXT_NID_UNKNOWN | id as c_int),
150-
_ => None,
149+
other => Some(TLSEXT_NID_UNKNOWN | u16::from(other) as c_int),
151150
}
152151
}
153152

0 commit comments

Comments
 (0)