Home:ALL Converter>Configuring Jetty HTTP/2 Client to use my HostnameVerifier implementation

Configuring Jetty HTTP/2 Client to use my HostnameVerifier implementation

Ask Time:2018-11-27T20:32:26         Author:nikhilahuja

Json Formatter

I am using Jetty HTTP2 Client 9.4.12 to support HTTP/2 server connection. It's working fine but on top of verifying the certificate, I also want to verify the Hostname using my javax.net.ssl.HostnameVerifier implementation. According to the doc https://www.eclipse.org/jetty/javadoc/9.4.12.v20180830/org/eclipse/jetty/util/ssl/SslContextFactory.html I can use setEndpointIdentificationAlgorithm("HTTPS") to enable hostname verification but how do I configure Jetty to use my implementation?

Thanks.

Author:nikhilahuja,eproduced under the CC 4.0 BY-SA copyright license with a link to the original source and this disclaimer.
Link to original article:https://stackoverflow.com/questions/53499789/configuring-jetty-http-2-client-to-use-my-hostnameverifier-implementation
Joakim Erdfelt :

Jetty's HttpClient does not support javax.net.ssl.HostnameVerifier.\n\nAn enhancement request exists for this ...\n\nhttps://github.com/eclipse/jetty.project/issues/3154\n\nFeel free to comment on the open enhancement requesting it, and providing an example of how you would use it.",
2018-11-27T15:39:01
yy