Created
December 25, 2021 04:07
-
-
Save txbm/20f08056eb4a3c0faceaa44f68454e95 to your computer and use it in GitHub Desktop.
openssl scripts
This 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 characters
#!/usr/bin/env bash | |
_out_ext=${1#*.} | |
_out_ext=${_out_ext%%.*} | |
_out="${1%%.*}-chain.${_out_ext}.pfx" | |
_crtfile=combined.crt.pem | |
# _cmd="openssl pkcs12 -export -keypbe NONE -certpbe NONE -nomaciter -passout pass: -out ${_out} -inkey ${2} -in ${1} -certfile ${_crtfile}" | |
_cmd="openssl pkcs12 -export -passout pass: -out ${_out} -inkey ${2} -in ${1} -certfile ${_crtfile}" | |
>${_crtfile} cat ${@:3} | |
${_cmd} | |
rm "${_crtfile}" |
This 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 characters
#!/usr/bin/env bash | |
openssl crl2pkcs7 -nocrl -certfile "${1}" | openssl pkcs7 -print_certs -text -noout |
This 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 characters
#!/usr/bin/env bash | |
openssl pkcs12 \ | |
-in "${1}" \ | |
-info \ | |
-passin pass: |
This 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 characters
#!/usr/bin/env bash | |
openssl req -noout -text -in "${1}" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment