2020-05-08 12:43:46 +02:00
|
|
|
#ifndef SESSION_MANAGER_SSL_H
|
|
|
|
#define SESSION_MANAGER_SSL_H
|
|
|
|
#include <openssl/ssl.h>
|
|
|
|
#include "session_manager.h"
|
|
|
|
|
|
|
|
class session_manager_ssl : public session_manager
|
|
|
|
{
|
|
|
|
public:
|
2020-06-01 23:23:23 +02:00
|
|
|
/**
|
|
|
|
* @brief session_manager_ssl
|
|
|
|
* Object that gide a secure session
|
|
|
|
* @param fd File desccriptor used in the ssl conexion
|
|
|
|
*/
|
2020-05-08 12:43:46 +02:00
|
|
|
session_manager_ssl(SSL* fd);
|
2020-06-01 23:23:23 +02:00
|
|
|
private:
|
|
|
|
/**
|
|
|
|
* @brief read_data
|
|
|
|
* Recive data from a secure socket
|
|
|
|
* @param input Buffer to deposite the info
|
|
|
|
* @param size Max size of a info readed
|
|
|
|
* @return Number of bytes readed
|
|
|
|
*/
|
2020-05-08 12:43:46 +02:00
|
|
|
int read_data(char* input, int size);
|
2020-06-01 23:23:23 +02:00
|
|
|
/**
|
|
|
|
* @brief write_data
|
|
|
|
* Write data using a secure socket
|
|
|
|
* @param output
|
|
|
|
* String to have te info to send
|
|
|
|
* @return Number of bytes writed
|
|
|
|
*/
|
2020-05-08 12:43:46 +02:00
|
|
|
int write_data(std::string output);
|
|
|
|
SSL* sfd;
|
|
|
|
};
|
|
|
|
|
|
|
|
#endif // SESSION_MANAGER_SSL_H
|