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

Merge pull request #1731 from chipitsine/master

LibreSSL-3.7.0 compatibility
This commit is contained in:
Ilya Shipitsin 2022-12-26 07:08:28 +06:00 committed by GitHub
commit ec3769ba32
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 8 additions and 0 deletions

View File

@ -14,8 +14,10 @@ static int CryptoKeyTypeToID(const CRYPTO_KEY_TYPE type)
break;
case KEY_X25519:
return EVP_PKEY_X25519;
#if defined(EVP_PKEY_X448)
case KEY_X448:
return EVP_PKEY_X448;
#endif
default:
Debug("CryptoKeyTypeToID(): Unhandled type %u!\n", type);
}
@ -164,9 +166,11 @@ bool CryptoKeyOpaqueToRaw(const void *opaque, CRYPTO_KEY_RAW **private, CRYPTO_K
case EVP_PKEY_X25519:
type = KEY_X25519;
break;
#if defined(EVP_PKEY_X448)
case EVP_PKEY_X448:
type = KEY_X448;
break;
#endif
default:
return false;
}

View File

@ -11892,7 +11892,9 @@ bool StartSSLEx3(SOCK *sock, X *x, K *priv, LIST *chain, UINT ssl_timeout, char
{
case SSL_R_UNSUPPORTED_PROTOCOL:
case SSL_R_VERSION_TOO_LOW:
#if defined(SSL_R_VERSION_TOO_HIGH)
case SSL_R_VERSION_TOO_HIGH:
#endif
*ssl_err = 150; // ERR_SSL_PROTOCOL_VERSION
break;
case SSL_R_NO_SHARED_CIPHER:
@ -11956,7 +11958,9 @@ bool StartSSLEx3(SOCK *sock, X *x, K *priv, LIST *chain, UINT ssl_timeout, char
{
case SSL_R_UNSUPPORTED_PROTOCOL:
case SSL_R_VERSION_TOO_LOW:
#if defined(SSL_R_VERSION_TOO_HIGH)
case SSL_R_VERSION_TOO_HIGH:
#endif
case SSL_R_TLSV1_ALERT_PROTOCOL_VERSION:
*ssl_err = 150; // ERR_SSL_PROTOCOL_VERSION
break;