Skip to content

Commit

Permalink
Add some more no-op OPENSSL_INIT_* options for compatibility
Browse files Browse the repository at this point in the history
Defining the constants for the individual random engines is somewhat
odd, but it looks like OpenSSL will itself silently ignore the option
when built without a particular engine, so silently ignoring it on our
end seems defensible.

Change-Id: I45f955038e5325702d1e32ba7932ada0b4fc1ab6
Reviewed-on: https://boringssl-review.googlesource.com/c/boringssl/+/71387
Commit-Queue: Bob Beck <bbe@google.com>
Reviewed-by: Bob Beck <bbe@google.com>
Auto-Submit: David Benjamin <davidben@google.com>
  • Loading branch information
davidben authored and Boringssl LUCI CQ committed Sep 18, 2024
1 parent 3d6f9f7 commit 7750d4f
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions include/openssl/crypto.h
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,8 @@ OPENSSL_EXPORT int ENGINE_register_all_complete(void);
// OPENSSL_load_builtin_modules does nothing.
OPENSSL_EXPORT void OPENSSL_load_builtin_modules(void);

// OPENSSL_INIT_* are options in OpenSSL to configure the library. In BoringSSL,
// they do nothing.
#define OPENSSL_INIT_NO_LOAD_CRYPTO_STRINGS 0
#define OPENSSL_INIT_LOAD_CRYPTO_STRINGS 0
#define OPENSSL_INIT_ADD_ALL_CIPHERS 0
Expand All @@ -154,6 +156,15 @@ OPENSSL_EXPORT void OPENSSL_load_builtin_modules(void);
#define OPENSSL_INIT_LOAD_CONFIG 0
#define OPENSSL_INIT_NO_LOAD_CONFIG 0
#define OPENSSL_INIT_NO_ATEXIT 0
#define OPENSSL_INIT_ATFORK 0
#define OPENSSL_INIT_ENGINE_RDRAND 0
#define OPENSSL_INIT_ENGINE_DYNAMIC 0
#define OPENSSL_INIT_ENGINE_OPENSSL 0
#define OPENSSL_INIT_ENGINE_CRYPTODEV 0
#define OPENSSL_INIT_ENGINE_CAPI 0
#define OPENSSL_INIT_ENGINE_PADLOCK 0
#define OPENSSL_INIT_ENGINE_AFALG 0
#define OPENSSL_INIT_ENGINE_ALL_BUILTIN 0

// OPENSSL_init_crypto returns one.
OPENSSL_EXPORT int OPENSSL_init_crypto(uint64_t opts,
Expand Down

0 comments on commit 7750d4f

Please sign in to comment.