리눅스(Linux)/인증서

인증서 유효기간 확인

숙련된 조교 2024. 9. 29. 12:54
728x90
반응형

1. 브라우저 주소창에서 인증서 확인하기

 

 

 

2. openssl 명령어로 cert 파일 해독하기

* 명령어

$ openssl x509 -in [SSL 인증서 경로]/[cert 파일명] -noout -dates

 

* 예시)

$ openssl x509 -in /data/www_sample.crt -noout -dates

 

notBefore=May 2 09:00:00 2020 GMT

notAfter=May 1 09:00:00 2021 GMT

 

3. openssl 명령어로 원격에 설치되어 있는 인증서 만료일 확인

 

* 명령어

$ echo | openssl s_client -servername [서버/DNS] -connect [서버/DNS:포트] 2>/dev/null | openssl x509 -noout -dates

 

* 예시)

$ echo | openssl s_client -servername www.test.co.kr -connect www.test.co.kr:443  2>/dev/null | openssl x509 -noout -dates

 

notBefore=May 2 09:00:00 2020 GMT

notAfter=May 1 09:00:00 2021 GMT

728x90
반응형