mirror of
https://github.com/wolfSSL/wolfssl.git
synced 2025-07-30 18:57:27 +02:00
Merge pull request #6933 from kareem-wolfssl/zd16927
Add stub for wolfSSL_set_ecdh_auto.
This commit is contained in:
11
src/ssl.c
11
src/ssl.c
@ -23192,6 +23192,17 @@ unsigned long wolfSSL_THREADID_hash(const WOLFSSL_CRYPTO_THREADID* id)
|
|||||||
(void)id;
|
(void)id;
|
||||||
return 0UL;
|
return 0UL;
|
||||||
}
|
}
|
||||||
|
/* wolfSSL_set_ecdh_auto is provided as compatible API with
|
||||||
|
* SSL_set_ecdh_auto to enable auto ecdh curve selection functionality.
|
||||||
|
* Since this functionality is enabled by default in wolfSSL,
|
||||||
|
* this API exists as a stub.
|
||||||
|
*/
|
||||||
|
int wolfSSL_set_ecdh_auto(WOLFSSL* ssl, int onoff)
|
||||||
|
{
|
||||||
|
(void)ssl;
|
||||||
|
(void)onoff;
|
||||||
|
return WOLFSSL_SUCCESS;
|
||||||
|
}
|
||||||
/* wolfSSL_CTX_set_ecdh_auto is provided as compatible API with
|
/* wolfSSL_CTX_set_ecdh_auto is provided as compatible API with
|
||||||
* SSL_CTX_set_ecdh_auto to enable auto ecdh curve selection functionality.
|
* SSL_CTX_set_ecdh_auto to enable auto ecdh curve selection functionality.
|
||||||
* Since this functionality is enabled by default in wolfSSL,
|
* Since this functionality is enabled by default in wolfSSL,
|
||||||
|
14
tests/api.c
14
tests/api.c
@ -64530,6 +64530,19 @@ static int test_wolfSSL_THREADID_hash(void)
|
|||||||
#endif /* OPENSSL_EXTRA */
|
#endif /* OPENSSL_EXTRA */
|
||||||
return EXPECT_RESULT();
|
return EXPECT_RESULT();
|
||||||
}
|
}
|
||||||
|
static int test_wolfSSL_set_ecdh_auto(void)
|
||||||
|
{
|
||||||
|
EXPECT_DECLS;
|
||||||
|
#if defined(OPENSSL_EXTRA)
|
||||||
|
WOLFSSL* ssl = NULL;
|
||||||
|
|
||||||
|
ExpectIntEQ(SSL_set_ecdh_auto(NULL,0), 1);
|
||||||
|
ExpectIntEQ(SSL_set_ecdh_auto(NULL,1), 1);
|
||||||
|
ExpectIntEQ(SSL_set_ecdh_auto(ssl,0), 1);
|
||||||
|
ExpectIntEQ(SSL_set_ecdh_auto(ssl,1), 1);
|
||||||
|
#endif /* OPENSSL_EXTRA */
|
||||||
|
return EXPECT_RESULT();
|
||||||
|
}
|
||||||
static int test_wolfSSL_CTX_set_ecdh_auto(void)
|
static int test_wolfSSL_CTX_set_ecdh_auto(void)
|
||||||
{
|
{
|
||||||
EXPECT_DECLS;
|
EXPECT_DECLS;
|
||||||
@ -73119,6 +73132,7 @@ TEST_CASE testCases[] = {
|
|||||||
/* Can't memory test as server hangs. */
|
/* Can't memory test as server hangs. */
|
||||||
TEST_DECL(test_wolfSSL_Tls13_Key_Logging_test),
|
TEST_DECL(test_wolfSSL_Tls13_Key_Logging_test),
|
||||||
TEST_DECL(test_wolfSSL_Tls13_postauth),
|
TEST_DECL(test_wolfSSL_Tls13_postauth),
|
||||||
|
TEST_DECL(test_wolfSSL_set_ecdh_auto),
|
||||||
TEST_DECL(test_wolfSSL_CTX_set_ecdh_auto),
|
TEST_DECL(test_wolfSSL_CTX_set_ecdh_auto),
|
||||||
TEST_DECL(test_wolfSSL_set_minmax_proto_version),
|
TEST_DECL(test_wolfSSL_set_minmax_proto_version),
|
||||||
TEST_DECL(test_wolfSSL_CTX_set_max_proto_version),
|
TEST_DECL(test_wolfSSL_CTX_set_max_proto_version),
|
||||||
|
@ -210,6 +210,7 @@ typedef STACK_OF(ACCESS_DESCRIPTION) AUTHORITY_INFO_ACCESS;
|
|||||||
#define i2d_PKCS8PrivateKey_bio wolfSSL_PEM_write_bio_PKCS8PrivateKey
|
#define i2d_PKCS8PrivateKey_bio wolfSSL_PEM_write_bio_PKCS8PrivateKey
|
||||||
#define PKCS8_PRIV_KEY_INFO_free wolfSSL_EVP_PKEY_free
|
#define PKCS8_PRIV_KEY_INFO_free wolfSSL_EVP_PKEY_free
|
||||||
#define d2i_PKCS12_fp wolfSSL_d2i_PKCS12_fp
|
#define d2i_PKCS12_fp wolfSSL_d2i_PKCS12_fp
|
||||||
|
#define SSL_set_ecdh_auto wolfSSL_set_ecdh_auto
|
||||||
#define SSL_CTX_set_ecdh_auto wolfSSL_CTX_set_ecdh_auto
|
#define SSL_CTX_set_ecdh_auto wolfSSL_CTX_set_ecdh_auto
|
||||||
|
|
||||||
#define i2d_PUBKEY wolfSSL_i2d_PUBKEY
|
#define i2d_PUBKEY wolfSSL_i2d_PUBKEY
|
||||||
|
@ -1135,6 +1135,7 @@ WOLFSSL_API WOLFSSL_CTX* wolfSSL_CTX_new_ex(WOLFSSL_METHOD* method, void* heap);
|
|||||||
WOLFSSL_ABI WOLFSSL_API WOLFSSL_CTX* wolfSSL_CTX_new(WOLFSSL_METHOD* method);
|
WOLFSSL_ABI WOLFSSL_API WOLFSSL_CTX* wolfSSL_CTX_new(WOLFSSL_METHOD* method);
|
||||||
WOLFSSL_API int wolfSSL_CTX_up_ref(WOLFSSL_CTX* ctx);
|
WOLFSSL_API int wolfSSL_CTX_up_ref(WOLFSSL_CTX* ctx);
|
||||||
#ifdef OPENSSL_EXTRA
|
#ifdef OPENSSL_EXTRA
|
||||||
|
WOLFSSL_API int wolfSSL_set_ecdh_auto(WOLFSSL* ssl, int onoff);
|
||||||
WOLFSSL_API int wolfSSL_CTX_set_ecdh_auto(WOLFSSL_CTX* ctx, int onoff);
|
WOLFSSL_API int wolfSSL_CTX_set_ecdh_auto(WOLFSSL_CTX* ctx, int onoff);
|
||||||
WOLFSSL_API int wolfSSL_get_signature_nid(WOLFSSL* ssl, int* nid);
|
WOLFSSL_API int wolfSSL_get_signature_nid(WOLFSSL* ssl, int* nid);
|
||||||
WOLFSSL_API int wolfSSL_get_signature_type_nid(const WOLFSSL* ssl, int* nid);
|
WOLFSSL_API int wolfSSL_get_signature_type_nid(const WOLFSSL* ssl, int* nid);
|
||||||
|
Reference in New Issue
Block a user