Skip to content

Commit

Permalink
chore: more tests for compliance
Browse files Browse the repository at this point in the history
  • Loading branch information
yamilmedina committed Nov 21, 2023
1 parent 35c87b5 commit c7215e8
Showing 1 changed file with 13 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -35,12 +35,13 @@ class HttpClientConnectionSpecsTest {
val connectionSpecs = OkHttpSingleton.createNew {}.connectionSpecs
with(connectionSpecs[0]) {
tlsVersions?.let {
assertTrue { validTlsVersions.containsAll(it) }
assertFalse { notValidTlsVersions.containsAll(it) }
assertTrue { it.containsAll(validTlsVersions) }
assertFalse { it.containsAll(notValidTlsVersions) }
}

cipherSuites?.let {
assertTrue { it.containsAll(validCipherSuites) }
assertFalse { it.containsAll(notValidCipherSuites) }
}
}

Expand All @@ -56,5 +57,15 @@ class HttpClientConnectionSpecsTest {
CipherSuite.TLS_AES_128_GCM_SHA256,
CipherSuite.TLS_AES_256_GCM_SHA384
)

val notValidCipherSuites = listOf(
CipherSuite.TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA,
CipherSuite.TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA,
CipherSuite.TLS_RSA_WITH_AES_128_GCM_SHA256,
CipherSuite.TLS_RSA_WITH_AES_256_GCM_SHA384,
CipherSuite.TLS_RSA_WITH_AES_128_CBC_SHA,
CipherSuite.TLS_RSA_WITH_AES_256_CBC_SHA,
CipherSuite.TLS_RSA_WITH_3DES_EDE_CBC_SHA
)
}
}

0 comments on commit c7215e8

Please sign in to comment.