mirror of
https://github.com/GothenburgBitFactory/taskwarrior.git
synced 2025-07-07 20:06:36 +02:00
TLSClient: Improved C++ core guidelines
This commit is contained in:
parent
3be7803d30
commit
992b41b82a
2 changed files with 13 additions and 28 deletions
|
@ -66,21 +66,6 @@ static int verify_certificate_callback (gnutls_session_t session)
|
|||
return client->verify_certificate ();
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
TLSClient::TLSClient ()
|
||||
: _ca ("")
|
||||
, _cert ("")
|
||||
, _key ("")
|
||||
, _host ("")
|
||||
, _port ("")
|
||||
, _session(0)
|
||||
, _socket (0)
|
||||
, _limit (0)
|
||||
, _debug (false)
|
||||
, _trust(strict)
|
||||
{
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
TLSClient::~TLSClient ()
|
||||
{
|
||||
|
|
|
@ -36,7 +36,7 @@ class TLSClient
|
|||
public:
|
||||
enum trust_level { strict, ignore_hostname, allow_all };
|
||||
|
||||
TLSClient ();
|
||||
TLSClient () = default;
|
||||
~TLSClient ();
|
||||
void limit (int);
|
||||
void debug (int);
|
||||
|
@ -51,18 +51,18 @@ public:
|
|||
void recv (std::string&);
|
||||
|
||||
private:
|
||||
std::string _ca;
|
||||
std::string _cert;
|
||||
std::string _key;
|
||||
std::string _ciphers;
|
||||
std::string _host;
|
||||
std::string _port;
|
||||
gnutls_certificate_credentials_t _credentials;
|
||||
gnutls_session_t _session;
|
||||
int _socket;
|
||||
int _limit;
|
||||
bool _debug;
|
||||
enum trust_level _trust;
|
||||
std::string _ca {""};
|
||||
std::string _cert {""};
|
||||
std::string _key {""};
|
||||
std::string _ciphers {""};
|
||||
std::string _host {""};
|
||||
std::string _port {""};
|
||||
gnutls_certificate_credentials_t _credentials {};
|
||||
gnutls_session_t _session {0};
|
||||
int _socket {0};
|
||||
int _limit {0};
|
||||
bool _debug {false};
|
||||
enum trust_level _trust {strict};
|
||||
};
|
||||
|
||||
#endif
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue