diff options
author | Mattes D <github@xoft.cz> | 2014-05-11 20:59:15 +0200 |
---|---|---|
committer | Mattes D <github@xoft.cz> | 2014-05-11 20:59:15 +0200 |
commit | e0c56b752204202840f60ed904210c99414517bb (patch) | |
tree | 4532e85cbcc873a2616147713e9f899ecf84d111 /src/HTTPServer/SslHTTPConnection.h | |
parent | Merge pull request #993 from mc-server/GridStructGen (diff) | |
parent | Merge branch 'master' into SslWebAdmin (diff) | |
download | cuberite-e0c56b752204202840f60ed904210c99414517bb.tar cuberite-e0c56b752204202840f60ed904210c99414517bb.tar.gz cuberite-e0c56b752204202840f60ed904210c99414517bb.tar.bz2 cuberite-e0c56b752204202840f60ed904210c99414517bb.tar.lz cuberite-e0c56b752204202840f60ed904210c99414517bb.tar.xz cuberite-e0c56b752204202840f60ed904210c99414517bb.tar.zst cuberite-e0c56b752204202840f60ed904210c99414517bb.zip |
Diffstat (limited to 'src/HTTPServer/SslHTTPConnection.h')
-rw-r--r-- | src/HTTPServer/SslHTTPConnection.h | 45 |
1 files changed, 45 insertions, 0 deletions
diff --git a/src/HTTPServer/SslHTTPConnection.h b/src/HTTPServer/SslHTTPConnection.h new file mode 100644 index 000000000..c2c1585cd --- /dev/null +++ b/src/HTTPServer/SslHTTPConnection.h @@ -0,0 +1,45 @@ + +// SslHTTPConnection.h + +// Declared the cSslHTTPConnection class representing a HTTP connection made over a SSL link + + + + + +#pragma once + +#include "HTTPConnection.h" +#include "PolarSSL++/BufferedSslContext.h" + + + + + +class cSslHTTPConnection : + public cHTTPConnection +{ + typedef cHTTPConnection super; + +public: + /** Creates a new connection on the specified server. + Sends the specified cert as the server certificate, uses the private key for decryption. */ + cSslHTTPConnection(cHTTPServer & a_HTTPServer, const cX509CertPtr & a_Cert, const cCryptoKeyPtr & a_PrivateKey); + +protected: + cBufferedSslContext m_Ssl; + + /** The certificate to send to the client */ + cX509CertPtr m_Cert; + + /** The private key used for the certificate */ + cCryptoKeyPtr m_PrivateKey; + + // cHTTPConnection overrides: + virtual bool DataReceived (const char * a_Data, size_t a_Size) override; // Data is received from the client + virtual void GetOutgoingData(AString & a_Data) override; // Data can be sent to client +} ; + + + + |