java.security.cert.CertificateException: No subject alternative names matching IP address 192.168.100.41 found
클라이언트가 서버로 SSL 요청시 위와 같은 에러가 발생했다.
사설인증서를 잘못 만들어서 오류 발생 Case로 인증서 생성시 alternative names 누락해서 발생하였다.
인증서 만들 때 subjectAltName에 대상 domain과 IP를 포함해야 한다.
클라이언트가 서버로부터 받은 SSL인증서가 유효하지 않다고 판단해서 발생하는 에러로
클라이언트 측 소스코드에서 SSL 유효성 체크하지 않고 요청하도록 변경하여 조치할 수도 있다.
단순히 jvm 옵션으로 처리하는 부분은 없는 것으로 보인다.
설정 정보 참고 (아래)
[ req ]
distinguished_name = req_distinguished_name
extensions = v3_user
[ v3_user ]
# Extensions to add to a certificate request
basicConstraints = CA:FALSE
authorityKeyIdentifier = keyid,issuer
subjectKeyIdentifier = hash
keyUsage = nonRepudiation, digitalSignature, keyEncipherment
## SSL 용 확장키 필드
extendedKeyUsage = serverAuth,clientAuth
subjectAltName = @alt_names
[ alt_names ]
## Subject AltName의 DNSName field에 SSL Host 의 도메인 이름을 적어준다.
## 멀티 도메인일 경우 *.lesstif.com 처럼 쓸 수 있다.
DNS.1 = abc.com
IP.1 = 192.168.100.41
IP.2 = 127.0.0.1
[ req_distinguished_name ]
countryName = Country Name (2 letter code)
countryName_default = KR
countryName_min = 2
countryName_max = 2
# 회사명 입력
organizationName = Organization Name (eg, company)
organizationName_default = abc, Inc.
# SSL 서비스할 domain 명 입력
commonName = Common Name (eg, your name or your server's hostname)
commonName_default = 192.168.100.41
commonName_max = 64
'IT Business' 카테고리의 다른 글
Resource specification not allowed here for source level below 1.7 (0) | 2022.11.03 |
---|---|
tomcat ssl연결 keystorepass 암호화 (0) | 2021.08.01 |
jvm에 서버 인증서 등록하지 않은 경우 (0) | 2021.07.26 |
WAS 기동 시 readClass Error (0) | 2021.07.26 |
SHA256-Base64 변환기 (0) | 2021.07.24 |