|
OpenTTD Source 20260311-master-g511d3794ce
|
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. | |
| Public Member Functions inherited from NetworkAuthenticationAuthorizedKeyHandler | |
| virtual | ~NetworkAuthenticationAuthorizedKeyHandler ()=default |
| Ensure the destructor of the sub classes are called as well. | |
Private Attributes | |
| const NetworkAuthorizedKeys * | authorized_keys |
| The authorized keys to check against. | |
Default implementation for the authorized key handler.
Definition at line 166 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 174 of file network_crypto.h.
References authorized_keys.
|
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 176 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 177 of file network_crypto.h.
References authorized_keys.
|
private |
The authorized keys to check against.
Definition at line 168 of file network_crypto.h.
Referenced by IsAllowed(), and NetworkAuthenticationDefaultAuthorizedKeyHandler().