We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d9259d9 commit a891ec1Copy full SHA for a891ec1
src/main/kotlin/com/coder/toolbox/util/TLS.kt
@@ -86,11 +86,13 @@ fun sslContextFromPEMs(
86
87
fun coderSocketFactory(settings: ReadOnlyTLSSettings): SSLSocketFactory {
88
val sslContext = sslContextFromPEMs(settings.certPath, settings.keyPath, settings.caPath)
89
- if (settings.altHostname.isNullOrBlank()) {
+
90
+ val altHostname = settings.altHostname
91
+ if (altHostname.isNullOrBlank()) {
92
return sslContext.socketFactory
93
}
94
- return AlternateNameSSLSocketFactory(sslContext.socketFactory, settings.altHostname!!)
95
+ return AlternateNameSSLSocketFactory(sslContext.socketFactory, altHostname)
96
97
98
fun coderTrustManagers(tlsCAPath: String?): Array<TrustManager> {
0 commit comments