Skip to content

Commit

Permalink
Filter out the host issuer CN from truststore
Browse files Browse the repository at this point in the history
  • Loading branch information
sureshg committed Jun 17, 2017
1 parent b83ccf1 commit 4eefa1f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/main/kotlin/io/sureshg/crypto/InstallCerts.kt
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ object InstallCerts {

println("Server sent ${result.chain.size} certificate(s)...".yellow)
result.chain
.filter { it.subjectX500Principal.name != host }
.filter { it.subjectX500Principal?.x500Name?.commonName != host }
.reversed()
.forEachIndexed { idx, cert ->
val alias = "$host-${idx + 1}"
Expand Down

0 comments on commit 4eefa1f

Please sign in to comment.