OpenTTD Source 20241224-master-gee860a5c8e
NetworkAuthenticationAuthorizedKeyHandler Class Referenceabstract

Callback interface for server implementations to provide the authorized key validation. More...

#include <network_crypto.h>

Inheritance diagram for NetworkAuthenticationAuthorizedKeyHandler:
NetworkAuthenticationDefaultAuthorizedKeyHandler

Public Member Functions

virtual bool CanBeUsed () const =0
 Check whether the key handler can be used, i.e.
 
virtual bool IsAllowed (std::string_view peer_public_key) const =0
 Check whether the given public key of the peer is allowed in.
 

Detailed Description

Callback interface for server implementations to provide the authorized key validation.

Definition at line 140 of file network_crypto.h.

Member Function Documentation

◆ CanBeUsed()

virtual bool NetworkAuthenticationAuthorizedKeyHandler::CanBeUsed ( ) const
pure virtual

Check whether the key handler can be used, i.e.

whether there are authorized keys to check against.

Returns
true when it can be used, otherwise false.

Implemented in NetworkAuthenticationDefaultAuthorizedKeyHandler.

Referenced by X25519AuthorizedKeyServerHandler::CanBeUsed().

◆ IsAllowed()

virtual bool NetworkAuthenticationAuthorizedKeyHandler::IsAllowed ( std::string_view  peer_public_key) const
pure virtual

Check whether the given public key of the peer is allowed in.

Parameters
peer_public_keyThe public key of the peer to check against.
Returns
true when the key is allowed, otherwise false.

Implemented in NetworkAuthenticationDefaultAuthorizedKeyHandler.

Referenced by X25519AuthorizedKeyServerHandler::ReceiveResponse().


The documentation for this class was generated from the following file: