Skip to content

Commit

Permalink
tests: fixed more pivsession tests
Browse files Browse the repository at this point in the history
  • Loading branch information
DennisDyallo committed Dec 17, 2024
1 parent 7400b6e commit 441ad34
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ public void AuthKey_Default_Succeeds()
0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08
};

var initCmd = new InitializeAuthenticateManagementKeyCommand(false);
var initCmd = new InitializeAuthenticateManagementKeyCommand(false, PivAlgorithm.TripleDes);
InitializeAuthenticateManagementKeyResponse initRsp = pivSession.Connection.SendCommand(initCmd);
Assert.Equal(ResponseStatus.Success, initRsp.Status);

Expand Down Expand Up @@ -88,7 +88,7 @@ public void AuthKey_Aes_Succeeds()
0x51, 0x52, 0x53, 0x54, 0x55, 0x56, 0x57, 0x58
};

var initCmd = new InitializeAuthenticateManagementKeyCommand(true);
var initCmd = new InitializeAuthenticateManagementKeyCommand(true, PivAlgorithm.TripleDes);
InitializeAuthenticateManagementKeyResponse initRsp = pivSession.Connection.SendCommand(initCmd);
Assert.Equal(ResponseStatus.Success, initRsp.Status);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,10 +52,7 @@ public void SetKey_ValidAes_Succeeds()
0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37, 0x38,
0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37, 0x38
};
var setCmd = new SetManagementKeyCommand(keyData)
{
Algorithm = PivAlgorithm.Aes128,
};
var setCmd = new SetManagementKeyCommand(keyData, PivAlgorithm.Aes128);

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

0 comments on commit 441ad34

Please sign in to comment.