mirror of
https://github.com/VCMP-SqMod/SqMod.git
synced 2025-01-31 09:57:14 +01:00
Fix some alignment/padding issues in CPR.
This commit is contained in:
parent
7f36aae9f9
commit
62c9597e92
31
module/Vendor/CPR/include/cpr/ssl_options.h
vendored
31
module/Vendor/CPR/include/cpr/ssl_options.h
vendored
@ -342,12 +342,12 @@ class SslFastStart {
|
|||||||
|
|
||||||
} // namespace ssl
|
} // namespace ssl
|
||||||
|
|
||||||
struct SslOptions {
|
struct alignas(128) SslOptions {
|
||||||
std::string cert_file;
|
std::string cert_file{};
|
||||||
std::string cert_type;
|
std::string cert_type{};
|
||||||
std::string key_file;
|
std::string key_file{};
|
||||||
std::string key_type;
|
std::string key_type{};
|
||||||
std::string key_pass;
|
std::string key_pass{};
|
||||||
#if SUPPORT_ALPN
|
#if SUPPORT_ALPN
|
||||||
bool enable_alpn = true;
|
bool enable_alpn = true;
|
||||||
#endif // SUPPORT_ALPN
|
#endif // SUPPORT_ALPN
|
||||||
@ -361,17 +361,24 @@ struct SslOptions {
|
|||||||
#if SUPPORT_MAX_TLS_VERSION
|
#if SUPPORT_MAX_TLS_VERSION
|
||||||
int max_version = CURL_SSLVERSION_MAX_DEFAULT;
|
int max_version = CURL_SSLVERSION_MAX_DEFAULT;
|
||||||
#endif
|
#endif
|
||||||
std::string ca_info;
|
std::string ca_info{};
|
||||||
std::string ca_path;
|
std::string ca_path{};
|
||||||
std::string crl_file;
|
std::string crl_file{};
|
||||||
std::string ciphers;
|
std::string ciphers{};
|
||||||
#if SUPPORT_TLSv13_CIPHERS
|
#if SUPPORT_TLSv13_CIPHERS
|
||||||
std::string tls13_ciphers;
|
std::string tls13_ciphers{};
|
||||||
#endif
|
#endif
|
||||||
#if SUPPORT_SESSIONID_CACHE
|
#if SUPPORT_SESSIONID_CACHE
|
||||||
bool session_id_cache = true;
|
bool session_id_cache = true;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
SslOptions() = default;
|
||||||
|
SslOptions(const SslOptions &) = default;
|
||||||
|
SslOptions(SslOptions &&) noexcept = default;
|
||||||
|
~SslOptions() = default;
|
||||||
|
SslOptions & operator = (const SslOptions &) = default;
|
||||||
|
SslOptions & operator = (SslOptions &&) noexcept = default;
|
||||||
|
|
||||||
void SetOption(const ssl::CertFile& opt) {
|
void SetOption(const ssl::CertFile& opt) {
|
||||||
cert_file = opt.filename;
|
cert_file = opt.filename;
|
||||||
cert_type = opt.GetCertType();
|
cert_type = opt.GetCertType();
|
||||||
@ -480,7 +487,7 @@ struct SslOptions {
|
|||||||
session_id_cache = opt.enabled;
|
session_id_cache = opt.enabled;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
};
|
} __attribute__((packed));
|
||||||
|
|
||||||
namespace priv {
|
namespace priv {
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user