2020-05-08 12:43:46 +02:00
|
|
|
#ifndef CONEXION_SSL_H
|
|
|
|
#define CONEXION_SSL_H
|
|
|
|
#include "conexion.h"
|
|
|
|
|
|
|
|
#include <openssl/ssl.h>
|
|
|
|
|
|
|
|
class conexion_ssl : public conexion
|
|
|
|
{
|
|
|
|
public:
|
2020-06-01 23:23:23 +02:00
|
|
|
/**
|
|
|
|
* @brief conexion
|
|
|
|
* Object that launch the secure server and start the secure sessions
|
|
|
|
* @param conf Configuration file
|
|
|
|
*/
|
2020-05-08 12:43:46 +02:00
|
|
|
conexion_ssl(config_reader &conf);
|
|
|
|
void start_server();
|
|
|
|
private:
|
2020-06-01 23:23:23 +02:00
|
|
|
/**
|
|
|
|
* @brief create_context
|
|
|
|
* Create the SSL context
|
|
|
|
* @return SSL context
|
|
|
|
*/
|
2020-05-08 12:43:46 +02:00
|
|
|
SSL_CTX *create_context();
|
2020-06-01 23:23:23 +02:00
|
|
|
/**
|
|
|
|
* @brief configure_context
|
|
|
|
* Configure the SSL context
|
|
|
|
* @param ctx Contest to configure
|
|
|
|
*/
|
2020-05-08 12:43:46 +02:00
|
|
|
void configure_context(SSL_CTX *ctx);
|
|
|
|
};
|
|
|
|
|
|
|
|
#endif // CONEXION_SSL_H
|