diff --git a/crypto/conf/conf.c b/crypto/conf/conf.c index f8ff6136..b1982f82 100644 --- a/crypto/conf/conf.c +++ b/crypto/conf/conf.c @@ -791,13 +791,13 @@ int CONF_parse_list(const char *list, char sep, int remove_whitespace, } } -int CONF_modules_load_file(CONF_MUST_BE_NULL *filename, const char *appname, +int CONF_modules_load_file(const char *filename, const char *appname, unsigned long flags) { return 1; } void CONF_modules_free(void) {} -void OPENSSL_config(CONF_MUST_BE_NULL *config_name) {} +void OPENSSL_config(const char *config_name) {} void OPENSSL_no_config(void) {} diff --git a/crypto/fipsmodule/cipher/cipher.c b/crypto/fipsmodule/cipher/cipher.c index 7b00c3f2..f3d40574 100644 --- a/crypto/fipsmodule/cipher/cipher.c +++ b/crypto/fipsmodule/cipher/cipher.c @@ -611,3 +611,5 @@ int EVP_DecryptInit(EVP_CIPHER_CTX *ctx, const EVP_CIPHER *cipher, int EVP_add_cipher_alias(const char *a, const char *b) { return 1; } + +void EVP_CIPHER_CTX_set_flags(const EVP_CIPHER_CTX *ctx, uint32_t flags) {} diff --git a/include/openssl/cipher.h b/include/openssl/cipher.h index 5c380a16..643bf040 100644 --- a/include/openssl/cipher.h +++ b/include/openssl/cipher.h @@ -417,6 +417,16 @@ OPENSSL_EXPORT const EVP_CIPHER *EVP_aes_192_gcm(void); // EVP_aes_128_cfb128 is only available in decrepit. OPENSSL_EXPORT const EVP_CIPHER *EVP_aes_128_cfb128(void); +// The following flags do nothing and are included only to make it easier to +// compile code with BoringSSL. +#define EVP_CIPH_CCM_MODE 0 +#define EVP_CIPH_WRAP_MODE 0 +#define EVP_CIPHER_CTX_FLAG_WRAP_ALLOW 0 + +// EVP_CIPHER_CTX_set_flags does nothing. +OPENSSL_EXPORT void EVP_CIPHER_CTX_set_flags(const EVP_CIPHER_CTX *ctx, + uint32_t flags); + // Private functions. diff --git a/include/openssl/conf.h b/include/openssl/conf.h index ebf6dc40..4ffce378 100644 --- a/include/openssl/conf.h +++ b/include/openssl/conf.h @@ -141,13 +141,9 @@ int CONF_parse_list(const char *list, char sep, int remove_whitespace, #define CONF_MFLAGS_DEFAULT_SECTION 0 #define CONF_MFLAGS_IGNORE_MISSING_FILE 0 -typedef struct conf_must_be_null_st CONF_MUST_BE_NULL; - -// CONF_modules_load_file returns one. |filename| was originally a string, with -// NULL indicating the default. BoringSSL does not support configuration files, -// so this stub emulates the "default" no-op file but intentionally breaks -// compilation of consumers actively attempting to use this subsystem. -OPENSSL_EXPORT int CONF_modules_load_file(CONF_MUST_BE_NULL *filename, +// CONF_modules_load_file returns one. BoringSSL is defined to have no config +// file options, thus loading from |filename| always succeeds by doing nothing. +OPENSSL_EXPORT int CONF_modules_load_file(const char *filename, const char *appname, unsigned long flags); @@ -155,7 +151,7 @@ OPENSSL_EXPORT int CONF_modules_load_file(CONF_MUST_BE_NULL *filename, OPENSSL_EXPORT void CONF_modules_free(void); // OPENSSL_config does nothing. -OPENSSL_EXPORT void OPENSSL_config(CONF_MUST_BE_NULL *config_name); +OPENSSL_EXPORT void OPENSSL_config(const char *config_name); // OPENSSL_no_config does nothing. OPENSSL_EXPORT void OPENSSL_no_config(void);