SSL인증서 CN 확인

Jmnote (토론 | 기여)님의 2016년 9월 8일 (목) 16:52 판

1 개요

인증서에서 CN 확인
인증서에서 Common Name 확인
openssl x509 -noout -subject -in 파일명
openssl x509 -noout -subject -in 파일명 | sed -n '/^subject/s/^.*CN=//p'

2 실행예시

[root@zetawiki ~]# cat /etc/pki/ca-trust/extracted/pem/email-ca-bundle.pem | head
-----BEGIN CERTIFICATE-----
MIIE2DCCBEGgAwIBAgIEN0rSQzANBgkqhkiG9w0BAQUFADCBwzELMAkGA1UEBhMC
VVMxFDASBgNVBAoTC0VudHJ1c3QubmV0MTswOQYDVQQLEzJ3d3cuZW50cnVzdC5u
... (생략)
W9c3rkIO3aQab3yIVMUWbuF6aC74Or8NpDyJO3inTmODBCEIZ43ygknQW/2xzQ+D
hNQ+IIX3Sj0rnP0qCglN6oH4EZw=
-----END CERTIFICATE-----
[root@zetawiki ~]# openssl x509 -noout -subject -in /etc/pki/ca-trust/extracted/pem/email-ca-bundle.pem
subject= /C=US/O=Entrust.net/OU=www.entrust.net/CPS incorp. by ref. (limits liab.)/OU=(c) 1999 Entrust.net Limited/CN=Entrust.net Secure Server Certification Authority
[root@zetawiki ~]# openssl x509 -noout -subject -in /etc/pki/ca-trust/extracted/pem/email-ca-bundle.pem | sed -n '/^subject/s/^.*CN=//p'
Entrust.net Secure Server Certification Authority

3 같이 보기

문서 댓글 ({{ doc_comments.length }})
{{ comment.name }} {{ comment.created | snstime }}