Commit b30927be authored by Vincent Pelletier's avatar Vincent Pelletier

shell/caucase.sh: Add support for CRL PEM chunk iteration.

parent d30818ef
......@@ -229,6 +229,10 @@ _matchPrivateKeyBoundary () {
return 1
}
_matchCRLBoundary () {
test "$1" = '-----END X509 CRL-----'
}
_forEachPEM () {
# Iterate over components of a PEM file, piping each to <command>
# Usage: <type tester> <command> [<arg> ...] < pem
......@@ -263,6 +267,10 @@ alias forEachPrivateKey='_forEachPEM _matchPrivateKeyBoundary'
# Iterate over private key of a PEM file, piping each to <command>
# Usage: <command> [<arg> ...] < pem
alias foreachCRL='_forEachPEM _matchCRLBoundary'
# Iterate over CRLs of a PEM file, piping each to <command>
# Usage: <command> [<arg> ...] < pem
alias pem2fingerprint='openssl x509 -fingerprint -noout'
pemFingerprintIs () {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment