File tree Expand file tree Collapse file tree 2 files changed +8
-4
lines changed
src/jvmTest/kotlin/com/sunnychung/application/multiplatform/hellohttp/test Expand file tree Collapse file tree 2 files changed +8
-4
lines changed Original file line number Diff line number Diff line change @@ -3,7 +3,8 @@ package com.sunnychung.application.multiplatform.hellohttp.test
33import com.sunnychung.application.multiplatform.hellohttp.manager.NetworkClientManager
44import com.sunnychung.application.multiplatform.hellohttp.model.ClientCertificateKeyPair
55import com.sunnychung.application.multiplatform.hellohttp.model.SslConfig
6- import com.sunnychung.application.multiplatform.hellohttp.network.ApacheHttpTransportClient
6+ import com.sunnychung.application.multiplatform.hellohttp.network.SpringWebClientTransportClient
7+ // import com.sunnychung.application.multiplatform.hellohttp.network.ApacheHttpTransportClient
78import com.sunnychung.application.multiplatform.hellohttp.util.importFrom
89import java.io.File
910import java.security.spec.InvalidKeySpecException
@@ -19,7 +20,8 @@ class SslConfigTest {
1920 keyPassword = password
2021 )
2122 val sslConfig = SslConfig (clientCertificateKeyPairs = listOf (keyPair))
22- ApacheHttpTransportClient (NetworkClientManager ()).createSslContext(sslConfig)
23+ // ApacheHttpTransportClient(NetworkClientManager()).createSslContext(sslConfig)
24+ SpringWebClientTransportClient (NetworkClientManager ()).createSslContext(sslConfig)
2325 }
2426
2527 @Test
Original file line number Diff line number Diff line change @@ -3,10 +3,11 @@ package com.sunnychung.application.multiplatform.hellohttp.test
33import com.sunnychung.application.multiplatform.hellohttp.manager.NetworkClientManager
44import com.sunnychung.application.multiplatform.hellohttp.model.ClientCertificateKeyPair
55import com.sunnychung.application.multiplatform.hellohttp.model.SslConfig
6+ import com.sunnychung.application.multiplatform.hellohttp.network.SpringWebClientTransportClient
67import com.sunnychung.application.multiplatform.hellohttp.util.importCaCertificates
78import com.sunnychung.application.multiplatform.hellohttp.util.importFrom
89import com.sunnychung.application.multiplatform.hellohttp.util.parseCaCertificates
9- import com.sunnychung.application.multiplatform.hellohttp.network.ApacheHttpTransportClient
10+ // import com.sunnychung.application.multiplatform.hellohttp.network.ApacheHttpTransportClient
1011import com.sunnychung.application.multiplatform.hellohttp.network.util.DenyAllSslCertificateManager
1112import com.sunnychung.application.multiplatform.hellohttp.network.util.MultipleTrustCertificateManager
1213import java.io.File
@@ -17,7 +18,8 @@ import kotlin.test.assertFailsWith
1718
1819class SslContextTest {
1920
20- val httpClient = ApacheHttpTransportClient (NetworkClientManager ())
21+ // val httpClient = ApacheHttpTransportClient(NetworkClientManager())
22+ val httpClient = SpringWebClientTransportClient (NetworkClientManager ())
2123
2224 private fun verifyGoogleCertificates (trustManager : X509TrustManager ) {
2325 trustManager.checkServerTrusted(
You can’t perform that action at this time.
0 commit comments