summaryrefslogtreecommitdiff
path: root/src/LibsslTLSSession.h
diff options
context:
space:
mode:
authorNils Maier <maierman@web.de>2013-04-05 05:55:57 +0200
committerNils Maier <maierman@web.de>2013-04-05 23:10:47 +0200
commit0bcbd947b47d8f3af6c04508f7d493edc901dfdc (patch)
tree87d88ee26770477970db498ebfce06a1c4e832d0 /src/LibsslTLSSession.h
parentb292ae1305e8915edd7099446bdd533ac5c4d0a4 (diff)
AppleTLS: Implement AppleTLS and Apple Message Digest
Diffstat (limited to 'src/LibsslTLSSession.h')
-rw-r--r--src/LibsslTLSSession.h33
1 files changed, 15 insertions, 18 deletions
diff --git a/src/LibsslTLSSession.h b/src/LibsslTLSSession.h
index 6a162031..29412ab8 100644
--- a/src/LibsslTLSSession.h
+++ b/src/LibsslTLSSession.h
@@ -39,32 +39,29 @@
#include <openssl/ssl.h>
-#include <string>
-
-#include "TLSSessionConst.h"
+#include "LibsslTLSContext.h"
+#include "TLSSession.h"
#include "a2netcompat.h"
namespace aria2 {
-class TLSContext;
-
-class TLSSession {
+class OpenSSLTLSSession : public TLSSession {
public:
- TLSSession(TLSContext* tlsContext);
- ~TLSSession();
- int init(sock_t sockfd);
- int setSNIHostname(const std::string& hostname);
- int closeConnection();
- int checkDirection();
- ssize_t writeData(const void* data, size_t len);
- ssize_t readData(void* data, size_t len);
- int tlsConnect(const std::string& hostname, std::string& handshakeErr);
- int tlsAccept();
- std::string getLastErrorString();
+ OpenSSLTLSSession(OpenSSLTLSContext* tlsContext);
+ virtual ~OpenSSLTLSSession();
+ virtual int init(sock_t sockfd);
+ virtual int setSNIHostname(const std::string& hostname);
+ virtual int closeConnection();
+ virtual int checkDirection();
+ virtual ssize_t writeData(const void* data, size_t len);
+ virtual ssize_t readData(void* data, size_t len);
+ virtual int tlsConnect(const std::string& hostname, std::string& handshakeErr);
+ virtual int tlsAccept();
+ virtual std::string getLastErrorString();
private:
int handshake();
SSL* ssl_;
- TLSContext* tlsContext_;
+ OpenSSLTLSContext* tlsContext_;
// Last error code from openSSL library functions
int rv_;
};