Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
* information: "Portions Copyright [year] [name of copyright owner]".
*
* Copyright 2015 ForgeRock AS.
* Portions Copyrighted 2026 3A Systems, LLC
*/

package org.forgerock.http.apache.async;
Expand Down Expand Up @@ -128,11 +129,15 @@ public HttpClient newHttpClient(final Options options) throws HttpApplicationExc
throw new HttpApplicationException("Can't create SSL Context", e);
}

HostnameVerifier verifier = new DefaultHostnameVerifier();
final HostnameVerifier verifier;
switch (options.get(OPTION_HOSTNAME_VERIFIER)) {
case ALLOW_ALL:
verifier = NoopHostnameVerifier.INSTANCE;
break;
default:
// STRICT (and any future policy) uses strict host name verification.
verifier = new DefaultHostnameVerifier();
break;
}

List<String> protocols = options.get(OPTION_SSL_ENABLED_PROTOCOLS);
Expand Down
Loading