()
| 196 | } |
| 197 | |
| 198 | private static SSLContext getSSLContext() { |
| 199 | try { |
| 200 | SSLContext context = SSLContext.getInstance("TLS"); |
| 201 | context.init(null, new TrustManager[]{trustAllCertificates()}, new SecureRandom()); |
| 202 | return context; |
| 203 | } catch (Throwable e) { |
| 204 | return null; |
| 205 | } |
| 206 | } |
| 207 | |
| 208 | @SuppressLint({"TrustAllX509TrustManager", "CustomX509TrustManager"}) |
| 209 | private static X509TrustManager trustAllCertificates() { |
no test coverage detected