File tree Expand file tree Collapse file tree 1 file changed +16
-16
lines changed
Expand file tree Collapse file tree 1 file changed +16
-16
lines changed Original file line number Diff line number Diff line change @@ -73,22 +73,22 @@ or [submit a PR](https://github.com/bitfireAT/cert4android/pulls) over Github.
7373
7474Example of initializing an okhttp client:
7575
76- ```kotlin
77- val keyManager = ...
78- CustomCertManager(...).use { trustManager ->
79- val sslContext = SSLContext.getInstance("TLS")
80- sslContext.init(
81- if (keyManager != null) arrayOf(keyManager) else null,
82- arrayOf(trustManager),
83- null
84- )
85- val builder = OkHttpClient.Builder()
86- builder.sslSocketFactory(sslContext.socketFactory, trustManager)
87- .hostnameVerifier(hostnameVerifier)
88- val httpClient = builder.build()
89- // use httpClient
90- }
91- ```
76+ ```kotlin
77+ val keyManager = ...
78+ CustomCertManager(...).use { trustManager ->
79+ val sslContext = SSLContext.getInstance("TLS")
80+ sslContext.init(
81+ if (keyManager != null) arrayOf(keyManager) else null,
82+ arrayOf(trustManager),
83+ null
84+ )
85+ val builder = OkHttpClient.Builder()
86+ builder.sslSocketFactory(sslContext.socketFactory, trustManager)
87+ .hostnameVerifier(hostnameVerifier)
88+ val httpClient = builder.build()
89+ // use httpClient
90+ }
91+ ```
9292
9393You can overwrite resources when you want, just have a look at the ` res/strings `
9494directory. Especially ` certificate_notification_connection_security ` and
You can’t perform that action at this time.
0 commit comments