Skip to content

Commit c16f34d

Browse files
committed
fix(android): Conscrypt not included by default anymore. You need to add it in your app
1 parent be86ded commit c16f34d

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
dependencies {
22
def okHttpVersion = project.hasProperty("okHttpVersion") ? project.okHttpVersion : "3.14.7"
33
implementation "com.squareup.okhttp3:okhttp:$okHttpVersion"
4-
def conscryptVersion = project.hasProperty("conscryptVersion") ? project.conscryptVersion : "2.4.0"
5-
implementation "org.conscrypt:conscrypt-android:$conscryptVersion"
4+
// def conscryptVersion = project.hasProperty("conscryptVersion") ? project.conscryptVersion : "2.4.0"
5+
// implementation "org.conscrypt:conscrypt-android:$conscryptVersion"
66
}

src/https.android.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -237,7 +237,7 @@ function getClient(reload: boolean = false, timeout: number = 10): okhttp3.OkHtt
237237
// ssl error fix on KitKat. Only need to be done once.
238238
// client will be null only onced so will run only once
239239
const version = android.os.Build.VERSION.SDK_INT;
240-
if (version >= 16 && version < 22) {
240+
if (version >= 16 && version < 22 && (org as any).conscrypt) {
241241
java.security.Security.insertProviderAt((org as any).conscrypt.Conscrypt.newProvider(), 1);
242242
}
243243
}

0 commit comments

Comments
 (0)