Add declarations for Android compatibility funcs. Some parts of Android can't be updated yet so this change adds declarations (only) for some functions that will be stubbed in Android-specific code. (That Android-specific code will live in the Android repo, not the BoringSSL repo.) Trying to use these functions outside of Android will result in a link error. Change-Id: Iaa9b956e6408d21cd8fc34d90d9c15657e429877 Reviewed-on: https://boringssl-review.googlesource.com/2760 Reviewed-by: David Benjamin <davidben@chromium.org> Reviewed-by: Adam Langley <agl@google.com>
diff --git a/include/openssl/bn.h b/include/openssl/bn.h index 37a4bba..0631b8c 100644 --- a/include/openssl/bn.h +++ b/include/openssl/bn.h
@@ -802,6 +802,15 @@ #define BN_FLG_CONSTTIME 0x04 +/* Android compatibility section. + * + * These functions are declared, temporarily, for Android because + * wpa_supplicant will take a little time to sync with upstream. Outside of + * Android they'll have no definition. */ + +OPENSSL_EXPORT BIGNUM *get_rfc3526_prime_1536(BIGNUM *bn); + + #if defined(__cplusplus) } /* extern C */ #endif
diff --git a/include/openssl/cipher.h b/include/openssl/cipher.h index d78debf..b496c85 100644 --- a/include/openssl/cipher.h +++ b/include/openssl/cipher.h
@@ -485,6 +485,16 @@ } EVP_CIPHER_INFO; +/* Android compatibility section. + * + * These functions are declared, temporarily, for Android because + * wpa_supplicant will take a little time to sync with upstream. Outside of + * Android they'll have no definition. */ + +OPENSSL_EXPORT const EVP_CIPHER *EVP_aes_192_ecb(void); +OPENSSL_EXPORT const EVP_CIPHER *EVP_aes_192_cbc(void); + + #if defined(__cplusplus) } /* extern C */ #endif
diff --git a/include/openssl/err.h b/include/openssl/err.h index ca1f6c4..071c5ba 100644 --- a/include/openssl/err.h +++ b/include/openssl/err.h
@@ -525,6 +525,15 @@ OPENSSL_EXPORT void ERR_load_BIO_strings(void); +/* Android compatibility section. + * + * These functions are declared, temporarily, for Android because + * wpa_supplicant will take a little time to sync with upstream. Outside of + * Android they'll have no definition. */ + +OPENSSL_EXPORT void ERR_remove_state(unsigned long pid); + + #if defined(__cplusplus) } /* extern C */ #endif
diff --git a/include/openssl/ssl.h b/include/openssl/ssl.h index f6ad654..960bc86 100644 --- a/include/openssl/ssl.h +++ b/include/openssl/ssl.h
@@ -2218,6 +2218,19 @@ OPENSSL_EXPORT void ERR_load_SSL_strings(void); +/* Android compatibility section. + * + * These functions are declared, temporarily, for Android because + * wpa_supplicant will take a little time to sync with upstream. Outside of + * Android they'll have no definition. */ + +#define SSL_F_SSL_SET_SESSION_TICKET_EXT doesnt_exist + +OPENSSL_EXPORT int SSL_set_session_ticket_ext(SSL *s, void *ext_data, int ext_len); +OPENSSL_EXPORT int SSL_set_session_secret_cb(SSL *s, void *cb, void *arg); +OPENSSL_EXPORT int SSL_set_session_ticket_ext_cb(SSL *s, void *cb, void *arg); + + #ifdef __cplusplus } #endif