Fix ssl_mgmt after openssl -text output change
The output of openssl x509 -text changed from lines like: O=foo/OU=bar to lines like: O = foo, OU = bar This commit adapts the code to that change. TODO: A machine readable output ought to be used instead.
Esse commit está contido em:
pai
6b1e766cf0
commit
bfa3d78fca
|
@ -27,6 +27,7 @@ copy_extensions = copy
|
|||
x509_extensions = v3_x509
|
||||
|
||||
[ policy_match ]
|
||||
localityName = match
|
||||
countryName = match
|
||||
stateOrProvinceName = match
|
||||
organizationName = match
|
||||
|
|
|
@ -178,10 +178,10 @@ get_field_from_line ()
|
|||
|
||||
line="$1"
|
||||
field="$2"
|
||||
result="${line#*$field=}"
|
||||
result="$(echo ${line} | sed -r "s/.*${field} *= *//")"
|
||||
if [ "$result" != "$line" ]
|
||||
then
|
||||
echo "${result%%/*}"
|
||||
echo "${result%%,*}"
|
||||
fi
|
||||
}
|
||||
|
||||
|
|
Carregando…
Referência em uma nova issue