Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit a081ef21 authored by Ricki Hirner's avatar Ricki Hirner
Browse files

Re-enable HTTP/2 again (was disabled for all connections and not only when...

Re-enable HTTP/2 again (was disabled for all connections and not only when using client certificates by mistake)
parent 1882dee0
Loading
Loading
Loading
Loading
+8 −8
Original line number Diff line number Diff line
@@ -178,8 +178,8 @@ class HttpClient private constructor(
                    ?: OkHostnameVerifier.INSTANCE

            var keyManager: KeyManager? = null
            try {
            certificateAlias?.let { alias ->
                try {
                    val context = requireNotNull(context)

                    // get provider certificate and private key
@@ -208,7 +208,6 @@ class HttpClient private constructor(
                        override fun getPrivateKey(forAlias: String?) =
                                key.takeIf { forAlias == alias }
                    }
                }

                    // HTTP/2 doesn't support client certificates (yet)
                    // see https://tools.ietf.org/html/draft-ietf-httpbis-http2-secondary-certs-04
@@ -216,6 +215,7 @@ class HttpClient private constructor(
                } catch (e: Exception) {
                    logger.log(Level.SEVERE, "Couldn't set up provider certificate authentication", e)
                }
            }

            val sslContext = SSLContext.getInstance("TLS")
            sslContext.init(