Skip to content

Commit

Permalink
add additional no-op symbols for better OpenSSL compat
Browse files Browse the repository at this point in the history
  • Loading branch information
samuel40791765 committed May 9, 2023
1 parent d6417f9 commit c3f63d4
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 0 deletions.
2 changes: 2 additions & 0 deletions crypto/conf/conf.c
Original file line number Diff line number Diff line change
Expand Up @@ -812,6 +812,8 @@ int CONF_modules_load_file(const char *filename, const char *appname,

void CONF_modules_free(void) {}

void CONF_modules_unload(int all) {}

void OPENSSL_config(const char *config_name) {}

void OPENSSL_no_config(void) {}
3 changes: 3 additions & 0 deletions include/openssl/conf.h
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,9 @@ OPENSSL_EXPORT int CONF_modules_load_file(const char *filename,
// CONF_modules_free does nothing.
OPENSSL_EXPORT void CONF_modules_free(void);

// CONF_modules_unload does nothing.
OPENSSL_EXPORT void CONF_modules_unload(int all);

// OPENSSL_config does nothing.
OPENSSL_EXPORT void OPENSSL_config(const char *config_name);

Expand Down
1 change: 1 addition & 0 deletions include/openssl/err.h
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,7 @@
#include <stdio.h>

#include <openssl/base.h>
#include <openssl/crypto.h>

#if defined(__cplusplus)
extern "C" {
Expand Down
5 changes: 5 additions & 0 deletions include/openssl/ssl.h
Original file line number Diff line number Diff line change
Expand Up @@ -4886,6 +4886,11 @@ OPENSSL_EXPORT int SSL_CTX_set1_sigalgs_list(SSL_CTX *ctx, const char *str);
// more convenient to codesearch for specific algorithm values.
OPENSSL_EXPORT int SSL_set1_sigalgs_list(SSL *ssl, const char *str);

// SSL_CTX_get_security_level returns 3. This is only to maintain compatibility
// with OpenSSL and no security assumptions should be based on the number this
// function returns.
OPENSSL_EXPORT int SSL_CTX_get_security_level(const SSL_CTX *ctx);

#define SSL_set_app_data(s, arg) (SSL_set_ex_data(s, 0, (char *)(arg)))
#define SSL_get_app_data(s) (SSL_get_ex_data(s, 0))
#define SSL_SESSION_set_app_data(s, a) \
Expand Down
2 changes: 2 additions & 0 deletions ssl/ssl_cert.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1008,3 +1008,5 @@ int SSL_set1_delegated_credential(SSL *ssl, CRYPTO_BUFFER *dc, EVP_PKEY *pkey,
int SSL_delegated_credential_used(const SSL *ssl) {
return ssl->s3->delegated_credential_used;
}

int SSL_CTX_get_security_level(const SSL_CTX *ctx) { return 3; }

0 comments on commit c3f63d4

Please sign in to comment.