1
0
mirror of https://github.com/SoftEtherVPN/SoftEtherVPN.git synced 2024-11-22 17:39:53 +03:00

Fixing alignment of struct on GCC, changing the method to server one

This commit is contained in:
Evengard 2020-05-03 04:24:01 +03:00
parent 8a856e4672
commit 132926ee09
2 changed files with 9 additions and 4 deletions

View File

@ -189,7 +189,9 @@ struct PPP_OPTION
#ifdef OS_WIN32 #ifdef OS_WIN32
#pragma pack(push, 1) #pragma pack(push, 1)
#endif // OS_WIN32 #else // OS_WIN32
#pragma pack(1)
#endif
// PPP EAP packet // PPP EAP packet
@ -217,7 +219,9 @@ struct PPP_EAP
#ifdef OS_WIN32 #ifdef OS_WIN32
#pragma pack(pop) #pragma pack(pop)
#endif // OS_WIN32 #else // OS_WIN32
#pragma pack()
#endif
struct PPP_EAP_TLS_CONTEXT struct PPP_EAP_TLS_CONTEXT
{ {

View File

@ -5729,7 +5729,7 @@ SSL_PIPE *NewSslPipeEx(bool server_mode, X *x, K *k, DH_CTX *dh, bool verify_pee
{ {
if (server_mode) if (server_mode)
{ {
SSL_CTX_set_ssl_version(ssl_ctx, SSLv23_method()); SSL_CTX_set_ssl_version(ssl_ctx, SSLv23_server_method());
SSL_CTX_set_options(ssl_ctx, SSL_OP_NO_SSLv2); SSL_CTX_set_options(ssl_ctx, SSL_OP_NO_SSLv2);
#ifdef SSL_OP_NO_TLSv1_3 #ifdef SSL_OP_NO_TLSv1_3
@ -11792,7 +11792,8 @@ bool AddChainSslCert(struct ssl_ctx_st *ctx, X *x)
if (x_copy->root_cert) if (x_copy->root_cert)
{ {
X509_STORE* store = SSL_CTX_get_cert_store(ctx); X509_STORE* store = SSL_CTX_get_cert_store(ctx);
X509_STORE_add_cert(store, x->x509); X509_STORE_add_cert(store, x_copy->x509);
X509_free(x_copy->x509);
} }
else else
{ {