Add build target for the mainline supplicant.
Also adds a new set of cflags specific to
the mainline supplicant. These will be
trimmed down in a future CL.
Bug: 365585450
Test: m
Change-Id: I8c487f853a8a2d8667a5e9c5152e8f0da56a3144
diff --git a/src/crypto/tls_openssl.c b/src/crypto/tls_openssl.c
index f5d734d..d849933 100644
--- a/src/crypto/tls_openssl.c
+++ b/src/crypto/tls_openssl.c
@@ -1290,8 +1290,9 @@
#endif /* OPENSSL_NO_ENGINE */
-#ifdef ANDROID
-/* EVP_PKEY_from_keystore comes from system/security/keystore-engine. */
+// Imported from system/security/keystore-engine. This method
+// is not used by the mainline supplicant.
+#if defined(ANDROID) && !defined(MAINLINE_SUPPLICANT)
EVP_PKEY * EVP_PKEY_from_keystore(const char *key_id);
#endif /* ANDROID */
@@ -1299,7 +1300,7 @@
const char *pin, const char *key_id,
const char *cert_id, const char *ca_cert_id)
{
-#if defined(ANDROID) && defined(OPENSSL_IS_BORINGSSL)
+#if defined(ANDROID) && !defined(MAINLINE_SUPPLICANT) && defined(OPENSSL_IS_BORINGSSL)
#if !defined(OPENSSL_NO_ENGINE)
#error "This code depends on OPENSSL_NO_ENGINE being defined by BoringSSL."
#endif
@@ -1307,6 +1308,7 @@
return TLS_SET_PARAMS_ENGINE_PRV_INIT_FAILED;
conn->engine = NULL;
conn->private_key = EVP_PKEY_from_keystore(key_id);
+
if (!conn->private_key) {
wpa_printf(MSG_ERROR,
"ENGINE: cannot load private key with id '%s' [%s]",