Skip to content

Commit 441ad34

Browse files
committed
tests: fixed more pivsession tests
1 parent 7400b6e commit 441ad34

File tree

2 files changed

+3
-6
lines changed

2 files changed

+3
-6
lines changed

Yubico.YubiKey/tests/integration/Yubico/YubiKey/Piv/Commands/AuthMgmtKeyCmdTests.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ public void AuthKey_Default_Succeeds()
5656
0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08
5757
};
5858

59-
var initCmd = new InitializeAuthenticateManagementKeyCommand(false);
59+
var initCmd = new InitializeAuthenticateManagementKeyCommand(false, PivAlgorithm.TripleDes);
6060
InitializeAuthenticateManagementKeyResponse initRsp = pivSession.Connection.SendCommand(initCmd);
6161
Assert.Equal(ResponseStatus.Success, initRsp.Status);
6262

@@ -88,7 +88,7 @@ public void AuthKey_Aes_Succeeds()
8888
0x51, 0x52, 0x53, 0x54, 0x55, 0x56, 0x57, 0x58
8989
};
9090

91-
var initCmd = new InitializeAuthenticateManagementKeyCommand(true);
91+
var initCmd = new InitializeAuthenticateManagementKeyCommand(true, PivAlgorithm.TripleDes);
9292
InitializeAuthenticateManagementKeyResponse initRsp = pivSession.Connection.SendCommand(initCmd);
9393
Assert.Equal(ResponseStatus.Success, initRsp.Status);
9494

Yubico.YubiKey/tests/integration/Yubico/YubiKey/Piv/Commands/SetMgmtKeyCmdTests.cs

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -52,10 +52,7 @@ public void SetKey_ValidAes_Succeeds()
5252
0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37, 0x38,
5353
0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37, 0x38
5454
};
55-
var setCmd = new SetManagementKeyCommand(keyData)
56-
{
57-
Algorithm = PivAlgorithm.Aes128,
58-
};
55+
var setCmd = new SetManagementKeyCommand(keyData, PivAlgorithm.Aes128);
5956

6057
SetManagementKeyResponse setRsp = pivSession.Connection.SendCommand(setCmd);
6158
Assert.Equal(ResponseStatus.AuthenticationRequired, setRsp.Status);

0 commit comments

Comments
 (0)