@@ -31,67 +31,73 @@ public partial class YubiKeyDevice : IYubiKeyDevice
31
31
#region IYubiKeyDeviceInfo
32
32
33
33
/// <inheritdoc />
34
- public YubiKeyCapabilities AvailableUsbCapabilities => _yubiKeyInfo . AvailableUsbCapabilities ;
34
+ public YubiKeyCapabilities AvailableUsbCapabilities => _yubiKeyDeviceInfo . AvailableUsbCapabilities ;
35
35
36
36
/// <inheritdoc />
37
- public YubiKeyCapabilities EnabledUsbCapabilities => _yubiKeyInfo . EnabledUsbCapabilities ;
37
+ public YubiKeyCapabilities EnabledUsbCapabilities => _yubiKeyDeviceInfo . EnabledUsbCapabilities ;
38
38
39
39
/// <inheritdoc />
40
- public YubiKeyCapabilities AvailableNfcCapabilities => _yubiKeyInfo . AvailableNfcCapabilities ;
40
+ public YubiKeyCapabilities AvailableNfcCapabilities => _yubiKeyDeviceInfo . AvailableNfcCapabilities ;
41
41
42
42
/// <inheritdoc />
43
- public YubiKeyCapabilities EnabledNfcCapabilities => _yubiKeyInfo . EnabledNfcCapabilities ;
43
+ public YubiKeyCapabilities EnabledNfcCapabilities => _yubiKeyDeviceInfo . EnabledNfcCapabilities ;
44
44
45
45
/// <inheritdoc />
46
- public YubiKeyCapabilities FipsApproved => _yubiKeyInfo . FipsApproved ;
46
+ public YubiKeyCapabilities FipsApproved => _yubiKeyDeviceInfo . FipsApproved ;
47
47
48
48
/// <inheritdoc />
49
- public YubiKeyCapabilities FipsCapable => _yubiKeyInfo . FipsCapable ;
49
+ public YubiKeyCapabilities FipsCapable => _yubiKeyDeviceInfo . FipsCapable ;
50
50
51
51
/// <inheritdoc />
52
- public YubiKeyCapabilities ResetBlocked => _yubiKeyInfo . ResetBlocked ;
52
+ public YubiKeyCapabilities ResetBlocked => _yubiKeyDeviceInfo . ResetBlocked ;
53
53
54
54
/// <inheritdoc />
55
- public bool IsNfcRestricted => _yubiKeyInfo . IsNfcRestricted ;
55
+ public bool IsNfcRestricted => _yubiKeyDeviceInfo . IsNfcRestricted ;
56
56
57
57
/// <inheritdoc />
58
- public string ? PartNumber => _yubiKeyInfo . PartNumber ;
58
+ public string ? PartNumber => _yubiKeyDeviceInfo . PartNumber ;
59
59
60
60
/// <inheritdoc />
61
- public bool IsPinComplexityEnabled => _yubiKeyInfo . IsPinComplexityEnabled ;
61
+ public bool IsPinComplexityEnabled => _yubiKeyDeviceInfo . IsPinComplexityEnabled ;
62
62
63
63
/// <inheritdoc />
64
- public int ? SerialNumber => _yubiKeyInfo . SerialNumber ;
64
+ public int ? SerialNumber => _yubiKeyDeviceInfo . SerialNumber ;
65
65
66
66
/// <inheritdoc />
67
- public bool IsFipsSeries => _yubiKeyInfo . IsFipsSeries ;
67
+ public bool IsFipsSeries => _yubiKeyDeviceInfo . IsFipsSeries ;
68
68
69
69
/// <inheritdoc />
70
- public bool IsSkySeries => _yubiKeyInfo . IsSkySeries ;
70
+ public bool IsSkySeries => _yubiKeyDeviceInfo . IsSkySeries ;
71
71
72
72
/// <inheritdoc />
73
- public FormFactor FormFactor => _yubiKeyInfo . FormFactor ;
73
+ public FormFactor FormFactor => _yubiKeyDeviceInfo . FormFactor ;
74
74
75
75
/// <inheritdoc />
76
- public FirmwareVersion FirmwareVersion => _yubiKeyInfo . FirmwareVersion ;
76
+ public FirmwareVersion FirmwareVersion => _yubiKeyDeviceInfo . FirmwareVersion ;
77
+
78
+ /// <inheritdoc />
79
+ public VersionQualifier VersionQualifier => _yubiKeyDeviceInfo . VersionQualifier ;
80
+
81
+ /// <inheritdoc />
82
+ public string VersionName => _yubiKeyDeviceInfo . VersionName ;
77
83
78
84
/// <inheritdoc />
79
- public TemplateStorageVersion ? TemplateStorageVersion => _yubiKeyInfo . TemplateStorageVersion ;
85
+ public TemplateStorageVersion ? TemplateStorageVersion => _yubiKeyDeviceInfo . TemplateStorageVersion ;
80
86
81
87
/// <inheritdoc />
82
- public ImageProcessorVersion ? ImageProcessorVersion => _yubiKeyInfo . ImageProcessorVersion ;
88
+ public ImageProcessorVersion ? ImageProcessorVersion => _yubiKeyDeviceInfo . ImageProcessorVersion ;
83
89
84
90
/// <inheritdoc />
85
- public int AutoEjectTimeout => _yubiKeyInfo . AutoEjectTimeout ;
91
+ public int AutoEjectTimeout => _yubiKeyDeviceInfo . AutoEjectTimeout ;
86
92
87
93
/// <inheritdoc />
88
- public byte ChallengeResponseTimeout => _yubiKeyInfo . ChallengeResponseTimeout ;
94
+ public byte ChallengeResponseTimeout => _yubiKeyDeviceInfo . ChallengeResponseTimeout ;
89
95
90
96
/// <inheritdoc />
91
- public DeviceFlags DeviceFlags => _yubiKeyInfo . DeviceFlags ;
97
+ public DeviceFlags DeviceFlags => _yubiKeyDeviceInfo . DeviceFlags ;
92
98
93
99
/// <inheritdoc />
94
- public bool ConfigurationLocked => _yubiKeyInfo . ConfigurationLocked ;
100
+ public bool ConfigurationLocked => _yubiKeyDeviceInfo . ConfigurationLocked ;
95
101
96
102
#endregion
97
103
@@ -109,7 +115,7 @@ public partial class YubiKeyDevice : IYubiKeyDevice
109
115
private ISmartCardDevice ? _smartCardDevice ;
110
116
private IHidDevice ? _hidFidoDevice ;
111
117
private IHidDevice ? _hidKeyboardDevice ;
112
- private IYubiKeyDeviceInfo _yubiKeyInfo ;
118
+ private IYubiKeyDeviceInfo _yubiKeyDeviceInfo ;
113
119
114
120
private ConnectionFactory ConnectionFactory =>
115
121
new ConnectionFactory (
@@ -149,9 +155,9 @@ public Transport AvailableTransports
149
155
/// Constructs a <see cref="YubiKeyDevice"/> instance.
150
156
/// </summary>
151
157
/// <param name="device">A valid device; either a smart card, keyboard, or FIDO device.</param>
152
- /// <param name="info ">The YubiKey device information that describes the device.</param>
158
+ /// <param name="deviceInfo ">The YubiKey device information that describes the device.</param>
153
159
/// <exception cref="ArgumentException">An unrecognized device type was given.</exception>
154
- public YubiKeyDevice ( IDevice device , IYubiKeyDeviceInfo info )
160
+ public YubiKeyDevice ( IDevice device , IYubiKeyDeviceInfo deviceInfo )
155
161
{
156
162
switch ( device )
157
163
{
@@ -170,7 +176,7 @@ public YubiKeyDevice(IDevice device, IYubiKeyDeviceInfo info)
170
176
171
177
_log . LogInformation ( "Created a YubiKeyDevice based on the {Transport} transport." , LastActiveTransport ) ;
172
178
173
- _yubiKeyInfo = info ;
179
+ _yubiKeyDeviceInfo = deviceInfo ;
174
180
IsNfcDevice = _smartCardDevice ? . IsNfcTransport ( ) ?? false ;
175
181
LastActiveTransport = GetTransportIfOnlyDevice ( ) ;
176
182
}
@@ -192,7 +198,7 @@ public YubiKeyDevice(
192
198
_hidFidoDevice = hidFidoDevice ;
193
199
_hidKeyboardDevice = hidKeyboardDevice ;
194
200
195
- _yubiKeyInfo = yubiKeyDeviceInfo ;
201
+ _yubiKeyDeviceInfo = yubiKeyDeviceInfo ;
196
202
IsNfcDevice = smartCardDevice ? . IsNfcTransport ( ) ?? false ;
197
203
LastActiveTransport = GetTransportIfOnlyDevice ( ) ; // Must be after setting the three device fields.
198
204
}
@@ -228,13 +234,13 @@ internal void Merge(IDevice device, IYubiKeyDeviceInfo info)
228
234
MergeDevice ( device ) ;
229
235
230
236
// Then merge the YubiKey device information / metadata
231
- if ( _yubiKeyInfo is YubiKeyDeviceInfo first && info is YubiKeyDeviceInfo second )
237
+ if ( _yubiKeyDeviceInfo is YubiKeyDeviceInfo first && info is YubiKeyDeviceInfo second )
232
238
{
233
- _yubiKeyInfo = first . Merge ( second ) ;
239
+ _yubiKeyDeviceInfo = first . Merge ( second ) ;
234
240
}
235
241
else
236
242
{
237
- _yubiKeyInfo = info ;
243
+ _yubiKeyDeviceInfo = info ;
238
244
}
239
245
}
240
246
0 commit comments