@@ -29,7 +29,9 @@ typedef NS_ENUM(NSUInteger, YKFFIDO2GetInfoResponseKey) {
29
29
YKFFIDO2GetInfoResponseKeyAAGUID = 0x03 ,
30
30
YKFFIDO2GetInfoResponseKeyOptions = 0x04 ,
31
31
YKFFIDO2GetInfoResponseKeyMaxMsgSize = 0x05 ,
32
- YKFFIDO2GetInfoResponseKeyPinProtocols = 0x06
32
+ YKFFIDO2GetInfoResponseKeyPinProtocols = 0x06 ,
33
+ YKFFIDO2GetInfoResponseKeyMinPinLength = 0x0d
34
+
33
35
};
34
36
35
37
@interface YKFFIDO2GetInfoResponse ()
@@ -39,6 +41,7 @@ @interface YKFFIDO2GetInfoResponse()
39
41
@property (nonatomic , readwrite ) NSData *aaguid;
40
42
@property (nonatomic , readwrite ) NSDictionary *options;
41
43
@property (nonatomic , assign , readwrite ) NSUInteger maxMsgSize;
44
+ @property (nonatomic , readwrite ) NSUInteger minPinLength;
42
45
@property (nonatomic , readwrite ) NSArray *pinProtocols;
43
46
44
47
@end
@@ -95,6 +98,14 @@ - (BOOL)parseResponseMap:(YKFCBORMap *)map {
95
98
self.maxMsgSize = maxMsgSize.integerValue ;
96
99
}
97
100
101
+ // minPinLength
102
+ NSNumber *minPinLength = response[@(YKFFIDO2GetInfoResponseKeyMinPinLength)];
103
+ if (minPinLength != nil ) {
104
+ self.minPinLength = minPinLength.integerValue ;
105
+ } else {
106
+ self.minPinLength = 4 ;
107
+ }
108
+
98
109
// pin protocols
99
110
self.pinProtocols = response[@(YKFFIDO2GetInfoResponseKeyPinProtocols)];
100
111
0 commit comments