SSL 인증서 발급 프로그램 다운
전문 사이트에서 정식으로 인증서를 발급 받을 수도 있지만, 테스트 용으로 생성하기 위해 하단 프로그램을 설치함.
https://sourceforge.net/projects/openssl/files/latest/download?source=typ_redirect%EF%BB%BFVisit
개인키 발급
genrsa -des3 -out [키이름] 2048
ex) genrsa -des3 -out private.pem 2048
1-2. 공개키 발급
genrsa -out [키이름] 2048
ex) genrsa -out private.key 2048
암호화 하는 -des3 명령어가 없으므로 공개키로 생성
1-3. 개인키와 공개키 파일 생성
rsa -in [개인키] -pubout -out [공개키]
ex) rsa -in private.key -pubout -out public.key
req -new -key [키] -out [CSR이름.csr]
ex) req -new -key private.key -out private.csr
openssl.cnf 파일을 읽지 못하는 경우가 있음. 그럴때 사용
ex) req -new -config ./openssl.cnf -key private.key -out private.csr
https://ko.wikipedia.org/wiki/%EA%B3%B5%EA%B0%9C_%ED%82%A4_%EC%95%94%ED%98%B8_%ED%91%9C%EC%A4%80
1) rootCA 생성
genrsa [암호화 알고리즘] -out [키이름] 2048
ex) genrsa -aes256 -out rootCA.key 2048
2) rootCA 사설 CSR 생성
req -x509 -new -nodes -key rootCA.key -days 3650 -out rootCA.pem
openssl.cnf 파일을 읽지 못하는 경우가 있음. 그럴때 사용
req -x509 -new -config ./openssl.cnf -nodes -key rootCA.key -days 3650 -out rootCA.pem
3) CRT 생성
x509 -req -in private.csr -CA rootCA.pem -CAkey rootCA.key -CAcreateserial -out private.crt -days 3650
pkcs12 -export -in private.crt -inkey private.key -out .keystore -name tomcat
<Connector port="443" protocol="org.apache.coyote.http11.Http11NioProtocol" maxThreads="150" SSLEnabled="true">
<SSLHostConfig>
<Certificate certificateKeystoreFile="C:/OpenSSL/bin/.keystore" certificateKeystorePassword="password" type="RSA" />
</SSLHostConfig>
</Connector>
