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();