You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+12-10Lines changed: 12 additions & 10 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -6,24 +6,24 @@ Compile openssl and curl for Android
6
6
7
7
Make sure you have `Android NDK` installed.
8
8
9
-
And also necessary`autoconf` and `libtool` toolchains.
9
+
You may also need to install`autoconf` and `libtool` toolchains.
10
10
11
11
## Download
12
12
13
13
If you do not want to compile them yourself, you can download pre-compiled static libraries from [releases](https://github.com/robertying/openssl-curl-android/releases). They are in `build.tar.gz`.
14
14
15
15
Doing your own compilation is recommended, since the pre-compiled binary can become outdated soon.
16
16
17
-
Update git submodules to compile newer versions of the libraries.
17
+
Checkout newer versions in git submodules to compile newer versions of the libraries.
export ANDROID_NDK_HOME=your_android_ndk_root_here # e.g. $HOME/Library/Android/sdk/ndk/21.0.6113669
26
+
export HOST_TAG=see_this_table_for_info #e.g. darwin-x86_64, see https://developer.android.com/ndk/guides/other_build_systems#overview
27
27
export MIN_SDK_VERSION=21 # or any version you want
28
28
29
29
chmod +x ./build.sh
@@ -43,14 +43,16 @@ include $(PREBUILT_STATIC_LIBRARY)
43
43
44
44
## Options
45
45
46
-
Change scripts' configure arguments to meet your requirements.
46
+
Change scripts' configure arguments to meet your own needs.
47
47
48
-
For now, using tls (https) in Android would throw `peer verification failed`.
48
+
For now, using TLS (https) in Android would throw `peer verification failed`.
49
49
50
-
Please explicitly set `curl_easy_setopt(curl, CURLOPT_CAINFO, CA_BUNDLE_PATH);` where `CA_BUNDLE_PATH` is your ca-bundle in the devide storage.
50
+
Please explicitly set `curl_easy_setopt(curl, CURLOPT_CAINFO, CA_BUNDLE_PATH);` where `CA_BUNDLE_PATH` is your cabundle path in the device storage.
51
51
52
-
Youcandownloadandcopy[cacert.pem](https://curl.haxx.se/docs/caextract.html) to the internal storage to get tls working for libcurl.
52
+
Youcandownloadandcopy[cacert.pem](https://curl.haxx.se/docs/caextract.html) to Android assets or the device internal storage to get TLS working for libcurl.
53
53
54
-
## Working Example
54
+
## Working Examples
55
55
56
-
Checkoutthis[repo](https://github.com/robertying/CampusNet-Android/blob/master/app/src/main/cpp/jni) to see how to integrate compiled static libraries into an existing Android project, including `Android.mk` setup and `JNI` configurations.
56
+
-Seethisminimalexamplewhichcalls`curl`fromAndroidapp,using`JNI`touse`libcurl`: [AndroidCurlExample](https://github.com/robertying/AndroidCurlExample). It includes `Android.mk` setup and `JNI` configurations.
57
+
58
+
-Checkoutthismorecomplex[repo](https://github.com/robertying/CampusNet-Android/blob/master/app/src/main/cpp/jni) to see how to integrate other compiled static libraries into an existing Android project, including `Android.mk` setup and `JNI` configurations.
0 commit comments