Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding No-op functions required for NodeJS compatability #1474

Merged
merged 6 commits into from
Mar 20, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions crypto/crypto.c
Original file line number Diff line number Diff line change
Expand Up @@ -153,4 +153,6 @@ int OPENSSL_init_crypto(uint64_t opts, const OPENSSL_INIT_SETTINGS *settings) {
return 1;
}

void OPENSSL_init(void) {}

void OPENSSL_cleanup(void) {}
3 changes: 3 additions & 0 deletions include/openssl/crypto.h
Original file line number Diff line number Diff line change
Expand Up @@ -177,6 +177,9 @@ OPENSSL_EXPORT void OPENSSL_load_builtin_modules(void);
OPENSSL_EXPORT int OPENSSL_init_crypto(uint64_t opts,
const OPENSSL_INIT_SETTINGS *settings);

// OPENSSL_init does nothing.
OPENSSL_EXPORT void OPENSSL_init(void);

// OPENSSL_cleanup does nothing.
OPENSSL_EXPORT void OPENSSL_cleanup(void);

Expand Down
3 changes: 3 additions & 0 deletions include/openssl/ssl.h
Original file line number Diff line number Diff line change
Expand Up @@ -5159,6 +5159,9 @@ OPENSSL_EXPORT void SSL_set_tmp_dh_callback(SSL *ssl,
DH *(*cb)(SSL *ssl, int is_export,
int keylength));

// SSL_CTX_set_dh_auto does nothing and returns 0 for error.
OPENSSL_EXPORT long SSL_CTX_set_dh_auto(SSL_CTX *ctx, int onoff);

// SSL_CTX_set1_sigalgs takes |num_values| ints and interprets them as pairs
// where the first is the nid of a hash function and the second is an
// |EVP_PKEY_*| value. It configures the signature algorithm preferences for
Expand Down
4 changes: 4 additions & 0 deletions ssl/ssl_lib.cc
Original file line number Diff line number Diff line change
Expand Up @@ -2760,6 +2760,10 @@ void SSL_CTX_set_tmp_dh_callback(SSL_CTX *ctx,
void SSL_set_tmp_dh_callback(SSL *ssl, DH *(*cb)(SSL *ssl, int is_export,
int keylength)) {}

long SSL_CTX_set_dh_auto(SSL_CTX *ctx, int onoff) {
return 0;
smittals2 marked this conversation as resolved.
Show resolved Hide resolved
}

static int use_psk_identity_hint(UniquePtr<char> *out,
const char *identity_hint) {
if (identity_hint != NULL && strlen(identity_hint) > PSK_MAX_IDENTITY_LEN) {
Expand Down
Loading