OpenTTD Source 20241224-master-gf74b0cf984
|
Default implementation for the authorized key handler. More...
#include <network_crypto.h>
Public Member Functions | |
NetworkAuthenticationDefaultAuthorizedKeyHandler (const NetworkAuthorizedKeys &authorized_keys) | |
Create the handler that uses the given authorized keys to check against. | |
bool | CanBeUsed () const override |
Check whether the key handler can be used, i.e. | |
bool | IsAllowed (std::string_view peer_public_key) const override |
Check whether the given public key of the peer is allowed in. | |
Private Attributes | |
const NetworkAuthorizedKeys * | authorized_keys |
The authorized keys to check against. | |
Default implementation for the authorized key handler.
Definition at line 161 of file network_crypto.h.
|
inline |
Create the handler that uses the given authorized keys to check against.
authorized_keys | The reference to the authorized keys to check against. |
Definition at line 169 of file network_crypto.h.
|
inlineoverridevirtual |
Check whether the key handler can be used, i.e.
whether there are authorized keys to check against.
true
when it can be used, otherwise false
. Implements NetworkAuthenticationAuthorizedKeyHandler.
Definition at line 171 of file network_crypto.h.
|
inlineoverridevirtual |
Check whether the given public key of the peer is allowed in.
peer_public_key | The public key of the peer to check against. |
true
when the key is allowed, otherwise false
. Implements NetworkAuthenticationAuthorizedKeyHandler.
Definition at line 172 of file network_crypto.h.
References authorized_keys, and NetworkAuthorizedKeys::Contains().
Referenced by ServerNetworkGameSocketHandler::Receive_CLIENT_RCON().
|
private |
The authorized keys to check against.
Definition at line 163 of file network_crypto.h.
Referenced by IsAllowed().