1 Commits
v2.0.1 ... ssl

Author SHA1 Message Date
b482420d3a begin ssl support
All checks were successful
Linux arm64 / Build (push) Successful in 15s
2025-03-01 20:01:05 +01:00
3 changed files with 51 additions and 2 deletions

View File

@@ -0,0 +1,41 @@
#pragma once
/**
* \file Encrypt.h
* \brief File containing encrypt utilities
*/
#include <sp/common/DataBuffer.h>
namespace sp {
namespace option {
struct TlsEncrypt {
bool m_Enabled = true;
};
} // namespace option
} // namespace sp
#include <sp/io/IOInterface.h>
namespace sp {
namespace ssl {
// encrypt
// decrypt
} // namespace ssl
namespace io {
template <>
class MessageEncapsulator<option::TlsEncrypt> {
public:
static DataBuffer Encapsulate(const DataBuffer& a_Data, const option::TlsEncrypt& a_Option);
static DataBuffer Decapsulate(DataBuffer& a_Data, const option::TlsEncrypt& a_Option);
};
} // namespace io
} // namespace sp

View File

@@ -0,0 +1,3 @@
#include <sp/extensions/Encrypt.h>
#include <openssl/ssl.h>

View File

@@ -6,9 +6,14 @@ local modules = {
Compression = { Compression = {
Option = "zlib", Option = "zlib",
Deps = {"zlib"}, Deps = {"zlib"},
Packages = {"zlib"},
Includes = {"include/(sp/extensions/Compress.h)"}, Includes = {"include/(sp/extensions/Compress.h)"},
Sources = {"src/sp/extensions/Compress.cpp"} Sources = {"src/sp/extensions/Compress.cpp"}
},
Encryption = {
Option = "ssl",
Deps = {"openssl"},
Includes = {"include/(sp/extensions/Encrypt.h)"},
Sources = {"src/sp/extensions/Encrypt.cpp"}
} }
} }
@@ -37,7 +42,7 @@ for name, module in table.orderpairs(modules) do
for _, source in table.orderpairs(module.Sources) do for _, source in table.orderpairs(module.Sources) do
add_files(source) add_files(source)
end end
for _, package in table.orderpairs(module.Packages) do for _, package in table.orderpairs(module.Deps) do
add_packages(package) add_packages(package)
end end
set_group("Library") set_group("Library")