diff options
author | Peter Palfrader <peter@palfrader.org> | 2018-09-14 13:15:57 +0200 |
---|---|---|
committer | Peter Palfrader <peter@palfrader.org> | 2018-09-14 13:15:57 +0200 |
commit | 6ede0c26b85b5c6bfe54624df5f0dcde7aa69cb3 (patch) | |
tree | 2b9105b16bea107bcc1a7e496299549b8fede668 /letsencrypt-helpers/make-tlsa | |
parent | aa1dad0cc66a0f6a1d1db90cdbc93b9834c4eeb0 (diff) |
make-tlsa: Fix CN parsing
Diffstat (limited to 'letsencrypt-helpers/make-tlsa')
-rwxr-xr-x | letsencrypt-helpers/make-tlsa | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/letsencrypt-helpers/make-tlsa b/letsencrypt-helpers/make-tlsa index 1da3001..b7a8da7 100755 --- a/letsencrypt-helpers/make-tlsa +++ b/letsencrypt-helpers/make-tlsa @@ -37,7 +37,7 @@ for crt in *-combined.crt; do ( openssl x509 -noout -text < "$crt" | awk '/X509v3 Subject Alternative Name/ {getline;gsub(/ /, "", $0); print}' | tr ',' '\n' | awk -F: '$1=="DNS" {print $2}'; - openssl x509 -noout -subject < "$crt"| sed -e 's/^subject.*CN=\([a-zA-Z0-9\.\-\*]*\).*$/\1/' + openssl x509 -noout -subject < "$crt"| sed -e 's/^subject.*CN[[:space:]]*=[[:space:]]*\([a-zA-Z0-9\.\-\*]*\).*$/\1/' ) | sort -u | while read cn; do for port in $ports; do #~/swede/swede create --output rfc --usage=3 --selector=1 --mtype=1 --certificate "$crt" --port "$port" "$cn" |