| 119 | |
| 120 | |
| 121 | static void TestAuthenticationAuthorizedKey(const X25519SecretKey &client_secret_key, const X25519PublicKey &server_expected_public_key, |
| 122 | NetworkAuthenticationServerHandler::ResponseResult expected_response_result) |
| 123 | { |
| 124 | NetworkAuthorizedKeys authorized_keys; |
| 125 | authorized_keys.Add(FormatArrayAsHex(server_expected_public_key)); |
| 126 | |
| 127 | NetworkAuthenticationDefaultAuthorizedKeyHandler authorized_key_handler(authorized_keys); |
| 128 | X25519AuthorizedKeyServerHandler server(X25519SecretKey::CreateRandom(), &authorized_key_handler); |
| 129 | X25519AuthorizedKeyClientHandler client(client_secret_key); |
| 130 | |
| 131 | TestAuthentication(server, client, expected_response_result, NetworkAuthenticationClientHandler::RequestResult::ReadyForResponse); |
| 132 | } |
| 133 | |
| 134 | TEST_CASE("Authentication_AuthorizedKey") |
| 135 | { |
no test coverage detected