Use static libraries for libcrypto and libssl native tests.

The tests run from /data/local/tmp and likely to pick up
libraries from the sustem partition (or not in some libssl cases)
rather than the APEX.

Fixes: 228778981
Test: atest boringssl_crypto_tests boringssl_ssl_tests
Change-Id: I0429686a87723447179a6cf32c6f9d4f1a7e7fc1
diff --git a/Android.bp b/Android.bp
index daec62c..84c70c7 100644
--- a/Android.bp
+++ b/Android.bp
@@ -510,7 +510,9 @@
         "boringssl_flags",
     ],
     whole_static_libs: ["boringssl_test_support"],
-    shared_libs: ["libcrypto"],
+    // Statically link the library to test to ensure we always pick up the
+    // correct version regardless of device linker configuration.
+    static_libs: ["libcrypto_static"],
     target: {
         android: {
             test_suites: ["mts-conscrypt"],
@@ -537,9 +539,10 @@
         "boringssl_flags",
     ],
     whole_static_libs: ["boringssl_test_support"],
-
-    shared_libs: [
-        "libcrypto",
+    // Statically link the libraries to test to ensure we always pick up the
+    // correct version regardless of device linker configuration.
+    static_libs: [
+        "libcrypto_static",
         "libssl",
     ],
     target: {