Skip to content

Commit 86665a9

Browse files
committed
dotnet format
1 parent f1c3303 commit 86665a9

File tree

5 files changed

+77
-77
lines changed

5 files changed

+77
-77
lines changed

Yubico.YubiKey/src/Yubico/YubiKey/Piv/Commands/MoveKeyCommand.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -47,14 +47,14 @@ public MoveKeyCommand(byte sourceSlot, byte destinationSlot)
4747
SourceSlot = sourceSlot;
4848
DestinationSlot = destinationSlot;
4949
}
50-
50+
5151
/// <summary>
5252
/// Constructor for the <see cref="MoveKeyCommand"/> which is used to move a PIV key from one slot to another.
5353
/// The source slot must not be the <see cref="PivSlot.Attestation"/>-slot and the destination slot must be empty.
5454
/// </summary>
5555
public MoveKeyCommand()
5656
{
57-
57+
5858
}
5959

6060
/// <summary>
@@ -92,7 +92,7 @@ private static void ValidateSlots(byte sourceSlot, byte destinationSlot)
9292
CultureInfo.CurrentCulture,
9393
ExceptionMessages.InvalidSlotsSameSourceAndDestinationSlotsCannotBeTheSame));
9494
}
95-
95+
9696
ValidateSlot(sourceSlot);
9797
ValidateSlot(destinationSlot);
9898
}

Yubico.YubiKey/src/Yubico/YubiKey/Piv/PivSession.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -581,8 +581,8 @@ public void DeleteKey(byte slotToClear)
581581
var command = new DeleteKeyCommand(slotToClear);
582582
DeleteKeyResponse response = Connection.SendCommand(command);
583583

584-
bool unsuccessfulStatus =
585-
response.Status != ResponseStatus.Success &&
584+
bool unsuccessfulStatus =
585+
response.Status != ResponseStatus.Success &&
586586
response.Status != ResponseStatus.NoData;
587587

588588
if (unsuccessfulStatus)
@@ -593,7 +593,7 @@ public void DeleteKey(byte slotToClear)
593593
string logMessage = response.Status == ResponseStatus.Success
594594
? "Successfully deleted key at slot {targetSlot}."
595595
: "No data received from Yubikey after attempted delete on slot {targetSlot}, indicating that was likely empty to begin with.";
596-
596+
597597
_log.LogInformation(logMessage, slotToClear);
598598
}
599599
}

Yubico.YubiKey/src/Yubico/YubiKey/YubiKeyFeature.cs

Lines changed: 64 additions & 64 deletions
Original file line numberDiff line numberDiff line change
@@ -15,255 +15,255 @@
1515
namespace Yubico.YubiKey
1616
{
1717
/// <summary>
18-
/// Named YubiKey features or distinct behaviors that have been added or changed over the years that can be queried.
18+
/// Named YubiKey features or distinct behaviors that have been added or changed over the years that can be queried.
1919
/// </summary>
2020
public enum YubiKeyFeature
2121
{
2222
// General YubiKey features
2323

2424
/// <summary>
25-
/// The (Yubico)OTP application. Corresponds to the functionality located in the Yubico.YubiKey.Otp namespace.
25+
/// The (Yubico)OTP application. Corresponds to the functionality located in the Yubico.YubiKey.Otp namespace.
2626
/// </summary>
2727
OtpApplication,
2828

2929
/// <summary>
30-
/// The OATH application. Corresponds to the functionality located in the Yubico.YubiKey.Oath namespace.
30+
/// The OATH application. Corresponds to the functionality located in the Yubico.YubiKey.Oath namespace.
3131
/// </summary>
3232
OathApplication,
3333

3434
/// <summary>
35-
/// The PIV application. Corresponds to the functionality located in the Yubico.YubiKey.Piv namespace.
35+
/// The PIV application. Corresponds to the functionality located in the Yubico.YubiKey.Piv namespace.
3636
/// </summary>
3737
PivApplication,
3838

3939
/// <summary>
40-
/// The FIDO U2F application. Corresponds to the functionality located in
41-
/// the Yubico.YubiKey.U2f namespace.
40+
/// The FIDO U2F application. Corresponds to the functionality located in
41+
/// the Yubico.YubiKey.U2f namespace.
4242
/// </summary>
4343
U2fApplication,
4444

4545
/// <summary>
46-
/// The FIDO2 application. Corresponds to the functionality located in
47-
/// the Yubico.YubiKey.Fido2 namespace.
46+
/// The FIDO2 application. Corresponds to the functionality located in
47+
/// the Yubico.YubiKey.Fido2 namespace.
4848
/// </summary>
4949
Fido2Application,
5050

5151
/// <summary>
52-
/// The YubiKey management application. Corresponds to the functionality located in the
53-
/// Yubico.YubiKey.Management namespace.
52+
/// The YubiKey management application. Corresponds to the functionality located in the
53+
/// Yubico.YubiKey.Management namespace.
5454
/// </summary>
5555
ManagementApplication,
5656

5757
/// <summary>
58-
/// The ability to change the visibility of the serial number over USB, API, and Button-press.
58+
/// The ability to change the visibility of the serial number over USB, API, and Button-press.
5959
/// </summary>
6060
SerialNumberVisibilityControls,
6161

6262
/// <summary>
63-
/// The ability to communicate using Secure Channel Protocol 3 (SCP03).
63+
/// The ability to communicate using Secure Channel Protocol 3 (SCP03).
6464
/// </summary>
6565
Scp03,
6666

6767
/// <summary>
68-
/// The YubiKey is capable of switching USB interfaces without the lengthy 3-second reclaim timeout.
68+
/// The YubiKey is capable of switching USB interfaces without the lengthy 3-second reclaim timeout.
6969
/// </summary>
7070
FastUsbReclaim,
7171

7272
/// <summary>
73-
/// The YubiKey allows temporarily adjusting the sensitivity of the capacitive touch sensor.
73+
/// The YubiKey allows temporarily adjusting the sensitivity of the capacitive touch sensor.
7474
/// </summary>
7575
TemporaryTouchThreshold,
7676

7777
// OTP application features
7878

7979
/// <summary>
80-
/// Support for programming an OATH HOTP-based credential into one of the OTP application slots.
80+
/// Support for programming an OATH HOTP-based credential into one of the OTP application slots.
8181
/// </summary>
8282
OtpOathHotpMode,
8383

8484
/// <summary>
85-
/// A configuration slot that is activated by a longer duration touch of the YubiKey.
86-
/// This is also sometimes referred to as "Slot 2".
85+
/// A configuration slot that is activated by a longer duration touch of the YubiKey.
86+
/// This is also sometimes referred to as "Slot 2".
8787
/// </summary>
8888
OtpProtectedLongPressSlot,
8989

9090
/// <summary>
91-
/// Ability to use the HID codes from the numeric keypad for numbers.
91+
/// Ability to use the HID codes from the numeric keypad for numbers.
9292
/// </summary>
9393
OtpNumericKeypad,
9494

9595
/// <summary>
96-
/// Cause the trigger action of the YubiKey button to become faster.
96+
/// Cause the trigger action of the YubiKey button to become faster.
9797
/// </summary>
9898
OtpFastTrigger,
9999

100100
/// <summary>
101-
/// Allow certain non-security related flags to be modified after the configuration
102-
/// has been written.
101+
/// Allow certain non-security related flags to be modified after the configuration
102+
/// has been written.
103103
/// </summary>
104104
OtpUpdatableSlots,
105105

106106
/// <summary>
107-
/// Allow a configuration to be stored without being accessible.
107+
/// Allow a configuration to be stored without being accessible.
108108
/// </summary>
109109
OtpDormantSlots,
110110

111111
/// <summary>
112-
/// Invert the configured state of the LED.
112+
/// Invert the configured state of the LED.
113113
/// </summary>
114114
OtpInvertLed,
115115

116116
/// <summary>
117-
/// Truncate the OTP string to 16 characters.
117+
/// Truncate the OTP string to 16 characters.
118118
/// </summary>
119119
OtpShortTickets,
120120

121121
/// <summary>
122-
/// Configure the slot to emit a static password.
122+
/// Configure the slot to emit a static password.
123123
/// </summary>
124124
OtpStaticPasswordMode,
125125

126126
/// <summary>
127-
/// Use the HMAC message which is less than 64 bytes.
127+
/// Use the HMAC message which is less than 64 bytes.
128128
/// </summary>
129129
OtpVariableSizeHmac,
130130

131131
/// <summary>
132-
/// The YubiKey button touch for challenge response configuration.
132+
/// The YubiKey button touch for challenge response configuration.
133133
/// </summary>
134134
OtpButtonTrigger,
135135

136136
/// <summary>
137-
/// Generation of mixed-case characters.
137+
/// Generation of mixed-case characters.
138138
/// </summary>
139139
OtpMixedCasePasswords,
140140

141141
/// <summary>
142-
/// Specify that the first byte of the token identifier should be modhex.
142+
/// Specify that the first byte of the token identifier should be modhex.
143143
/// </summary>
144144
OtpFixedModhex,
145145

146146
/// <summary>
147-
/// Challenge-Response mode instead of an OTP mode.
147+
/// Challenge-Response mode instead of an OTP mode.
148148
/// </summary>
149149
OtpChallengeResponseMode,
150150

151151
/// <summary>
152-
/// Generation of mixed character and digits.
152+
/// Generation of mixed character and digits.
153153
/// </summary>
154154
OtpAlphaNumericPasswords,
155155

156156
/// <summary>
157-
/// Configure the slot to allow for user-triggered static password change.
157+
/// Configure the slot to allow for user-triggered static password change.
158158
/// </summary>
159159
OtpPasswordManualUpdates,
160160

161161
// PIV application features
162162

163163
/// <summary>
164-
/// An attestation statement which is an X.509 certificate that certifies a
165-
/// private key was generated by a YubiKey.
164+
/// An attestation statement which is an X.509 certificate that certifies a
165+
/// private key was generated by a YubiKey.
166166
/// </summary>
167167
PivAttestation,
168168

169169
/// <summary>
170-
/// Ability to use an AES key as the PIV management key. A YubiKey
171-
/// that can set the management key to AES, can still set it to
172-
/// Triple-DES.
170+
/// Ability to use an AES key as the PIV management key. A YubiKey
171+
/// that can set the management key to AES, can still set it to
172+
/// Triple-DES.
173173
/// </summary>
174174
PivAesManagementKey,
175175

176176
/// <summary>
177-
/// Ability to get data about the key in a slot.
177+
/// Ability to get data about the key in a slot.
178178
/// </summary>
179179
PivMetadata,
180180

181181
/// <summary>
182-
/// The cryptographic RSA algorithm with the key size 1024 bits
183-
/// supported by the PIV Application on the YubiKey.
182+
/// The cryptographic RSA algorithm with the key size 1024 bits
183+
/// supported by the PIV Application on the YubiKey.
184184
/// </summary>
185185
PivRsa1024,
186186

187187
/// <summary>
188-
/// The cryptographic RSA algorithm with the key size 2048 bits
189-
/// supported by the PIV Application on the YubiKey.
188+
/// The cryptographic RSA algorithm with the key size 2048 bits
189+
/// supported by the PIV Application on the YubiKey.
190190
/// </summary>
191191
PivRsa2048,
192192

193193
/// <summary>
194-
/// The cryptographic RSA algorithm with the key size 3072 bits
195-
/// supported by the PIV Application on the YubiKey.
194+
/// The cryptographic RSA algorithm with the key size 3072 bits
195+
/// supported by the PIV Application on the YubiKey.
196196
/// </summary>
197197
PivRsa3072,
198198

199199
/// <summary>
200-
/// The cryptographic RSA algorithm with the key size 4096 bits
201-
/// supported by the PIV Application on the YubiKey.
200+
/// The cryptographic RSA algorithm with the key size 4096 bits
201+
/// supported by the PIV Application on the YubiKey.
202202
/// </summary>
203203
PivRsa4096,
204204

205205
/// <summary>
206-
/// The cryptographic ECC algorithm with the parameters P-256,
207-
/// specified in FIPS 186-4 supported by the PIV Application on the YubiKey.
206+
/// The cryptographic ECC algorithm with the parameters P-256,
207+
/// specified in FIPS 186-4 supported by the PIV Application on the YubiKey.
208208
/// </summary>
209209
PivEccP256,
210210

211211
/// <summary>
212-
/// The cryptographic ECC algorithm with the parameters P-384,
213-
/// specified in FIPS 186-4 supported by the PIV Application on the YubiKey.
212+
/// The cryptographic ECC algorithm with the parameters P-384,
213+
/// specified in FIPS 186-4 supported by the PIV Application on the YubiKey.
214214
/// </summary>
215215
PivEccP384,
216-
216+
217217
/// <summary>
218-
/// Support for deleting PIV keys or moving PIV keys between slots.
218+
/// Support for deleting PIV keys or moving PIV keys between slots.
219219
/// </summary>
220220
PivMoveOrDeleteKey,
221221

222222
/// <summary>
223-
/// The touch policy refers to whether use of the management key will
224-
/// require touch or not.
223+
/// The touch policy refers to whether use of the management key will
224+
/// require touch or not.
225225
/// </summary>
226226
PivManagementKeyTouchPolicy,
227227

228228
/// <summary>
229-
/// Ability to set touch policy to cached.
230-
/// It means that touch is cached for 15 seconds.
229+
/// Ability to set touch policy to cached.
230+
/// It means that touch is cached for 15 seconds.
231231
/// </summary>
232232
PivTouchPolicyCached,
233233

234234
/// <summary>
235-
/// Ability to set touch policy on private key to cached.
236-
/// It means that touch is cached for 15 seconds.
235+
/// Ability to set touch policy on private key to cached.
236+
/// It means that touch is cached for 15 seconds.
237237
/// </summary>
238238
PivPrivateKeyTouchPolicyCached,
239239

240240
// OATH application features
241241

242242
/// <summary>
243-
/// The ability to rename existing OATH credentials.
243+
/// The ability to rename existing OATH credentials.
244244
/// </summary>
245245
OathRenameCredential,
246246

247247
/// <summary>
248-
/// The ability to "hide" an OATH credential until the YubiKey's button has been touched.
248+
/// The ability to "hide" an OATH credential until the YubiKey's button has been touched.
249249
/// </summary>
250250
OathTouchCredential,
251251

252252
/// <summary>
253-
/// Support for SHA-512 based OTP credentials.
253+
/// Support for SHA-512 based OTP credentials.
254254
/// </summary>
255255
OathSha512,
256256

257257
// YubiHSM Auth application
258258

259259
/// <summary>
260-
/// The YubiHSM Auth application. Corresponds to the functionality located in the
261-
/// Yubico.YubiKey.YubiHsmAuth namespace.
260+
/// The YubiHSM Auth application. Corresponds to the functionality located in the
261+
/// Yubico.YubiKey.YubiHsmAuth namespace.
262262
/// </summary>
263263
YubiHsmAuthApplication,
264264

265265
/// <summary>
266-
/// Allows temporarily disabling NFC until the next time the YubiKey is powered over USB.
266+
/// Allows temporarily disabling NFC until the next time the YubiKey is powered over USB.
267267
/// </summary>
268268
ManagementNfcRestricted
269269
}

Yubico.YubiKey/src/Yubico/YubiKey/YubiKeyFeatureExtensions.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -208,7 +208,7 @@ public static bool HasFeature(this IYubiKeyDevice yubiKeyDevice, YubiKeyFeature
208208
YubiKeyFeature.PivEccP384 =>
209209
yubiKeyDevice.FirmwareVersion >= FirmwareVersion.V4_2_4
210210
&& HasApplication(yubiKeyDevice, YubiKeyCapabilities.Piv),
211-
211+
212212
YubiKeyFeature.PivMoveOrDeleteKey =>
213213
yubiKeyDevice.FirmwareVersion >= FirmwareVersion.V5_7_0
214214
&& HasApplication(yubiKeyDevice, YubiKeyCapabilities.Piv),

0 commit comments

Comments
 (0)