Loading README.md +35 −3 Original line number Diff line number Diff line Loading @@ -4,13 +4,16 @@ # cert4android cert4android is an Android library for managing custom certificates which has been developed for [DAVdroid](https://davdroid.bitfire.at). Feel free to use cert4android is a library for Android to manage custom certificates which has been developed for [DAVx⁵](https://www.davx5.com). Feel free to use it in your own open-source app. _This software is not affiliated to, nor has it been authorized, sponsored or otherwise approved by Google LLC. Android is a trademark of Google LLC._ Generated KDoc: https://bitfireat.gitlab.io/cert4android/dokka/cert4android/ Discussion: https://forums.bitfire.at/category/7/transport-level-security Discussion: https://forums.bitfire.at/category/18/libraries # Features Loading @@ -31,11 +34,40 @@ Discussion: https://forums.bitfire.at/category/7/transport-level-security 1. Close the instance when it's not required anymore (will disconnect from the `CustomCertService`, thus allowing it to be destroyed). Example of initialzing an okhttp client: val keyManager = ... CustomCertManager(...).use { trustManager -> val sslContext = SSLContext.getInstance("TLS") sslContext.init( if (keyManager != null) arrayOf(keyManager) else null, arrayOf(trustManager), null ) val builder = OkHttpClient.Builder() builder.sslSocketFactory(sslContext.socketFactory, trustManager) .hostnameVerifier(hostnameVerifier) val httpClient = builder.build() // use httpClient } You can overwrite resources when you want, just have a look at the `res/strings` directory. Especially `certificate_notification_connection_security` and `trust_certificate_unknown_certificate_found` should contain your app name. ## Contact ``` bitfire web engineering – Stockmann, Hirner GesnbR Florastraße 27 2540 Bad Vöslau, AUSTRIA ``` Email: [play@bitfire.at](mailto:play@bitfire.at) (do not use this) # License Copyright (C) bitfire web engineering (Ricki Hirner, Bernhard Stockmann). Loading build.gradle +42 −16 Original line number Diff line number Diff line buildscript { ext.kotlin_version = '1.3.10' ext.dokka_version = '0.9.17' ext.versions = [ kotlin: '1.3.61', dokka: '0.10.0', conscrypt: '2.2.1' ] repositories { google() Loading @@ -9,9 +12,9 @@ buildscript { } dependencies { classpath 'com.android.tools.build:gradle:3.2.1' classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" classpath "org.jetbrains.dokka:dokka-android-gradle-plugin:${dokka_version}" classpath 'com.android.tools.build:gradle:3.5.3' classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:${versions.kotlin}" classpath "org.jetbrains.dokka:dokka-gradle-plugin:${versions.dokka}" } } Loading @@ -22,35 +25,58 @@ repositories { apply plugin: 'com.android.library' apply plugin: 'kotlin-android' apply plugin: 'org.jetbrains.dokka-android' apply plugin: 'org.jetbrains.dokka' android { compileSdkVersion 27 buildToolsVersion '27.1.1' compileSdkVersion 29 buildToolsVersion '29.0.2' defaultConfig { minSdkVersion 24 targetSdkVersion 27 minSdkVersion 14 targetSdkVersion 29 } compileOptions { sourceCompatibility JavaVersion.VERSION_1_8 targetCompatibility JavaVersion.VERSION_1_8 } dataBinding.enabled = true lintOptions { disable 'MissingTranslation', 'ExtraTranslation' // translations from Transifex are not always up to date disable "OnClick" // doesn't recognize Kotlin onClick methods } defaultConfig { testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner" testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" } dokka.configuration { sourceLink { url = "https://gitlab.com/bitfireAT/cert4android/tree/master/" lineSuffix = "#L" } jdkVersion = 7 } } dependencies { implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version" implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8:${versions.kotlin}" implementation 'com.android.support:appcompat-v7:27.1.1' implementation 'com.android.support:cardview-v7:27.1.1' implementation 'androidx.appcompat:appcompat:1.1.0' implementation 'androidx.cardview:cardview:1.0.0' implementation 'androidx.lifecycle:lifecycle-extensions:2.1.0' implementation 'androidx.lifecycle:lifecycle-livedata:2.1.0' implementation 'androidx.lifecycle:lifecycle-viewmodel-ktx:2.1.0' implementation 'com.google.android.material:material:1.2.0-alpha03' implementation "org.conscrypt:conscrypt-android:${versions.conscrypt}" androidTestImplementation 'com.android.support.test:runner:1.0.2' androidTestImplementation 'com.android.support.test:rules:1.0.2' androidTestImplementation 'androidx.test:runner:1.2.0' androidTestImplementation 'androidx.test:rules:1.2.0' androidTestImplementation 'com.squareup.okhttp3:mockwebserver:3.12.5' androidTestImplementation 'commons-io:commons-io:2.6' androidTestImplementation 'org.apache.commons:commons-lang3:3.9' testImplementation 'junit:junit:4.12' } gradle.properties +1 −0 Original line number Diff line number Diff line org.gradle.jvmargs=-Xmx1536M android.useAndroidX=true gradle/wrapper/gradle-wrapper.properties +2 −2 Original line number Diff line number Diff line #Tue Aug 23 16:42:17 CEST 2016 #Wed Apr 17 22:31:47 CEST 2019 distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists distributionUrl=https\://services.gradle.org/distributions/gradle-4.8-all.zip distributionUrl=https\://services.gradle.org/distributions/gradle-5.5.1-all.zip project.propertiesdeleted 100644 → 0 +0 −3 Original line number Diff line number Diff line android.library=true Loading
README.md +35 −3 Original line number Diff line number Diff line Loading @@ -4,13 +4,16 @@ # cert4android cert4android is an Android library for managing custom certificates which has been developed for [DAVdroid](https://davdroid.bitfire.at). Feel free to use cert4android is a library for Android to manage custom certificates which has been developed for [DAVx⁵](https://www.davx5.com). Feel free to use it in your own open-source app. _This software is not affiliated to, nor has it been authorized, sponsored or otherwise approved by Google LLC. Android is a trademark of Google LLC._ Generated KDoc: https://bitfireat.gitlab.io/cert4android/dokka/cert4android/ Discussion: https://forums.bitfire.at/category/7/transport-level-security Discussion: https://forums.bitfire.at/category/18/libraries # Features Loading @@ -31,11 +34,40 @@ Discussion: https://forums.bitfire.at/category/7/transport-level-security 1. Close the instance when it's not required anymore (will disconnect from the `CustomCertService`, thus allowing it to be destroyed). Example of initialzing an okhttp client: val keyManager = ... CustomCertManager(...).use { trustManager -> val sslContext = SSLContext.getInstance("TLS") sslContext.init( if (keyManager != null) arrayOf(keyManager) else null, arrayOf(trustManager), null ) val builder = OkHttpClient.Builder() builder.sslSocketFactory(sslContext.socketFactory, trustManager) .hostnameVerifier(hostnameVerifier) val httpClient = builder.build() // use httpClient } You can overwrite resources when you want, just have a look at the `res/strings` directory. Especially `certificate_notification_connection_security` and `trust_certificate_unknown_certificate_found` should contain your app name. ## Contact ``` bitfire web engineering – Stockmann, Hirner GesnbR Florastraße 27 2540 Bad Vöslau, AUSTRIA ``` Email: [play@bitfire.at](mailto:play@bitfire.at) (do not use this) # License Copyright (C) bitfire web engineering (Ricki Hirner, Bernhard Stockmann). Loading
build.gradle +42 −16 Original line number Diff line number Diff line buildscript { ext.kotlin_version = '1.3.10' ext.dokka_version = '0.9.17' ext.versions = [ kotlin: '1.3.61', dokka: '0.10.0', conscrypt: '2.2.1' ] repositories { google() Loading @@ -9,9 +12,9 @@ buildscript { } dependencies { classpath 'com.android.tools.build:gradle:3.2.1' classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" classpath "org.jetbrains.dokka:dokka-android-gradle-plugin:${dokka_version}" classpath 'com.android.tools.build:gradle:3.5.3' classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:${versions.kotlin}" classpath "org.jetbrains.dokka:dokka-gradle-plugin:${versions.dokka}" } } Loading @@ -22,35 +25,58 @@ repositories { apply plugin: 'com.android.library' apply plugin: 'kotlin-android' apply plugin: 'org.jetbrains.dokka-android' apply plugin: 'org.jetbrains.dokka' android { compileSdkVersion 27 buildToolsVersion '27.1.1' compileSdkVersion 29 buildToolsVersion '29.0.2' defaultConfig { minSdkVersion 24 targetSdkVersion 27 minSdkVersion 14 targetSdkVersion 29 } compileOptions { sourceCompatibility JavaVersion.VERSION_1_8 targetCompatibility JavaVersion.VERSION_1_8 } dataBinding.enabled = true lintOptions { disable 'MissingTranslation', 'ExtraTranslation' // translations from Transifex are not always up to date disable "OnClick" // doesn't recognize Kotlin onClick methods } defaultConfig { testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner" testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" } dokka.configuration { sourceLink { url = "https://gitlab.com/bitfireAT/cert4android/tree/master/" lineSuffix = "#L" } jdkVersion = 7 } } dependencies { implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version" implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8:${versions.kotlin}" implementation 'com.android.support:appcompat-v7:27.1.1' implementation 'com.android.support:cardview-v7:27.1.1' implementation 'androidx.appcompat:appcompat:1.1.0' implementation 'androidx.cardview:cardview:1.0.0' implementation 'androidx.lifecycle:lifecycle-extensions:2.1.0' implementation 'androidx.lifecycle:lifecycle-livedata:2.1.0' implementation 'androidx.lifecycle:lifecycle-viewmodel-ktx:2.1.0' implementation 'com.google.android.material:material:1.2.0-alpha03' implementation "org.conscrypt:conscrypt-android:${versions.conscrypt}" androidTestImplementation 'com.android.support.test:runner:1.0.2' androidTestImplementation 'com.android.support.test:rules:1.0.2' androidTestImplementation 'androidx.test:runner:1.2.0' androidTestImplementation 'androidx.test:rules:1.2.0' androidTestImplementation 'com.squareup.okhttp3:mockwebserver:3.12.5' androidTestImplementation 'commons-io:commons-io:2.6' androidTestImplementation 'org.apache.commons:commons-lang3:3.9' testImplementation 'junit:junit:4.12' }
gradle.properties +1 −0 Original line number Diff line number Diff line org.gradle.jvmargs=-Xmx1536M android.useAndroidX=true
gradle/wrapper/gradle-wrapper.properties +2 −2 Original line number Diff line number Diff line #Tue Aug 23 16:42:17 CEST 2016 #Wed Apr 17 22:31:47 CEST 2019 distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists distributionUrl=https\://services.gradle.org/distributions/gradle-4.8-all.zip distributionUrl=https\://services.gradle.org/distributions/gradle-5.5.1-all.zip
project.propertiesdeleted 100644 → 0 +0 −3 Original line number Diff line number Diff line android.library=true