Add another temporary hack for wpa_supplicant.

Due to Android's complex branching scheme, we have to keep building against a
snapshotted version of wpa_supplicant. wpa_supplicant, in preparation for
OpenSSL 1.1.0, added compatibility versions of some accessors that we, in
working towards opaquification, have imported. This causes a conflict (C does
not like having static and non-static functions share a name).

Add a hack in the headers to suppress the conflicting accessors when
BORINGSSL_SUPPRESS_ACCESSORS is defined. Android releases which include an
updated BoringSSL will also locally carry this #define in wpa_supplicant build
files. Once we can be sure releases of BoringSSL will only see a new enough
wpa_supplicant (one which includes a to-be-submitted patch), we can ditch this.

Change-Id: I3e27fde86bac1e59077498ee5cbd916cd880821e
Reviewed-on: https://boringssl-review.googlesource.com/7750
Reviewed-by: Adam Langley <agl@google.com>
This commit is contained in:
David Benjamin 2016-04-25 14:41:19 -04:00 committed by Adam Langley
parent b70cd92c82
commit 1be6a7e442

View File

@ -1496,11 +1496,15 @@ OPENSSL_EXPORT uint32_t SSL_SESSION_get_key_exchange_info(
* TODO(davidben): This should return a const X509 *. */
OPENSSL_EXPORT X509 *SSL_SESSION_get0_peer(const SSL_SESSION *session);
/* TODO(davidben): Remove this when wpa_supplicant in Android has synced with
* upstream. */
#if !defined(BORINGSSL_SUPPRESS_ACCESSORS)
/* SSL_SESSION_get_master_key writes up to |max_out| bytes of |session|'s master
* secret to |out| and returns the number of bytes written. If |max_out| is
* zero, it returns the size of the master secret. */
OPENSSL_EXPORT size_t SSL_SESSION_get_master_key(const SSL_SESSION *session,
uint8_t *out, size_t max_out);
#endif
/* SSL_SESSION_set_time sets |session|'s creation time to |time| and returns
* |time|. This function may be useful in writing tests but otherwise should not
@ -2935,6 +2939,9 @@ OPENSSL_EXPORT int SSL_get_shutdown(const SSL *ssl);
* |TLSEXT_hash_none|. */
OPENSSL_EXPORT uint8_t SSL_get_server_key_exchange_hash(const SSL *ssl);
/* TODO(davidben): Remove this when wpa_supplicant in Android has synced with
* upstream. */
#if !defined(BORINGSSL_SUPPRESS_ACCESSORS)
/* SSL_get_client_random writes up to |max_out| bytes of the most recent
* handshake's client_random to |out| and returns the number of bytes written.
* If |max_out| is zero, it returns the size of the client_random. */
@ -2946,6 +2953,7 @@ OPENSSL_EXPORT size_t SSL_get_client_random(const SSL *ssl, uint8_t *out,
* If |max_out| is zero, it returns the size of the server_random. */
OPENSSL_EXPORT size_t SSL_get_server_random(const SSL *ssl, uint8_t *out,
size_t max_out);
#endif
/* SSL_get_pending_cipher returns the cipher suite for the current handshake or
* NULL if one has not been negotiated yet or there is no pending handshake. */