Updates von Abhängigkeiten
This commit is contained in:
@@ -26,15 +26,15 @@ repositories {
|
|||||||
apply plugin: 'realm-android'
|
apply plugin: 'realm-android'
|
||||||
|
|
||||||
android {
|
android {
|
||||||
compileSdkVersion 26
|
compileSdkVersion 27
|
||||||
buildToolsVersion '27.0.3'
|
buildToolsVersion '27.0.3'
|
||||||
|
|
||||||
defaultConfig {
|
defaultConfig {
|
||||||
applicationId "de.beyondsoft.ownchat"
|
applicationId "de.beyondsoft.ownchat"
|
||||||
minSdkVersion 19
|
minSdkVersion 19
|
||||||
targetSdkVersion 26
|
targetSdkVersion 27
|
||||||
versionCode 12
|
versionCode 13
|
||||||
versionName "1.12"
|
versionName "1.13"
|
||||||
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
|
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
|
||||||
multiDexEnabled true
|
multiDexEnabled true
|
||||||
}
|
}
|
||||||
@@ -97,9 +97,9 @@ dependencies {
|
|||||||
// emojis
|
// emojis
|
||||||
// circle progress
|
// circle progress
|
||||||
// event bus
|
// event bus
|
||||||
implementation 'com.android.support:appcompat-v7:26.1.0'
|
implementation 'com.android.support:appcompat-v7:27.1.1'
|
||||||
implementation 'com.android.support:design:26.1.0'
|
implementation 'com.android.support:design:27.1.1'
|
||||||
implementation 'com.jakewharton:butterknife:8.4.0'
|
implementation 'com.jakewharton:butterknife:8.8.1'
|
||||||
implementation 'com.google.dagger:dagger:2.7'
|
implementation 'com.google.dagger:dagger:2.7'
|
||||||
implementation 'io.reactivex:rxjava:1.1.6'
|
implementation 'io.reactivex:rxjava:1.1.6'
|
||||||
implementation 'io.reactivex:rxandroid:1.2.1'
|
implementation 'io.reactivex:rxandroid:1.2.1'
|
||||||
@@ -118,7 +118,7 @@ dependencies {
|
|||||||
implementation 'com.github.lzyzsd:circleprogress:1.2.1'
|
implementation 'com.github.lzyzsd:circleprogress:1.2.1'
|
||||||
implementation 'org.greenrobot:eventbus:3.0.0'
|
implementation 'org.greenrobot:eventbus:3.0.0'
|
||||||
testImplementation 'junit:junit:4.12'
|
testImplementation 'junit:junit:4.12'
|
||||||
annotationProcessor 'com.jakewharton:butterknife-compiler:8.4.0'
|
annotationProcessor 'com.jakewharton:butterknife-compiler:8.8.1'
|
||||||
annotationProcessor 'com.google.dagger:dagger-compiler:2.7'
|
annotationProcessor 'com.google.dagger:dagger-compiler:2.7'
|
||||||
compileOnly 'javax.annotation:jsr250-api:1.0'
|
compileOnly 'javax.annotation:jsr250-api:1.0'
|
||||||
implementation files('libs/sanselan-0_97-android-1.0.0.jar')
|
implementation files('libs/sanselan-0_97-android-1.0.0.jar')
|
||||||
|
|||||||
@@ -38,6 +38,7 @@ import retrofit2.adapter.rxjava.RxJavaCallAdapterFactory;
|
|||||||
import retrofit2.converter.gson.GsonConverterFactory;
|
import retrofit2.converter.gson.GsonConverterFactory;
|
||||||
import rx.schedulers.Schedulers;
|
import rx.schedulers.Schedulers;
|
||||||
|
|
||||||
|
import static de.beyondsoft.ownchat.utils.Constants.DICTIONARY_PUB_KEY;
|
||||||
import static de.beyondsoft.ownchat.utils.Constants.INTERMEDIATE_PUB_KEY;
|
import static de.beyondsoft.ownchat.utils.Constants.INTERMEDIATE_PUB_KEY;
|
||||||
import static de.beyondsoft.ownchat.utils.Constants.LOG_TAG_NETWORK_INTERCEPTOR;
|
import static de.beyondsoft.ownchat.utils.Constants.LOG_TAG_NETWORK_INTERCEPTOR;
|
||||||
|
|
||||||
@@ -102,7 +103,7 @@ public class ApiModule {
|
|||||||
Request request = chain.request();
|
Request request = chain.request();
|
||||||
|
|
||||||
HttpUrl url = request.url();
|
HttpUrl url = request.url();
|
||||||
Log.d(LOG_TAG_NETWORK_INTERCEPTOR, "Pinning certificate for URL: " + url);
|
//Log.d(LOG_TAG_NETWORK_INTERCEPTOR, "Pinning certificate for URL: " + url);
|
||||||
|
|
||||||
List<Certificate> certificates = chain.connection().handshake().peerCertificates();
|
List<Certificate> certificates = chain.connection().handshake().peerCertificates();
|
||||||
|
|
||||||
@@ -116,9 +117,9 @@ public class ApiModule {
|
|||||||
|
|
||||||
String name = x509Certificate.getIssuerX500Principal().getName();
|
String name = x509Certificate.getIssuerX500Principal().getName();
|
||||||
|
|
||||||
Log.d(LOG_TAG_NETWORK_INTERCEPTOR, "Certificate name: " + name + "; serial number: " + serialNumber);
|
//Log.d(LOG_TAG_NETWORK_INTERCEPTOR, "Certificate name: " + name + "; serial number: " + serialNumber);
|
||||||
|
|
||||||
if(serialNumber.equals(INTERMEDIATE_PUB_KEY) && name.contains("O=Let's Encrypt")) {
|
if((serialNumber.equals(INTERMEDIATE_PUB_KEY) || serialNumber.equals(DICTIONARY_PUB_KEY)) && name.contains("O=Let's Encrypt")) {
|
||||||
isVerified = true;
|
isVerified = true;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@@ -126,7 +127,7 @@ public class ApiModule {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if(!isVerified) {
|
if(!isVerified) {
|
||||||
Log.e(LOG_TAG_NETWORK_INTERCEPTOR, "SSL certificates are invalid!");
|
//Log.e(LOG_TAG_NETWORK_INTERCEPTOR, "SSL certificates are invalid!");
|
||||||
throw new SSLHandshakeException("Invalid SSL certificates");
|
throw new SSLHandshakeException("Invalid SSL certificates");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -44,4 +44,5 @@ public interface Constants {
|
|||||||
String LOG_TAG_NETWORK_INTERCEPTOR = "NETWORK_INTERCEPTOR";
|
String LOG_TAG_NETWORK_INTERCEPTOR = "NETWORK_INTERCEPTOR";
|
||||||
|
|
||||||
BigInteger INTERMEDIATE_PUB_KEY = new BigInteger("281431956120940106936008670181301568443719");
|
BigInteger INTERMEDIATE_PUB_KEY = new BigInteger("281431956120940106936008670181301568443719");
|
||||||
|
BigInteger DICTIONARY_PUB_KEY = new BigInteger("306629510923814782023122164817648258606804");
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user