Spring boot

Spring Boot - localhost에 도메인(hosts) 연결하여 SSL 적용

주피터0410 2024. 12. 27. 17:19

# keystore 화일 생성할 폴더 위치

 

# PKC12생성하기

명령어 : keytool -genkeypair -alias {alias명} -keyalg RSA -keysize 2048 -storetype PKCS12 -keystore {keystore화일명} -validity 3650

Enter keystore password:  {password}
Re-enter new password: {password}
What is your first and last name?
  [Unknown]: {이름과 성}
What is the name of your organizational unit?
  [Unknown]: {조직 단위}
What is the name of your organization?
  [Unknown]: {조직 이름}
What is the name of your City or Locality?
  [Unknown]:  {도시 또는 지역}
What is the name of your State or Province?
  [Unknown]:  {주 또는 도}
What is the two-letter country code for this unit?
  [Unknown]:  {국가 코드 (예: US, KR)}
Is CN=Unknown, OU=Unknown, O=Unknown, L=Korea, ST=Seoul, C=Kr correct?
  [no]: {yes}

 

# application.properties 설정

server.ssl.key-store=classpath:keystore.p12
server.ssl.key-store-password={password}
server.ssl.key-store-type=PKCS12
server.ssl.key-alias={alias명}