Can now control SSL cert verfication from in-engine

This commit is contained in:
2022-03-18 16:25:20 -04:00
parent 2e7b793110
commit 2e3bef79b3
8 changed files with 392 additions and 204 deletions

View File

@@ -115,14 +115,15 @@ public:
// The channel ID. These are reused.
//
int chid() { return chid_; }
int chid() const { return chid_; }
// If this is a socket connection, the receiver's port number.
//
int port() { return port_; }
int port() const { return port_; }
// If this is an outgoing socket connection, get the target host.
const eng::string &target() { return target_; }
//
const eng::string &target() const { return target_; }
// True if the remote closed the connection, or a failure occurred.
//
@@ -133,7 +134,7 @@ public:
// If this is an empty string, there is no error. If this is set,
// then the channel is also closed.
//
eng::string error() const { return error_; }
const eng::string &error() const { return error_; }
// Set the prompt for readline mode.
//
@@ -314,12 +315,13 @@ public:
void drv_clear_new_outgoing();
// Get the target of a channel. A target is a string like
// "www.whatever.com:80". It indicates the host and port that the channel
// is supposed to be talking to. Non-socket channels and incoming channels
// have empty targets.
// "cert:whatever.com:80" or "nocert:whatever.com:80".
// The first word indicate whether or not a valid SSL certificate
// is required. The second word is the hostname. The third word is
// the port number.
//
const eng::string &drv_get_target(int chid) const;
std::string_view drv_get_target(int chid) const;
// Return true if the outgoing buffer is empty.
//
bool drv_outgoing_empty(int chid) const;