From 803765de81923083dae5e15cff62d13fafa249b0 Mon Sep 17 00:00:00 2001 From: cha Date: Wed, 14 May 2025 17:53:40 +0900 Subject: [PATCH] =?UTF-8?q?=EC=9D=B4=EB=AF=B8=EC=A7=80=20=EB=A1=9C?= =?UTF-8?q?=EA=B7=B8=20=EC=B0=8D=EA=B8=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../qcast/biz/estimate/EstimateService.java | 21 +++++-------------- 1 file changed, 5 insertions(+), 16 deletions(-) diff --git a/src/main/java/com/interplug/qcast/biz/estimate/EstimateService.java b/src/main/java/com/interplug/qcast/biz/estimate/EstimateService.java index 7cc3a44f..bad195d4 100644 --- a/src/main/java/com/interplug/qcast/biz/estimate/EstimateService.java +++ b/src/main/java/com/interplug/qcast/biz/estimate/EstimateService.java @@ -73,10 +73,6 @@ import jakarta.servlet.http.HttpServletResponse; import lombok.RequiredArgsConstructor; import lombok.extern.slf4j.Slf4j; -import javax.net.ssl.HttpsURLConnection; -import javax.net.ssl.SSLContext; -import javax.net.ssl.TrustManager; -import javax.net.ssl.X509TrustManager; @Slf4j @Service @@ -1501,18 +1497,6 @@ public class EstimateService { estimateResponse.setPwrGnrSim(pwrGnrSimResponse); - //SSL 무시하기 - TrustManager[] trustAllCerts = new TrustManager[] { new X509TrustManager() { - public X509Certificate[] getAcceptedIssuers() {return null;} - public void checkClientTrusted(X509Certificate[] certs, String authType) {} - public void checkServerTrusted(X509Certificate[] certs, String authType) {} - } }; - - SSLContext sc = SSLContext.getInstance("SSL"); - sc.init(null, trustAllCerts, new java.security.SecureRandom()); - HttpsURLConnection - .setDefaultSSLSocketFactory(sc.getSocketFactory()); - //end // 도면 이미지 셋팅 String baseDrawingImgName = estimateRequest.getObjectNo() + "_" + estimateRequest.getPlanNo(); @@ -1520,6 +1504,11 @@ public class EstimateService { URL url = new URL(drawingDirPath + File.separator + baseDrawingImgName + "_1.png"); URLConnection con = url.openConnection(); HttpURLConnection exitCode = (HttpURLConnection) con; + + System.err.println("exitCode: " + exitCode); + System.err.println("Exit code: " + exitCode.getResponseCode()); + + if (exitCode.getResponseCode() == 200) { InputStream imageInputStream = new URL(drawingDirPath + File.separator + baseDrawingImgName + "_1.png").openStream();