Skip to content

Commit e089cea

Browse files
authored
SECURITY.md: add instruction for disabling Conscrypt's default TrustManager (grpc#6962)
1 parent b8bcf98 commit e089cea

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

SECURITY.md

+6-1
Original file line numberDiff line numberDiff line change
@@ -232,9 +232,14 @@ import java.security.Security;
232232
...
233233

234234
// Somewhere in main()
235-
Security.insertProviderAt(Conscrypt.newProvider(), 1);
235+
Security.insertProviderAt(
236+
Conscrypt.newProviderBuilder().provideTrustManager(false).build(), 1);
236237
```
237238

239+
Note: according to [Conscrypt Implementation Notes](https://github.com/google/conscrypt/blob/2.4.0/IMPLEMENTATION_NOTES.md#hostname-verification),
240+
its default `HostnameVerifier` on OpenJDK always fails. This can be worked
241+
around by disabling its default `TrustManager` implementation as shown above.
242+
238243
### TLS with Jetty ALPN
239244

240245
**Please do not use Jetty ALPN**

0 commit comments

Comments
 (0)