티스토리 뷰

Linux

curl (인증서 검증)

CHOMAN 2019. 6. 28. 09:32

명령어 (예시)

curl -v https://google.com
curl -L -v --cacert /etc/pki/tls/certs/ca-bundle.crt https://www.google.com:443

인증서 정보 출력

* About to connect() to google.com port 443 (#0)
*   Trying 
* Connected to google.com (178) port 443 (#0)
* Initializing NSS with certpath: sql:/etc/pki/nssdb
*   CAfile: /etc/pki/tls/certs/ca-bundle.crt
  CApath: none
* SSL connection using TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256
* Server certificate:
*       subject: CN=*.google.com,O=Google LLC,L=Mountain View,ST=California,C=US
*       start date:  6월 11 12:41:56 2019 GMT
*       expire date:  9월 03 12:21:00 2019 GMT
*       common name: *.google.com
*       issuer: CN=Google Internet Authority G3,O=Google Trust Services,C=U

--tls 옵션 사용시

curl --tlsv1
SSL connection using TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256

curl --tlsv1.0
SSL connection using TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA

curl --tlsv1.1
SSL connection using TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA

curl --tlsv1.2
SSL connection using TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256

ca-bundle.crt (업데이트) : 언간해서는 업데이트 할 이유는 없을듯 함

curl https://curl.haxx.se/ca/cacert.pem -o /etc/pki/tls/certs/ca-bundle.crt

openssl

openssl s_client -connect kensei.co.kr:443 |tee certlog

centos5 의 경우는 작업이 필요할수도 있겠음

yum update curl
yum install ca-certificates
curl https://curl.haxx.se/ca/cacert.pem -o /etc/pki/tls/certs/ca-bundle.crt

Centos5 의 경우 인증서만 업데이트 할려는 경우 decode 관련 에러가 발생 쉽게 진행되지는 않음
curl 및 ca-certificates 업데이트시 어떤 영향을 줄지는 좀 더 파악이 필요함

7.18.0 까지 curl 은 기본적으로 CA 번들 제공하였지만 최근에는 CURL 아카이브에 CA 인증서가 포함되지 않음

'Linux' 카테고리의 다른 글

php error log  (0) 2019.07.03
php-fpm log 남기기  (0) 2019.07.03
mysql 5.0 -> mysql 5.1 새로 생긴 변수들  (0) 2019.06.25
centos7 hostname  (0) 2019.06.20
CentOS7 - rsync 3.1.2  (0) 2019.06.17
댓글
공지사항
최근에 올라온 글
최근에 달린 댓글
Total
Today
Yesterday
링크
«   2025/02   »
1
2 3 4 5 6 7 8
9 10 11 12 13 14 15
16 17 18 19 20 21 22
23 24 25 26 27 28
글 보관함