1
0
mirror of https://github.com/OpenTTD/OpenTTD synced 2026-01-17 17:32:45 +01:00

Codechange: make NetworkAuthenticationMethodMask an EnumBitSet

This commit is contained in:
Rubidium
2025-02-06 16:19:01 +01:00
committed by rubidium42
parent 693a5f42b9
commit fef2baf041
5 changed files with 23 additions and 23 deletions

View File

@@ -802,10 +802,10 @@ NetworkRecvStatus ServerNetworkAdminSocketHandler::Receive_ADMIN_JOIN_SECURE(Pac
this->admin_name = p.Recv_string(NETWORK_CLIENT_NAME_LENGTH);
this->admin_version = p.Recv_string(NETWORK_REVISION_LENGTH);
NetworkAuthenticationMethodMask method_mask = p.Recv_uint16();
NetworkAuthenticationMethodMask method_mask{p.Recv_uint16()};
/* Always exclude key exchange only, as that provides no credential checking. */
ClrBit(method_mask, NETWORK_AUTH_METHOD_X25519_KEY_EXCHANGE_ONLY);
method_mask.Reset(NetworkAuthenticationMethod::X25519_KeyExchangeOnly);
if (this->admin_name.empty() || this->admin_version.empty()) {
/* No name or version supplied. */