Skip to content

Instantly share code, notes, and snippets.

@sudhirpandey
Created October 16, 2018 08:21
Show Gist options
  • Save sudhirpandey/eaa596eccef59010a482ca53d7adb6ab to your computer and use it in GitHub Desktop.
Save sudhirpandey/eaa596eccef59010a482ca53d7adb6ab to your computer and use it in GitHub Desktop.

Revisions

  1. sudhirpandey created this gist Oct 16, 2018.
    8 changes: 8 additions & 0 deletions openssl cmds
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,8 @@
    #download certificate
    echo -n | openssl s_client -connect server:port | sed -ne '/-BEGIN CERTIFICATE-/,/-END CERTIFICATE-/p' > /tmp/server.cert

    #verify cert against CA
    openssl verify -verbose -CAfile /etc/pki/ca-trust/source/anchors/<ca>.crt /tmp/server.cert

    #inspect cert to see issuer
    openssl x509 -in /tmp/server.crt -text -noout