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 5 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: 1 addition & 1 deletion crypto/bio/bio_mem.c
Original file line number Diff line number Diff line change
Expand Up @@ -302,4 +302,4 @@ int BIO_set_mem_buf(BIO *bio, BUF_MEM *b, int take_ownership) {

int BIO_set_mem_eof_return(BIO *bio, int eof_value) {
return (int)BIO_ctrl(bio, BIO_C_SET_BUF_MEM_EOF_RETURN, eof_value, NULL);
}
}
smittals2 marked this conversation as resolved.
Show resolved Hide resolved
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) {}
1 change: 0 additions & 1 deletion include/openssl/bio.h
Original file line number Diff line number Diff line change
Expand Up @@ -447,7 +447,6 @@ OPENSSL_EXPORT int BIO_set_mem_buf(BIO *bio, BUF_MEM *b, int take_ownership);
// default is -1 so that additional data can be written once exhausted.
OPENSSL_EXPORT int BIO_set_mem_eof_return(BIO *bio, int eof_value);


smittals2 marked this conversation as resolved.
Show resolved Hide resolved
// BIO close flags.
//
// These can be used as symbolic arguments when a "close flag" is passed to a
Expand Down
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.
smittals2 marked this conversation as resolved.
Show resolved Hide resolved
smittals2 marked this conversation as resolved.
Show resolved Hide resolved
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