Skip to content

Instantly share code, notes, and snippets.

@craigiansmith
Created January 31, 2017 01:54
Show Gist options
  • Select an option

  • Save craigiansmith/be08f8ac0e8d1e584b3a9d3ac1abcfe2 to your computer and use it in GitHub Desktop.

Select an option

Save craigiansmith/be08f8ac0e8d1e584b3a9d3ac1abcfe2 to your computer and use it in GitHub Desktop.

Revisions

  1. @dashaxiong dashaxiong created this gist Jan 31, 2017.
    28 changes: 28 additions & 0 deletions display-certificates-output.sh
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,28 @@
    #! /bin/sh

    . ./tests/integration/_common.sh

    cb() {
    certbot_test \
    --authenticator standalone \
    --installer null \
    "$@"
    }

    check_certificates_output() {
    certbot $store_flags certificates
    certbot $store_flags certificates --json
    }

    cb -d le.wtf -d le1.wtf
    cb -d le2.wtf
    check_certificates_output

    # Mangle a cert to show a failure
    sed -i -e 's/a/7/' -e 's/b/2/' $root/conf/live/le.wtf/fullchain.pem
    check_certificates_output

    # Delete renewal conf files to show certs missing
    rm $root/conf/renewal/le.wtf.conf
    rm $root/conf/renewal/le2.wtf.conf
    check_certificates_output