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

Compare commits

...

6 Commits

Author SHA1 Message Date
siddharth-narayan
5c117cda99
Merge 63ffab9ee4 into 4fe5352931 2024-06-11 02:20:20 -04:00
Ilya Shipitsin
4fe5352931
Merge pull request #2007 from metalefty/freebsd-ci
CI: Update to FreeBSD 14.0-RELEASE
2024-06-09 17:23:48 +02:00
Koichiro Iwao
ebe52afa9a CI: Update to FreeBSD 14.0-RELEASE
since FreeBSD 13.2 image is no longer available on the CI platform.
2024-06-09 21:33:46 +09:00
siddharth-narayan
63ffab9ee4
Merge branch 'SoftEtherVPN:master' into quantum-safe-key-agreement 2024-05-20 23:20:52 -04:00
Siddharth
2fe4ca0f8c Fix incorrect PQ_GROUP_LIST string 2024-05-20 21:46:57 -04:00
Siddharth
a50d8910ba Add PQ Groups and the provider for them 2024-05-20 19:48:23 -04:00
4 changed files with 15 additions and 2 deletions

View File

@ -11,7 +11,7 @@ FreeBSD_task:
SSL: SSL:
matrix: matrix:
freebsd_instance: freebsd_instance:
image_family: freebsd-13-2 image_family: freebsd-14-0
prepare_script: prepare_script:
- pkg install -y pkgconf cmake git libsodium $SSL - pkg install -y pkgconf cmake git libsodium $SSL
- git submodule update --init --recursive - git submodule update --init --recursive

View File

@ -88,6 +88,7 @@ int ssl_clientcert_index = 0;
#if OPENSSL_VERSION_NUMBER >= 0x30000000L #if OPENSSL_VERSION_NUMBER >= 0x30000000L
static OSSL_PROVIDER *ossl_provider_legacy = NULL; static OSSL_PROVIDER *ossl_provider_legacy = NULL;
static OSSL_PROVIDER *ossl_provider_default = NULL; static OSSL_PROVIDER *ossl_provider_default = NULL;
static OSSL_PROVIDER *ossl_provider_oqsprovider = NULL;
#endif #endif
LOCK **ssl_lock_obj = NULL; LOCK **ssl_lock_obj = NULL;
@ -3974,6 +3975,12 @@ void FreeCryptLibrary()
OSSL_PROVIDER_unload(ossl_provider_legacy); OSSL_PROVIDER_unload(ossl_provider_legacy);
ossl_provider_legacy = NULL; ossl_provider_legacy = NULL;
} }
if (ossl_provider_oqsprovider != NULL)
{
OSSL_PROVIDER_unload(ossl_provider_oqsprovider);
ossl_provider_oqsprovider = NULL;
}
#endif #endif
} }
@ -3996,6 +4003,7 @@ void InitCryptLibrary()
#if OPENSSL_VERSION_NUMBER >= 0x30000000L #if OPENSSL_VERSION_NUMBER >= 0x30000000L
ossl_provider_default = OSSL_PROVIDER_load(NULL, "legacy"); ossl_provider_default = OSSL_PROVIDER_load(NULL, "legacy");
ossl_provider_legacy = OSSL_PROVIDER_load(NULL, "default"); ossl_provider_legacy = OSSL_PROVIDER_load(NULL, "default");
ossl_provider_oqsprovider = OSSL_PROVIDER_load(NULL, "oqsprovider");
#endif #endif
ssl_clientcert_index = SSL_get_ex_new_index(0, "struct SslClientCertInfo *", NULL, NULL, NULL); ssl_clientcert_index = SSL_get_ex_new_index(0, "struct SslClientCertInfo *", NULL, NULL, NULL);

View File

@ -25,6 +25,7 @@
#include <openssl/err.h> #include <openssl/err.h>
#include <openssl/ssl.h> #include <openssl/ssl.h>
#include <openssl/provider.h>
#ifdef OS_UNIX #ifdef OS_UNIX
#include <fcntl.h> #include <fcntl.h>
@ -11905,6 +11906,8 @@ bool StartSSLEx3(SOCK *sock, X *x, K *priv, LIST *chain, UINT ssl_timeout, char
Unlock(openssl_lock); Unlock(openssl_lock);
} }
SSL_set1_groups_list(sock->ssl, PQ_GROUP_LIST);
if (sock->ServerMode) if (sock->ServerMode)
{ {
// Lock(ssl_connect_lock); // Lock(ssl_connect_lock);
@ -11984,7 +11987,7 @@ bool StartSSLEx3(SOCK *sock, X *x, K *priv, LIST *chain, UINT ssl_timeout, char
// Unlock(ssl_connect_lock); // Unlock(ssl_connect_lock);
} }
else else
{ {
prev_timeout = GetTimeout(sock); prev_timeout = GetTimeout(sock);
SetTimeout(sock, ssl_timeout); SetTimeout(sock, ssl_timeout);
// Client mode // Client mode

View File

@ -59,6 +59,8 @@ struct DYN_VALUE
#define DEFAULT_CIPHER_LIST "ECDHE+AESGCM:ECDHE+CHACHA20:DHE+AESGCM:DHE+CHACHA20:ECDHE+AES256:DHE+AES256:RSA+AES" #define DEFAULT_CIPHER_LIST "ECDHE+AESGCM:ECDHE+CHACHA20:DHE+AESGCM:DHE+CHACHA20:ECDHE+AES256:DHE+AES256:RSA+AES"
#define PQ_GROUP_LIST "p521_kyber1024:x25519_kyber768:P-521:X25519:P-256"
// SSL logging function // SSL logging function
//#define ENABLE_SSL_LOGGING //#define ENABLE_SSL_LOGGING
#define SSL_LOGGING_DIRNAME "@ssl_log" #define SSL_LOGGING_DIRNAME "@ssl_log"