Backup.
This commit is contained in:
@@ -1,5 +1,7 @@
|
||||
#pragma once
|
||||
|
||||
#include <openssl/types.h>
|
||||
|
||||
#include "ehs/EHS.h"
|
||||
#include "ehs/Str.h"
|
||||
#include "TCP.h"
|
||||
@@ -15,15 +17,18 @@ namespace ehs
|
||||
class EHS_LIB_IO SSL : public TCP
|
||||
{
|
||||
private:
|
||||
bool server;
|
||||
SSL_CTX* ctx;
|
||||
::SSL* sslHdl;
|
||||
X509 *cert;
|
||||
EVP_PKEY* pkey;
|
||||
|
||||
public:
|
||||
~SSL() override;
|
||||
|
||||
SSL();
|
||||
|
||||
SSL(const IP &type);
|
||||
SSL(const IP &type, const bool &server);
|
||||
|
||||
SSL(TCP&& tcp) noexcept;
|
||||
|
||||
@@ -49,9 +54,9 @@ namespace ehs
|
||||
|
||||
UInt_64 Receive(Byte* const buffer, const UInt_32 size) override;
|
||||
|
||||
void UseCertificate(const Byte* data, const UInt_64 size);
|
||||
void UseCertificate(const Char_8* data, const UInt_32 &size);
|
||||
|
||||
void UsePrivateKey(const Byte* data, const UInt_64 size);
|
||||
void UsePrivateKey(const Char_8* data, const UInt_32 &size);
|
||||
|
||||
bool IsValid();
|
||||
};
|
||||
|
@@ -41,6 +41,7 @@ namespace ehs
|
||||
TEXT_PLAIN,
|
||||
TEXT_HTML,
|
||||
TEXT_XML,
|
||||
IMG_X_ICON,
|
||||
NONE
|
||||
};
|
||||
|
||||
|
Reference in New Issue
Block a user