Add more compatibility symbols for Node.

Change-Id: Iaeff3adc6da216e965126eaa181427d5318f07d5
Reviewed-on: https://boringssl-review.googlesource.com/22544
Commit-Queue: Adam Langley <agl@google.com>
Reviewed-by: Adam Langley <agl@google.com>
CQ-Verified: CQ bot account: commit-bot@chromium.org <commit-bot@chromium.org>
diff --git a/crypto/conf/conf.c b/crypto/conf/conf.c
index f8ff613..b1982f8 100644
--- a/crypto/conf/conf.c
+++ b/crypto/conf/conf.c
@@ -791,13 +791,13 @@
   }
 }
 
-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 7b00c3f..f3d4057 100644
--- a/crypto/fipsmodule/cipher/cipher.c
+++ b/crypto/fipsmodule/cipher/cipher.c
@@ -611,3 +611,5 @@
 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 5c380a1..643bf04 100644
--- a/include/openssl/cipher.h
+++ b/include/openssl/cipher.h
@@ -417,6 +417,16 @@
 // 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 ebf6dc4..4ffce37 100644
--- a/include/openssl/conf.h
+++ b/include/openssl/conf.h
@@ -141,13 +141,9 @@
 #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 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);