Browse Source

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.
master
Thomas Preud'homme 1 year ago
parent
commit
bfa3d78fca
2 changed files with 3 additions and 2 deletions
  1. +1
    -0
      ssl_mgmt/openssl.cnf.in
  2. +2
    -2
      ssl_mgmt/ssl_mgmt

+ 1
- 0
ssl_mgmt/openssl.cnf.in View File

@@ -27,6 +27,7 @@ copy_extensions = copy
x509_extensions = v3_x509

[ policy_match ]
localityName = match
countryName = match
stateOrProvinceName = match
organizationName = match

+ 2
- 2
ssl_mgmt/ssl_mgmt View File

@@ -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
}


Loading…
Cancel
Save