57 lines
1.5 KiB
C++
57 lines
1.5 KiB
C++
#ifndef TLSServerSocket_h__
|
|
#define TLSServerSocket_h__
|
|
|
|
#include "Socket.h"
|
|
#include "TCPServerSocket.h"
|
|
#include "Command.h"
|
|
#include "Session.h"
|
|
|
|
namespace core {
|
|
|
|
///
|
|
/// TLSServerSocket
|
|
///
|
|
/// Manage a socket connection as a TLS server type. Connections to the socket are processed through
|
|
/// the accept functionality.
|
|
///
|
|
|
|
class TLSServerSocket : public TCPServerSocket {
|
|
|
|
public:
|
|
|
|
///
|
|
/// The constructor for the BMATLSSocket object.
|
|
///
|
|
/// @param ePoll the BMAEPoll instance that manages the socket.
|
|
/// @param url the IP address for the socket to receive connection requests.
|
|
/// @param port the port number that the socket will listen on.
|
|
/// @param commandName the name of the command used to invoke the status display for this object.
|
|
/// @return the instance of the BMATLSServerSocket.
|
|
|
|
TLSServerSocket(EPoll &ePoll, std::string url, short int port);
|
|
|
|
///
|
|
/// The destructor for this object.
|
|
///
|
|
|
|
~TLSServerSocket();
|
|
|
|
// SSL_CTX *ctx;
|
|
|
|
protected:
|
|
Session * getSocketAccept() override;
|
|
Service * getService() override;
|
|
|
|
private:
|
|
void tlsServerInit();
|
|
|
|
char *sip_cacert = (char *)"/home/barant/testkeys/certs/pbxca.crt";
|
|
char *sip_cert = (char *)"/home/barant/testkeys/certs/pbxserver.crt";
|
|
char *sip_key = (char *)"/home/barant/testkeys/certs/pbxserver.key";
|
|
|
|
};
|
|
|
|
}
|
|
|
|
#endif
|