When checking various things such as certificates with curl, you can simply use the following command.
$ curl --insecure -v https://www.google.com
You can simply check the certificate status and check the expiration with the openssl command.
The openssl's s_client option has many features. -connect Dumps certificate status with a simple function.
$ openssl s_client -connect localhost: 443
Let's check the certificate of google.com by openssl as below.
$ echo | openssl s_client -connect www.google.com:443 2> / dev / null | openssl x509 -noout -dates
notBefore = Nov 29 09:47:51 2017 GMT
notAfter = Feb 21 09:37:00 2018 GMT
$ echo | openssl s_client -connect www.google.com:443 2> / dev / null | openssl x509 -noout -enddate
notAfter = Feb 21 09:37:00 2018 GMT
You can see the status of the certificate simply by using the command below:
$ openssl x509 -in ./your.crt -noout -text | more
$ openssl x509 -in ./your.crt -noout -dates
If you are using the s_client option, you can dump or extract certificates as shown below:
$ openssl s_client -connect www.google.com:443> cert
depth = 2 C = US, O = GeoTrust Inc., CN = GeoTrust Global
verify error: num = 20: unable to get local issuer certificate
verify return: 0
Typing quit in the above state will save it to the cert file.
Save the certificate as PEM with the following command
$ openssl x509 -inform PEM -in cert -text -out cert.crt
The stored PEM type certificate can be checked as below:
$ openssl x509 -in cert.crt -noout -text
I like to take notes on travel, and I am putting together various IT tips that I often forget during work.
피드 구독하기:
댓글 (Atom)
Stream Your PC Games to a Samsung TV — Sunshine + Moonlight Setup Guide (Free GeForce Now Alternative)
Stream Your PC Games to a Samsung TV — Sunshine + Moonlight Cloud gaming like GeForce Now costs a monthly subscription. But what if you u...
-
마우이 북쪽에 카팔루아 비치라고 유명한 스노우 쿨링 장소가 있습니다. 주차장은 카팔루아 비치를 따라 트레일 코스가 있는데 비치 이용자 및 트레일러를 위한 무료 주차장이 있습니다. 아침 9시 이전에 가면 주차장이 널널 합니다. 주차장은 점심 시간대...
-
샌프란시스코 여행때 길로이 아울렛을 한국 분들은 참 많이 들리시죠. 미국 브랜드 옷을 싸게 살수 있는것 같습니다. 그러고 보면 이런 현상이 벌어지는 이유가 한국 백화점에서 미국 브랜드 옷을 2배나 가까이 비싸게 팔고 있다는 점입니다. 심한경우 3배나...
-
빅아일랜드 코나 지역에서 힐튼 와이콜리아 빌리지 호텔에 묵었지만 호텔에 딸려있는 레스토랑은 줄도 길고 너무 비싸고 맛도 없다는것을 금방 알게 됩니다. 특히 팁 세금 까지 합하면 아이들과 도니 &토니스 피자에서 피자 한판 먹는데 7만원이 ...
댓글 없음:
댓글 쓰기