【fix sonar】CASServiceUtil文件
This commit is contained in:
+3
-2
@@ -14,6 +14,8 @@ import javax.net.ssl.X509TrustManager;
|
|||||||
import java.io.BufferedReader;
|
import java.io.BufferedReader;
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.io.InputStreamReader;
|
import java.io.InputStreamReader;
|
||||||
|
import java.security.KeyManagementException;
|
||||||
|
import java.security.NoSuchAlgorithmException;
|
||||||
import java.security.cert.X509Certificate;
|
import java.security.cert.X509Certificate;
|
||||||
|
|
||||||
@Slf4j
|
@Slf4j
|
||||||
@@ -72,11 +74,10 @@ public class CASServiceUtil {
|
|||||||
/**
|
/**
|
||||||
* 创建模拟客户端(针对 https 客户端禁用 SSL 验证)
|
* 创建模拟客户端(针对 https 客户端禁用 SSL 验证)
|
||||||
*
|
*
|
||||||
* @param cookieStore 缓存的 Cookies 信息
|
|
||||||
* @return
|
* @return
|
||||||
* @throws Exception
|
* @throws Exception
|
||||||
*/
|
*/
|
||||||
private static CloseableHttpClient createHttpClientWithNoSsl() throws Exception {
|
private static CloseableHttpClient createHttpClientWithNoSsl() throws NoSuchAlgorithmException, KeyManagementException {
|
||||||
// Create a trust manager that does not validate certificate chains
|
// Create a trust manager that does not validate certificate chains
|
||||||
TrustManager[] trustAllCerts = new TrustManager[]{
|
TrustManager[] trustAllCerts = new TrustManager[]{
|
||||||
new X509TrustManager() {
|
new X509TrustManager() {
|
||||||
|
|||||||
Reference in New Issue
Block a user