jq is useful to slice, filter, map and transform structured json data.
brew install jq
| #!/bin/bash | |
| set -eu -o pipefail | |
| export CERT_URL='https://dl.dod.cyber.mil/wp-content/uploads/pki-pke/zip/unclass-certificates_pkcs7_DoD.zip' | |
| # Download & Extract DoD root certificates | |
| cd ~/Downloads/ || exit 1 | |
| /usr/bin/curl -LOJ "${CERT_URL}" |
# Key considerations for algorithm "RSA" ≥ 2048-bit
openssl genrsa -out server.key 2048
# Key considerations for algorithm "ECDSA" ≥ secp384r1
# List ECDSA the supported curves (openssl ecparam -list_curves)| """ | |
| Outputs history with bash and git aliases expanded. | |
| """ | |
| from __future__ import print_function | |
| import re | |
| from subprocess import check_output | |
| BASH_ALIASES = {} | |
| for line in check_output('bash -i -c "alias -p"', shell=True).split('\n'): |