Created
          May 6, 2021 19:40 
        
      - 
      
- 
        Save ifnull/bca9621ef405d973fd85070ce81024e3 to your computer and use it in GitHub Desktop. 
Revisions
- 
        Daniel Smith created this gist May 6, 2021 .There are no files selected for viewingThis file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,5 @@ # Solution 1 echo | openssl s_client -showcerts -servername example.com -connect 127.0.0.1:443 2>/dev/null | openssl x509 -inform pem -noout -text # Solution 2 curl --insecure --resolve example.com:443:127.0.0.1 -vvI https://example.com 2>&1 | awk 'BEGIN { cert=0 } /^\* SSL connection/ { cert=1 } /^\*/ { if (cert) print }' 
 Daniel Smith
              created
            
            this gist
            
              Daniel Smith
              created
            
            this gist