@@ -121,19 +121,20 @@ pub enum Ctap2PublicKeyCredentialType {
121121#[ derive( Debug , Clone , Copy , PartialEq , Serialize , Deserialize ) ]
122122#[ serde( rename_all = "lowercase" ) ]
123123pub enum Ctap2Transport {
124- BLE ,
125- NFC ,
126- USB ,
127- INTERNAL ,
124+ Ble ,
125+ Nfc ,
126+ Usb ,
127+ Internal ,
128+ Hybrid ,
128129}
129130
130131impl From < & Ctap1Transport > for Ctap2Transport {
131132 fn from ( ctap1 : & Ctap1Transport ) -> Ctap2Transport {
132133 match ctap1 {
133- Ctap1Transport :: BT => Ctap2Transport :: BLE ,
134- Ctap1Transport :: BLE => Ctap2Transport :: BLE ,
135- Ctap1Transport :: USB => Ctap2Transport :: USB ,
136- Ctap1Transport :: NFC => Ctap2Transport :: NFC ,
134+ Ctap1Transport :: Bt => Ctap2Transport :: Ble ,
135+ Ctap1Transport :: Ble => Ctap2Transport :: Ble ,
136+ Ctap1Transport :: Usb => Ctap2Transport :: Usb ,
137+ Ctap1Transport :: Nfc => Ctap2Transport :: Nfc ,
137138 }
138139 }
139140}
@@ -211,13 +212,13 @@ pub enum Ctap2UserVerificationOperation {
211212mod tests {
212213 use crate :: proto:: ctap2:: Ctap2PublicKeyCredentialDescriptor ;
213214
214- use super :: { Ctap2CredentialType , Ctap2COSEAlgorithmIdentifier , Ctap2PublicKeyCredentialType } ;
215+ use super :: { Ctap2COSEAlgorithmIdentifier , Ctap2CredentialType , Ctap2PublicKeyCredentialType } ;
216+ use hex;
215217 use serde_bytes:: ByteBuf ;
216218 use serde_cbor;
217- use hex;
218219
219220 #[ test]
220- /// Verify CBOR serialization conforms to CTAP canonical standard, including ordering (see #95)
221+ /// Verify CBOR serialization conforms to CTAP canonical standard, including ordering (see #95)
221222 pub fn credential_type_field_serialization ( ) {
222223 let credential_type = Ctap2CredentialType {
223224 algorithm : Ctap2COSEAlgorithmIdentifier :: ES256 ,
@@ -230,7 +231,7 @@ mod tests {
230231 }
231232
232233 #[ test]
233- /// Verify CBOR serialization conforms to CTAP canonical standard, including ordering (see #95)
234+ /// Verify CBOR serialization conforms to CTAP canonical standard, including ordering (see #95)
234235 pub fn credential_descriptor_serialization ( ) {
235236 let credential_descriptor = Ctap2PublicKeyCredentialDescriptor {
236237 id : ByteBuf :: from ( vec ! [ 0x42 ] ) ,
@@ -242,4 +243,4 @@ mod tests {
242243 let expected = hex:: decode ( "a2626964414264747970656a7075626c69632d6b6579" ) . unwrap ( ) ;
243244 assert_eq ! ( serialized, expected) ;
244245 }
245- }
246+ }
0 commit comments