From d59b15660cabd1c51d514e032dbccec2980f9038 Mon Sep 17 00:00:00 2001 From: ChaeAg Date: Sun, 17 Nov 2024 15:44:59 +0900 Subject: [PATCH] =?UTF-8?q?[TEST]=20=EC=95=A0=ED=94=8C=20=EB=A1=9C?= =?UTF-8?q?=EA=B7=B8=EC=9D=B8=20=ED=85=8C=EC=8A=A4=ED=8A=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../org/websoso/WSSServer/oauth2/service/AppleService.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/java/org/websoso/WSSServer/oauth2/service/AppleService.java b/src/main/java/org/websoso/WSSServer/oauth2/service/AppleService.java index 1b85323cc..5a9b61e94 100644 --- a/src/main/java/org/websoso/WSSServer/oauth2/service/AppleService.java +++ b/src/main/java/org/websoso/WSSServer/oauth2/service/AppleService.java @@ -23,8 +23,8 @@ import io.jsonwebtoken.JwtException; import io.jsonwebtoken.Jwts; import io.jsonwebtoken.UnsupportedJwtException; -import java.io.FileReader; import java.io.IOException; +import java.io.InputStreamReader; import java.math.BigInteger; import java.security.KeyFactory; import java.security.NoSuchAlgorithmException; @@ -220,7 +220,7 @@ private byte[] readPrivateKey(String keyPath) { Resource resource = new ClassPathResource(keyPath); System.out.println("Resource exists: " + resource.exists()); System.out.println("Resource file path: " + resource.getFilename()); - try (PemReader pemReader = new PemReader(new FileReader(resource.getFile()))) { + try (PemReader pemReader = new PemReader(new InputStreamReader(resource.getInputStream()))) { PemObject pemObject = pemReader.readPemObject(); return pemObject.getContent(); } catch (IOException e) {