Implements the authentication routines for connection to the bus. More...
#include <sasl.h>
Public Member Functions | |
SASL (int fd, bool negotiateFDPassing) | |
Create a new SASL authenticator. More... | |
~SASL () | |
std::tuple< bool, bool, std::vector< uint8_t > > | authenticate () |
Perform the authentication with the server. More... | |
Private Member Functions | |
int | write_data_with_newline (std::string data) |
std::string | read_data () |
std::string | encode_as_hex (int num) |
std::vector< uint8_t > | hex_to_vector (std::string hexData) |
DBUS_CXX_PROPAGATE_CONST (std::unique_ptr< priv_data >) m_priv | |
Implements the authentication routines for connection to the bus.
SASL::SASL | ( | int | fd, |
bool | negotiateFDPassing | ||
) |
Create a new SASL authenticator.
fd | The FD to authenticate on |
negotiateFDPassing | True if we should try to negotiate FD passing, false otherwise |
SASL::~SASL | ( | ) |
std::tuple< bool, bool, std::vector< uint8_t > > SASL::authenticate | ( | ) |
Perform the authentication with the server.
References AGREE_UNIX_FD_REGEX(), encode_as_hex(), ERROR_REGEX(), hex_to_vector(), OK_REGEX(), read_data(), REJECTED_REGEX(), SIMPLELOGGER_DEBUG, and write_data_with_newline().
Referenced by DBus::priv::Transport::open_transport().
|
private |
|
private |
Referenced by authenticate().
|
private |
References hexchar2int().
Referenced by authenticate().
|
private |
References LOGGER_NAME, SIMPLELOGGER_DEBUG, and SIMPLELOGGER_ERROR.
Referenced by authenticate().
|
private |
References LOGGER_NAME, and SIMPLELOGGER_DEBUG.
Referenced by authenticate().