# error :
javax.net.ssl.SSLException: Certificate doesn't match any of the subject alternative names
# 해결:
인증서 만들때 SAN 설정 해줘야함
SAN 설정 부분이
"subjectAltName=DNS:knowledge.smartconstruction.kr,IP:localhost" 이 부분(아래 명령어)
localhost에는 필요한 아이피 넣기.
# linux에서 만드는 명령어
openssl genrsa -des3 -out server.key 2048
openssl req -new -key server.key -out server.csr -subj "/C=KR/ST=Seoul/L=Songpa-gu/O=Saman/OU=IT Department/CN=knowledge.smartconstruction.kr" -addext "subjectAltName=DNS:knowledge.smartconstruction.kr,IP:localhost"
ls
cp server.key server.key.origin
openssl rsa -in server.key.origin -out server.key
openssl x509 -req -days 3650 -in server.csr -signkey server.key -out server.crt -extfile <(printf "subjectAltName=DNS:knowledge.smartconstruction.kr,IP:localhost")
ls
cp server.key /etc/httpd/conf
cp server.crt /etc/httpd/conf
넣은 key와 crt로 ssl.conf 파일을 열어서 key, crt 소스 부분에 넣어주고 사용.