diff options
| author | Tatsuhiro Tsujikawa <tatsuhiro.t@gmail.com> | 2012-09-30 00:50:14 +0900 |
|---|---|---|
| committer | Tatsuhiro Tsujikawa <tatsuhiro.t@gmail.com> | 2012-09-30 00:50:14 +0900 |
| commit | 90515dfa50c676df37f440893de6e344fbfd2cdc (patch) | |
| tree | 257d86e0614b6eb0ea8e9384af3269d60a53dbbc /src/LibgnutlsTLSContext.h | |
| parent | 4b94ede268ff2ff793b22a0730dcbda09d280618 (diff) | |
RPC over SSL/TLS transport
To enable RPC over SSL/TLS, specify server certificate and private key
using --rpc-certificate and --rpc-private-key options and enable
--rpc-secure option. After the encryption is enabled, use https and
wss scheme to access RPC server.
Diffstat (limited to 'src/LibgnutlsTLSContext.h')
| -rw-r--r-- | src/LibgnutlsTLSContext.h | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/src/LibgnutlsTLSContext.h b/src/LibgnutlsTLSContext.h index 9e0d5fa8..4fc49fbc 100644 --- a/src/LibgnutlsTLSContext.h +++ b/src/LibgnutlsTLSContext.h @@ -41,6 +41,7 @@ #include <gnutls/gnutls.h> +#include "TLSContext.h" #include "DlAbortEx.h" namespace aria2 { @@ -49,17 +50,19 @@ class TLSContext { private: gnutls_certificate_credentials_t certCred_; + TLSSessionSide side_; + bool good_; bool peerVerificationEnabled_; public: - TLSContext(); + TLSContext(TLSSessionSide side); ~TLSContext(); // private key `keyfile' must be decrypted. - bool addClientKeyFile(const std::string& certfile, - const std::string& keyfile); + bool addCredentialFile(const std::string& certfile, + const std::string& keyfile); bool addSystemTrustedCACerts(); @@ -72,6 +75,11 @@ public: gnutls_certificate_credentials_t getCertCred() const; + TLSSessionSide getSide() const + { + return side_; + } + void enablePeerVerification(); void disablePeerVerification(); |
