Cache SSLSocketFactories to allow okhttp HTTPS connection reuse (#1942)
* Reuse CustomCertManager - Update bitfire-cert4android to 75cc6913fd - Refactor HttpClientBuilder to use Optional for customTrustManager and customHostnameVerifier - Add CustomCertManagerModule for dependency injection * Implement connection security manager for HTTP client - Introduce `ConnectionSecurityManager` and `ConnectionSecurityContext` classes - Refactor `HttpClientBuilder` to use the new security manager for SSL context setup * [WIP] Cache SSLContext by certificate alias - Add context cache using Guava CacheBuilder - Cache SSLContext in getContext method * Update comments in HttpClientBuilder.kt for clarity * Update ConnectionSecurityManager to use SSLSocketFactory caching * Refactor socket factory caching logic for better clarity * Add tests * Refactor socket factory cache to store only SSLSocketFactory * Minor changes - Change socketFactoryCache to use LinkedHashMap instead of ConcurrentHashMap - Update cache key handling to use String? instead of Optional<String> * Add tests for caching * Add logging * Indenting * Minor simplification * Fix tests
Loading
Please register or sign in to comment