SMALL
1. 원격 서버의 SSL 인증서 만료 날짜 확인
명령어:
echo | openssl s_client -connect jgshin.co.kr:443 2>/dev/null | openssl x509 -noout -dates
출력 예시:
notBefore=Apr 5 05:07:04 2023 GMT notAfter=May 6 05:07:03 2024 GMT
- notBefore: 인증서가 유효하기 시작한 날짜
- notAfter: 인증서가 만료되는 날짜
2. 로컬 인증서 파일의 만료 날짜 확인
명령어:
openssl x509 -noout -in ./File_Wildcard.jgshin.co.kr_crt.crt -dates
출력 예시:
notBefore=Apr 5 05:07:04 2023 GMT
notAfter=May 6 05:07:03 2024 GMT
notAfter=May 6 05:07:03 2024 GMT
3. curl을 이용한 인증서 정보 확인
명령어:
curl -vvI https://jgshin.co.kr
출력 예시:
* Server certificate:
* subject: CN=*.jgshin.co.kr
* start date: Apr 05 05:07:04 2023 GMT
* expire date: May 06 05:07:03 2024 GMT
* subject: CN=*.jgshin.co.kr
* start date: Apr 05 05:07:04 2023 GMT
* expire date: May 06 05:07:03 2024 GMT
- start date: 인증서가 유효한 시작 날짜
- expire date: 인증서가 만료되는 날짜
또한, NSS error -8179 (SEC_ERROR_UNKNOWN_ISSUER) 와 같은 메시지가 나오면, CA 인증서가 신뢰할 수 없는 인증서로 등록되어 있음을 의미합니다.
4. 인증서의 상세한 정보 확인 (옵션)
명령어:
echo | openssl s_client -connect jgshin.co.kr:443 2>/dev/null | openssl x509 -text -noout
이 명령어는 SSL 인증서의 전체 내용을 출력합니다.
결론
- 원격 서버의 인증서 만료일 확인: openssl s_client -connect jgshin.co.kr
- 로컬 인증서 파일의 만료일 확인: openssl x509 -in [파일] -dates
- curl로 인증서 정보를 가져오기: curl -vvI jgshin.co.kr
LIST
'IT > 리눅스' 카테고리의 다른 글
rsync를 이용한 원격지 데일리 백업 자동화 (0) | 2025.02.15 |
---|---|
리눅스 Samba 설치 및 설정 방법 (0) | 2025.02.15 |
Ubuntu iSCSI Target (tgt) 설정 방법 (0) | 2025.02.15 |
Ubuntu 버전 업그레이드 방법(트러블슈팅 포함) (0) | 2025.02.15 |
리눅스에서 대용량 파일 복사 방법 (0) | 2025.02.15 |