Browse Source

clear up `COSEKeyType::EC_OKP` case

pull/5934/head
zUnixorn 1 month ago
committed by Mathijs van Veluw
parent
commit
fd75356857
  1. 4
      src/db/models/two_factor.rs

4
src/db/models/two_factor.rs

@ -122,9 +122,11 @@ mod webauthn_0_3 {
impl From<COSEKeyType> for webauthn_rs::prelude::COSEKeyType { impl From<COSEKeyType> for webauthn_rs::prelude::COSEKeyType {
fn from(value: COSEKeyType) -> Self { fn from(value: COSEKeyType) -> Self {
match value { match value {
COSEKeyType::EC_OKP => panic!(), // TODO what to do here
COSEKeyType::EC_EC2(a) => Self::EC_EC2(a.into()), COSEKeyType::EC_EC2(a) => Self::EC_EC2(a.into()),
COSEKeyType::RSA(a) => Self::RSA(a.into()), COSEKeyType::RSA(a) => Self::RSA(a.into()),
// This should've never been able to be constructed when webauthn 0.3 was used
// Refer: https://docs.rs/webauthn-rs/0.3.2/src/webauthn_rs/crypto.rs.html#414
COSEKeyType::EC_OKP => unreachable!(),
} }
} }
} }

Loading…
Cancel
Save