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>
diff --git a/include/openssl/ssl.h b/include/openssl/ssl.h index 7cb12f1..d804a88 100644 --- a/include/openssl/ssl.h +++ b/include/openssl/ssl.h
@@ -1496,11 +1496,15 @@ * 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 @@ * |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 @@ * 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. */