ClienteTFG/conexion_ssl.h

35 lines
766 B
C
Raw Normal View History

2020-05-08 12:42:02 +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:24:24 +02:00
/**
* @brief conexion_ssl
* Create a secure conexion
* @param conf Config file to give the parameters of conexion
*/
2020-05-08 12:42:02 +02:00
conexion_ssl(config_reader &conf);
2020-06-01 23:24:24 +02:00
/**
* @brief read_string
* Read a string in the SSL socket
* @param input String readed
* @param size Length to read
* @return Size of bytes readed
*/
ssize_t read_string(std::string &input, int size);
/**
* @brief write_string
* Write a sitring in the secure socket
* @param output String to send
* @return bytes sended
*/
ssize_t write_string(std::string output);
2020-05-08 12:42:02 +02:00
private:
SSL* ssl;
};
#endif // CONEXION_SSL_H