├── .gitignore ├── app ├── .gitignore ├── build.gradle ├── proguard-rules.pro └── src │ ├── androidTest │ └── java │ │ └── io │ │ └── github │ │ └── lizhangqu │ │ └── curl │ │ └── sample │ │ └── ExampleInstrumentedTest.java │ ├── main │ ├── AndroidManifest.xml │ ├── java │ │ └── io │ │ │ └── github │ │ │ └── lizhangqu │ │ │ └── curl │ │ │ └── sample │ │ │ └── MainActivity.java │ └── res │ │ ├── layout │ │ └── activity_main.xml │ │ ├── mipmap-hdpi │ │ ├── ic_launcher.png │ │ └── ic_launcher_round.png │ │ ├── mipmap-mdpi │ │ ├── ic_launcher.png │ │ └── ic_launcher_round.png │ │ ├── mipmap-xhdpi │ │ ├── ic_launcher.png │ │ └── ic_launcher_round.png │ │ ├── mipmap-xxhdpi │ │ ├── ic_launcher.png │ │ └── ic_launcher_round.png │ │ ├── mipmap-xxxhdpi │ │ ├── ic_launcher.png │ │ └── ic_launcher_round.png │ │ └── values │ │ ├── colors.xml │ │ ├── strings.xml │ │ └── styles.xml │ └── test │ └── java │ └── io │ └── github │ └── lizhangqu │ └── curl │ └── sample │ └── ExampleUnitTest.java ├── build.gradle ├── common_function.gradle ├── gradle.properties ├── gradle └── wrapper │ ├── gradle-wrapper.jar │ └── gradle-wrapper.properties ├── gradlew ├── gradlew.bat ├── library ├── .gitignore ├── CMakeLists.txt ├── build.gradle ├── proguard-rules.pro └── src │ ├── androidTest │ └── java │ │ └── io │ │ └── github │ │ └── lizhangqu │ │ └── curl │ │ └── ExampleInstrumentedTest.java │ ├── main │ ├── AndroidManifest.xml │ ├── cpp │ │ ├── Android.mk │ │ ├── Application.mk │ │ ├── build.sh │ │ ├── log.h │ │ ├── native.cpp │ │ ├── native.h │ │ └── thirdparty │ │ │ ├── include │ │ │ ├── curl │ │ │ │ ├── curl.h │ │ │ │ ├── curlbuild.h │ │ │ │ ├── curlrules.h │ │ │ │ ├── curlver.h │ │ │ │ ├── easy.h │ │ │ │ ├── mprintf.h │ │ │ │ ├── multi.h │ │ │ │ ├── stdcheaders.h │ │ │ │ └── typecheck-gcc.h │ │ │ ├── nghttp2 │ │ │ │ ├── nghttp2.h │ │ │ │ └── nghttp2ver.h │ │ │ └── openssl │ │ │ │ ├── aes.h │ │ │ │ ├── asn1.h │ │ │ │ ├── asn1_mac.h │ │ │ │ ├── asn1t.h │ │ │ │ ├── async.h │ │ │ │ ├── bio.h │ │ │ │ ├── blowfish.h │ │ │ │ ├── bn.h │ │ │ │ ├── buffer.h │ │ │ │ ├── camellia.h │ │ │ │ ├── cast.h │ │ │ │ ├── cmac.h │ │ │ │ ├── cms.h │ │ │ │ ├── comp.h │ │ │ │ ├── conf.h │ │ │ │ ├── conf_api.h │ │ │ │ ├── crypto.h │ │ │ │ ├── ct.h │ │ │ │ ├── des.h │ │ │ │ ├── dh.h │ │ │ │ ├── dsa.h │ │ │ │ ├── dtls1.h │ │ │ │ ├── e_os2.h │ │ │ │ ├── ebcdic.h │ │ │ │ ├── ec.h │ │ │ │ ├── ecdh.h │ │ │ │ ├── ecdsa.h │ │ │ │ ├── engine.h │ │ │ │ ├── err.h │ │ │ │ ├── evp.h │ │ │ │ ├── hmac.h │ │ │ │ ├── idea.h │ │ │ │ ├── kdf.h │ │ │ │ ├── lhash.h │ │ │ │ ├── md2.h │ │ │ │ ├── md4.h │ │ │ │ ├── md5.h │ │ │ │ ├── mdc2.h │ │ │ │ ├── modes.h │ │ │ │ ├── obj_mac.h │ │ │ │ ├── objects.h │ │ │ │ ├── ocsp.h │ │ │ │ ├── opensslconf.h │ │ │ │ ├── opensslv.h │ │ │ │ ├── ossl_typ.h │ │ │ │ ├── pem.h │ │ │ │ ├── pem2.h │ │ │ │ ├── pkcs12.h │ │ │ │ ├── pkcs7.h │ │ │ │ ├── rand.h │ │ │ │ ├── rc2.h │ │ │ │ ├── rc4.h │ │ │ │ ├── rc5.h │ │ │ │ ├── ripemd.h │ │ │ │ ├── rsa.h │ │ │ │ ├── safestack.h │ │ │ │ ├── seed.h │ │ │ │ ├── sha.h │ │ │ │ ├── srp.h │ │ │ │ ├── srtp.h │ │ │ │ ├── ssl.h │ │ │ │ ├── ssl2.h │ │ │ │ ├── ssl3.h │ │ │ │ ├── stack.h │ │ │ │ ├── symhacks.h │ │ │ │ ├── tls1.h │ │ │ │ ├── ts.h │ │ │ │ ├── txt_db.h │ │ │ │ ├── ui.h │ │ │ │ ├── whrlpool.h │ │ │ │ ├── x509.h │ │ │ │ ├── x509_vfy.h │ │ │ │ └── x509v3.h │ │ │ └── lib │ │ │ ├── libcrypto.a │ │ │ ├── libcurl.a │ │ │ ├── libnghttp2.a │ │ │ └── libssl.a │ ├── java │ │ └── io │ │ │ └── github │ │ │ └── lizhangqu │ │ │ └── curl │ │ │ └── Curl.java │ ├── obj │ │ └── local │ │ │ └── armeabi │ │ │ └── objs │ │ │ └── curl-client │ │ │ ├── native.o │ │ │ └── native.o.d │ └── res │ │ └── values │ │ └── strings.xml │ └── test │ └── java │ └── io │ └── github │ └── lizhangqu │ └── curl │ └── ExampleUnitTest.java └── settings.gradle /.gitignore: -------------------------------------------------------------------------------- 1 | *.iml 2 | .gradle 3 | /local.properties 4 | /.idea/workspace.xml 5 | /.idea/libraries 6 | .DS_Store 7 | /build 8 | /captures 9 | .externalNativeBuild 10 | -------------------------------------------------------------------------------- /app/.gitignore: -------------------------------------------------------------------------------- 1 | /build 2 | -------------------------------------------------------------------------------- /app/build.gradle: -------------------------------------------------------------------------------- 1 | //公共函数 2 | apply from: "${project.rootProject.file('common_function.gradle')}" 3 | apply plugin: 'com.android.application' 4 | 5 | android { 6 | compileSdkVersion global_compileSdkVersion 7 | buildToolsVersion global_buildToolsVersion 8 | defaultConfig { 9 | applicationId "io.github.lizhangqu.curl.sample" 10 | minSdkVersion MIN_SDK_VERSION 11 | targetSdkVersion TARGET_SDK_VERSION 12 | versionCode 1 13 | versionCode 1 14 | versionName "1.0" 15 | testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner" 16 | ndk { 17 | abiFilters isDebug() ? global_debug_abiFilters : global_abiFilters 18 | } 19 | } 20 | 21 | if (isDebug()) { 22 | packagingOptions { 23 | doNotStrip "*/armeabi/*.so" 24 | doNotStrip "*/armeabi-v7a/*.so" 25 | doNotStrip "*/arm64-v8a/*.so" 26 | doNotStrip "*/x86/*.so" 27 | doNotStrip "*/x86_64/*.so" 28 | doNotStrip "*/mips/*.so" 29 | doNotStrip "*/mips64/*.so" 30 | } 31 | } 32 | 33 | buildTypes { 34 | release { 35 | minifyEnabled false 36 | proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' 37 | } 38 | } 39 | } 40 | 41 | dependencies { 42 | compile fileTree(dir: 'libs', include: ['*.jar']) 43 | androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', { 44 | exclude group: 'com.android.support', module: 'support-annotations' 45 | }) 46 | testCompile 'junit:junit:4.12' 47 | compile "com.android.support:appcompat-v7:${SUPPORT_VERSION}" 48 | if (isDebug()) { 49 | debugCompile project(path: ':library', configuration: "debug") 50 | releaseCompile project(path: ':library', configuration: "release") 51 | } else { 52 | compile project(':library') 53 | } 54 | } 55 | -------------------------------------------------------------------------------- /app/proguard-rules.pro: -------------------------------------------------------------------------------- 1 | # Add project specific ProGuard rules here. 2 | # By default, the flags in this file are appended to flags specified 3 | # in /Users/lizhangqu/AndroidSDK/tools/proguard/proguard-android.txt 4 | # You can edit the include path and order by changing the proguardFiles 5 | # directive in build.gradle. 6 | # 7 | # For more details, see 8 | # http://developer.android.com/guide/developing/tools/proguard.html 9 | 10 | # Add any project specific keep options here: 11 | 12 | # If your project uses WebView with JS, uncomment the following 13 | # and specify the fully qualified class name to the JavaScript interface 14 | # class: 15 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview { 16 | # public *; 17 | #} 18 | 19 | # Uncomment this to preserve the line number information for 20 | # debugging stack traces. 21 | #-keepattributes SourceFile,LineNumberTable 22 | 23 | # If you keep the line number information, uncomment this to 24 | # hide the original source file name. 25 | #-renamesourcefileattribute SourceFile 26 | -------------------------------------------------------------------------------- /app/src/androidTest/java/io/github/lizhangqu/curl/sample/ExampleInstrumentedTest.java: -------------------------------------------------------------------------------- 1 | package io.github.lizhangqu.curl.sample; 2 | 3 | import android.content.Context; 4 | import android.support.test.InstrumentationRegistry; 5 | import android.support.test.runner.AndroidJUnit4; 6 | 7 | import org.junit.Test; 8 | import org.junit.runner.RunWith; 9 | 10 | import static org.junit.Assert.*; 11 | 12 | /** 13 | * Instrumentation test, which will execute on an Android device. 14 | * 15 | * @see Testing documentation 16 | */ 17 | @RunWith(AndroidJUnit4.class) 18 | public class ExampleInstrumentedTest { 19 | @Test 20 | public void useAppContext() throws Exception { 21 | // Context of the app under test. 22 | Context appContext = InstrumentationRegistry.getTargetContext(); 23 | 24 | assertEquals("io.github.lizhangqu.curl.sample", appContext.getPackageName()); 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /app/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | -------------------------------------------------------------------------------- /app/src/main/java/io/github/lizhangqu/curl/sample/MainActivity.java: -------------------------------------------------------------------------------- 1 | package io.github.lizhangqu.curl.sample; 2 | 3 | import android.support.v7.app.AppCompatActivity; 4 | import android.os.Bundle; 5 | import android.view.View; 6 | 7 | import io.github.lizhangqu.curl.Curl; 8 | 9 | public class MainActivity extends AppCompatActivity { 10 | 11 | @Override 12 | protected void onCreate(Bundle savedInstanceState) { 13 | super.onCreate(savedInstanceState); 14 | setContentView(R.layout.activity_main); 15 | findViewById(R.id.btn).setOnClickListener(new View.OnClickListener() { 16 | @Override 17 | public void onClick(View v) { 18 | Curl.dump("https://vap.gw.weidian.com/com.vdian.sword/appconf/getConfig/1.1"); 19 | } 20 | }); 21 | 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /app/src/main/res/layout/activity_main.xml: -------------------------------------------------------------------------------- 1 | 2 | 9 | 10 |