Skip to content

Commit d6aa097

Browse files
authored
Merge pull request #222 from Yubico/aaron/32-byte-protocol-2
fix: Remove incorrect auth token truncation from various commands
2 parents 11389a1 + d00038e commit d6aa097

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

Yubico.YubiKey/src/Yubico/YubiKey/Fido2/Commands/BioEnrollmentCommand.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -188,7 +188,7 @@ public BioEnrollmentCommand(
188188
// The pinUvAuthToken is an encrypted value, so there's no need to
189189
// overwrite the array.
190190
byte[] authParam = authProtocol.AuthenticateUsingPinToken(pinUvAuthToken.ToArray(), message);
191-
PinUvAuthParam = new ReadOnlyMemory<byte>(authParam, 0, 16);
191+
PinUvAuthParam = new ReadOnlyMemory<byte>(authParam);
192192
PinUvAuthProtocol = authProtocol.Protocol;
193193
}
194194

Yubico.YubiKey/src/Yubico/YubiKey/Fido2/Commands/ConfigCommand.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -180,7 +180,7 @@ public ConfigCommand(
180180
// The pinUvAuthToken is an encrypted value, so there's no need to
181181
// overwrite the array.
182182
byte[] authParam = authProtocol.AuthenticateUsingPinToken(pinUvAuthToken.ToArray(), message);
183-
PinUvAuthParam = new ReadOnlyMemory<byte>(authParam, 0, 16);
183+
PinUvAuthParam = new ReadOnlyMemory<byte>(authParam);
184184
PinUvAuthProtocol = authProtocol.Protocol;
185185
}
186186

Yubico.YubiKey/src/Yubico/YubiKey/Fido2/Commands/CredentialManagementCommand.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -184,7 +184,7 @@ public CredentialManagementCommand(
184184
// The pinUvAuthToken is an encrypted value, so there's no need to
185185
// overwrite the array.
186186
byte[] authParam = authProtocol.AuthenticateUsingPinToken(pinUvAuthToken.ToArray(), message);
187-
PinUvAuthParam = new ReadOnlyMemory<byte>(authParam, 0, 16);
187+
PinUvAuthParam = new ReadOnlyMemory<byte>(authParam);
188188
PinUvAuthProtocol = authProtocol.Protocol;
189189
}
190190

0 commit comments

Comments
 (0)