HttpClient httpclient = HttpClients.custom().setSSLContext(sslContext).setSSLHostnameVerifier(newNoopHostnameVerifier()).build(); HttpPost httpPost =newHttpPost("https://api"+hunterDomain.substring(hunterDomain.indexOf("."))+"/api/record_injection"); String json ="{\"request\": \""+reques...
server.start();try{ newApiClient().getClient().delete("/"); fail("SSL handshake should have failed"); }catch(Exception ex) { assertTrue(ex.getCause()instanceofSSLHandshakeException); } } 开发者ID:abiquo,项目名称:api-java-client,代码行数:17,代码来源:RestClientTest.java 示例4: prepare ...
You may check out the related API usage on the sidebar. Example 1Source File: SslUtil.java From Dream-Catcher with MIT License 6 votes /** * Creates a netty SslContext for use when connecting to upstream servers. Retrieves the list of trusted root CAs * from the trustSource. When ...
apiClient = clientBuilder.build(); return (apiClient); } 代码示例来源:origin: org.gitlab4j/gitlab4j-api protected Client createApiClient() { ClientBuilder clientBuilder = ClientBuilder.newBuilder().withConfig(clientConfig); if (ignoreCertificateErrors) { clientBuilder.sslContext(openSslContext)....
@Overridepublicvoidinit(TbContext ctx, TbNodeConfiguration configuration)throwsTbNodeException {try{//fromwww.java2s.comthis.config = TbNodeUtils.convert(configuration, TbRestApiCallNodeConfiguration.class);this.eventLoopGroup =newNioEventLoopGroup(); ...
import java.io.BufferedReader; import java.io.IOException; import java.nio.charset.Charset; ...
You may check out the related API usage on the sidebar. Example 1Source File: SslSimpleBuilder.java From jlogstash-input-plugin with Apache License 2.0 6 votes public SslHandler build(ByteBufAllocator bufferAllocator) throws SSLException { SslContextBuilder builder = SslContextBuilder.forServer(...
开发者ID:SixArmDonkey,项目名称:aerodrome-for-jet,代码行数:20,代码来源:APIHttpClient.java 示例10: init ▲点赞 2▼ importorg.apache.http.conn.ssl.SSLContextBuilder;//导入方法依赖的package包/类publicstaticvoidinit()throwsRuntimeException{try{ ...
You may check out the related API usage on the sidebar. Example 1Source File: LoadBalancedClusterMessageSender.java From txle with Apache License 2.0 6 votes private static SslContext buildSslContext(AlphaClusterConfig clusterConfig) throws SSLException { SslContextBuilder builder = GrpcSslContexts....
You may check out the related API usage on the sidebar. Example 1Source File: RPCBootstrap.java From WeCross with Apache License 2.0 6 votes /** * init SslContext for http server * * @param caCrt * @param nodeCrt * @param nodeKey * @return * @throws IOException */ public Ssl...