factorize/ca
This commit is contained in:
parent
f54b515115
commit
095b343fde
2 changed files with 15 additions and 22 deletions
|
@ -230,7 +230,6 @@ Handle project workflows in a unified way:
|
|||
* available
|
||||
* effective
|
||||
* factorize
|
||||
* ca
|
||||
* dns
|
||||
* locales
|
||||
* handle errors
|
||||
|
|
|
@ -200,33 +200,27 @@ _spcd_txt_pick() {
|
|||
# ╰───────────╯
|
||||
|
||||
spcd_ca() {
|
||||
local index name value
|
||||
local grep="\(After\|Before\|Issuer\|Signature Algorithm\|Subject:\)"
|
||||
case "${1}" in
|
||||
"list")
|
||||
while true; do
|
||||
index=$((index + 1))
|
||||
name="SPCD_CA_${index}"
|
||||
eval "value=\"\${${name}}\""
|
||||
[ -n "${value}" ] || break
|
||||
echo "${name} ="
|
||||
echo "${value}" |
|
||||
openssl x509 -noout -text |
|
||||
grep "${grep}"
|
||||
done
|
||||
;;
|
||||
"write")
|
||||
local index name value
|
||||
local root="${2}"
|
||||
while true; do
|
||||
index=$((index + 1))
|
||||
name="SPCD_CA_${index}"
|
||||
eval "value=\"\${${name}}\""
|
||||
[ -n "${value}" ] || break
|
||||
case "${1}" in
|
||||
"list")
|
||||
echo "${name} ="
|
||||
echo "${value}" |
|
||||
openssl x509 -noout -text |
|
||||
grep "${grep}"
|
||||
;;
|
||||
"write")
|
||||
spcd_os_write "${root}/${index}.crt" "${value}"
|
||||
done
|
||||
;;
|
||||
*) ;;
|
||||
esac
|
||||
done
|
||||
}
|
||||
|
||||
spcd_dns() {
|
||||
|
|
Loading…
Reference in a new issue