【fix sonar】CASServiceUtil文件

This commit is contained in:
梁琦涛
2023-03-10 15:02:08 +08:00
parent 28ef6b0c82
commit b57e3492b3
@@ -14,6 +14,8 @@ import javax.net.ssl.X509TrustManager;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.security.KeyManagementException;
import java.security.NoSuchAlgorithmException;
import java.security.cert.X509Certificate;
@Slf4j
@@ -72,11 +74,10 @@ public class CASServiceUtil {
/**
* 创建模拟客户端(针对 https 客户端禁用 SSL 验证)
*
* @param cookieStore 缓存的 Cookies 信息
* @return
* @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
TrustManager[] trustAllCerts = new TrustManager[]{
new X509TrustManager() {