Skip to content

Instantly share code, notes, and snippets.

@userlerueda
Last active August 25, 2020 19:20
Show Gist options
  • Select an option

  • Save userlerueda/a8ec7595132ac7b22cdd1eba84b59f76 to your computer and use it in GitHub Desktop.

Select an option

Save userlerueda/a8ec7595132ac7b22cdd1eba84b59f76 to your computer and use it in GitHub Desktop.

Revisions

  1. userlerueda revised this gist May 4, 2020. 1 changed file with 4 additions and 0 deletions.
    4 changes: 4 additions & 0 deletions fix_catalina_cert.sh
    Original file line number Diff line number Diff line change
    @@ -1,4 +1,8 @@
    #!/usr/bin/env bash

    ## To use this script, copy it to your ~/bin directory and then run it by executing:
    ## fix_catalina_cert.sh 10.201.146.172 443
    ## You will be asked to authenticate when storing in keychain

    echo | openssl s_client -showcerts -servername ${1} -connect ${1}:${2} 2>/dev/null | openssl x509 -inform pem -out /tmp/untrusted.cer
    security add-trusted-cert -k ~/Library/Keychains/login.keychain-db /tmp/untrusted.cer
  2. userlerueda created this gist May 4, 2020.
    4 changes: 4 additions & 0 deletions fix_catalina_cert.sh
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,4 @@
    #!/usr/bin/env bash

    echo | openssl s_client -showcerts -servername ${1} -connect ${1}:${2} 2>/dev/null | openssl x509 -inform pem -out /tmp/untrusted.cer
    security add-trusted-cert -k ~/Library/Keychains/login.keychain-db /tmp/untrusted.cer