SSL Test Pt. 1

This commit is contained in:
2022-09-04 19:50:47 +02:00
parent c6ad412df9
commit fd62679c25
2 changed files with 79 additions and 0 deletions
+20
View File
@@ -17,15 +17,35 @@
#include <string>
#include <utility>
#ifdef IBM
#endif
#ifdef APL
#endif
#ifdef LIN
#include <arpa/inet.h>
#include <netinet/in.h>
#include <openssl/err.h>
#include <openssl/ssl.h>
#include <sys/socket.h>
#endif
class Socket
{
private:
#ifdef LIN
SSL *ssl;
int sock;
#endif
char lastPath[513] = "";
char lastHash[2 * MD5LEN + 1] = "";
std::mutex wsLock;
std::string url;
std::function<void(std::string)> toLog;
#ifdef LIN
void logSSL();
#endif
public:
explicit Socket(std::string url,
std::function<void(const std::string)> toLog);