Add a few more no-op stubs for cURL compatibility.
With these stubs, cURL should not need any BoringSSL #ifdefs at all, except for their OCSP #ifdefs (which can switch to the more generally useful OPENSSL_NO_OCSP) and the workaround for wincrypt.h macro collisions. That we intentionally leave to the consumer rather than add a partial hack that makes the build sensitive to include order. (I'll send them a patch upstream once this cycles in.) Change-Id: I815fe67e51e80e9aafa9b91ae68867ca1ff1d623 Reviewed-on: https://boringssl-review.googlesource.com/6980 Reviewed-by: Adam Langley <agl@google.com>
This commit is contained in:
parent
5aae776ede
commit
e5aa791a1c
@ -776,3 +776,10 @@ int CONF_parse_list(const char *list, char sep, int remove_whitespace,
|
||||
lstart = p + 1;
|
||||
}
|
||||
}
|
||||
|
||||
int CONF_modules_load_file(CONF_MUST_BE_NULL *filename, const char *appname,
|
||||
unsigned long flags) {
|
||||
return 1;
|
||||
}
|
||||
|
||||
void CONF_modules_free(void) {}
|
||||
|
@ -138,3 +138,5 @@ int CRYPTO_malloc_init(void) {
|
||||
}
|
||||
|
||||
void ENGINE_load_builtin_engines(void) {}
|
||||
|
||||
void OPENSSL_load_builtin_modules(void) {}
|
||||
|
@ -209,6 +209,8 @@ int RAND_load_file(const char *path, long num) {
|
||||
}
|
||||
}
|
||||
|
||||
const char *RAND_file_name(char *buf, size_t num) { return NULL; }
|
||||
|
||||
void RAND_add(const void *buf, int num, double entropy) {}
|
||||
|
||||
int RAND_egd(const char *path) {
|
||||
|
@ -131,6 +131,28 @@ int CONF_parse_list(const char *list, char sep, int remove_whitespace,
|
||||
int (*list_cb)(const char *elem, int len, void *usr),
|
||||
void *arg);
|
||||
|
||||
|
||||
/* Deprecated functions */
|
||||
|
||||
/* These defines do nothing but are provided to make old code easier to
|
||||
* compile. */
|
||||
#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,
|
||||
const char *appname,
|
||||
unsigned long flags);
|
||||
|
||||
/* CONF_modules_free does nothing. */
|
||||
OPENSSL_EXPORT void CONF_modules_free(void);
|
||||
|
||||
|
||||
#if defined(__cplusplus)
|
||||
} /* extern C */
|
||||
#endif
|
||||
|
@ -60,6 +60,9 @@ OPENSSL_EXPORT int CRYPTO_malloc_init(void);
|
||||
/* ENGINE_load_builtin_engines does nothing. */
|
||||
OPENSSL_EXPORT void ENGINE_load_builtin_engines(void);
|
||||
|
||||
/* OPENSSL_load_builtin_modules does nothing. */
|
||||
OPENSSL_EXPORT void OPENSSL_load_builtin_modules(void);
|
||||
|
||||
|
||||
#if defined(__cplusplus)
|
||||
} /* extern C */
|
||||
|
@ -75,6 +75,9 @@ OPENSSL_EXPORT void RAND_seed(const void *buf, int num);
|
||||
/* RAND_load_file returns a nonnegative number. */
|
||||
OPENSSL_EXPORT int RAND_load_file(const char *path, long num);
|
||||
|
||||
/* RAND_file_name returns NULL. */
|
||||
OPENSSL_EXPORT const char *RAND_file_name(char *buf, size_t num);
|
||||
|
||||
/* RAND_add does nothing. */
|
||||
OPENSSL_EXPORT void RAND_add(const void *buf, int num, double entropy);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user