OpenTTD Source
20241108-master-g80f628063a
|
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. More... | |
bool | CanBeUsed () const override |
Check whether the key handler can be used, i.e. More... | |
bool | IsAllowed (std::string_view peer_public_key) const override |
Check whether the given public key of the peer is allowed in. More... | |
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().