}
+#ifndef ANDROID
#ifdef OPENSSL_NO_ENGINE
#if OPENSSL_VERSION_NUMBER >= 0x30000000L
}
#endif /* OPENSSL_NO_ENGINE */
+#endif /* !ANDROID */
#ifdef CONFIG_NATIVE_WINDOWS
void openssl_load_legacy_provider(void);
openssl_load_legacy_provider();
-#ifdef OPENSSL_NO_ENGINE
+#if !defined(ANDROID) && defined(OPENSSL_NO_ENGINE)
openssl_load_pkcs11_provider();
-#endif /* OPENSSL_NO_ENGINE */
+#endif /* !ANDROID && OPENSSL_NO_ENGINE */
tls_global = context = tls_context_new(conf);
if (context == NULL)
tls_openssl_ref_count--;
if (tls_openssl_ref_count == 0) {
-#ifdef OPENSSL_NO_ENGINE
+#if !defined(ANDROID) && defined(OPENSSL_NO_ENGINE)
openssl_unload_pkcs11_provider();
-#endif /* OPENSSL_NO_ENGINE */
+#endif /* !ANDROID && OPENSSL_NO_ENGINE */
#if OPENSSL_VERSION_NUMBER < 0x10100000L
#ifndef OPENSSL_NO_ENGINE
ENGINE_cleanup();
return ret;
#else /* OPENSSL_NO_ENGINE */
+#ifndef ANDROID
conn->private_key = provider_load_key(key_id);
if (!conn->private_key)
return -1;
+#endif /* !ANDROID */
return 0;
#endif /* OPENSSL_NO_ENGINE */
static int tls_connection_engine_client_cert(struct tls_connection *conn,
const char *cert_id)
{
+#ifndef ANDROID
X509 *cert;
#ifndef OPENSSL_NO_ENGINE
wpa_printf(MSG_DEBUG, "ENGINE/provider: SSL_use_certificate --> "
"OK");
return 0;
+#else /* ANDROID */
+ return -1;
+#endif /* ANDROID */
}
struct tls_connection *conn,
const char *ca_cert_id)
{
+#ifndef ANDROID
X509 *cert;
SSL_CTX *ssl_ctx = data->ssl;
X509_STORE *store;
conn->ca_cert_verify = 1;
return 0;
+#else /* ANDROID */
+ return -1;
+#endif /* ANDROID */
}
return -1;
if (engine_id && ca_cert_id) {
-#ifdef OPENSSL_NO_ENGINE
+#if !defined(ANDROID) && defined(OPENSSL_NO_ENGINE)
if (!openssl_can_use_provider(engine_id, ca_cert_id))
return TLS_SET_PARAMS_ENGINE_PRV_INIT_FAILED;
-#endif /* OPENSSL_NO_ENGINE */
+#endif /* !ANDROID && OPENSSL_NO_ENGINE */
if (tls_connection_engine_ca_cert(data, conn, ca_cert_id))
return TLS_SET_PARAMS_ENGINE_PRV_VERIFY_FAILED;
} else if (tls_connection_ca_cert(data, conn, params->ca_cert,
return -1;
if (engine_id && cert_id) {
-#ifdef OPENSSL_NO_ENGINE
+#if !defined(ANDROID) && defined(OPENSSL_NO_ENGINE)
if (!openssl_can_use_provider(engine_id, cert_id))
return TLS_SET_PARAMS_ENGINE_PRV_INIT_FAILED;
-#endif /* OPENSSL_NO_ENGINE */
+#endif /* !ANDROID && OPENSSL_NO_ENGINE */
if (tls_connection_engine_client_cert(conn, cert_id))
return TLS_SET_PARAMS_ENGINE_PRV_VERIFY_FAILED;
} else if (tls_connection_client_cert(conn, params->client_cert,
return -1;
if (engine_id && key_id) {
-#ifdef OPENSSL_NO_ENGINE
+#if !defined(ANDROID) && defined(OPENSSL_NO_ENGINE)
if (!openssl_can_use_provider(engine_id, key_id))
return TLS_SET_PARAMS_ENGINE_PRV_INIT_FAILED;
-#endif /* OPENSSL_NO_ENGINE */
+#endif /* !ANDROID && OPENSSL_NO_ENGINE */
wpa_printf(MSG_DEBUG,
"TLS: Using private key from engine/provider");
if (tls_connection_engine_private_key(conn))