Httpclient请求https时忽略ssl证书

		SSLContext instance = null;
		try
		{
			instance = SSLContext.getInstance("TLSv1.2");
			instance.init(null, null, null);
		}
		catch (Exception e)
		{
			e.printStackTrace();
		}
		SSLContext.setDefault(instance);
		CloseableHttpClient tHttpClient = HttpClientBuilder.create().setSSLContext(instance).build();

在was环境验证过post请求能正确忽略ssl证书

你可能感兴趣的:(java,ssl,https,http)