|
@@ -1,7 +1,5 @@
|
|
|
#!/bin/bash
|
|
#!/bin/bash
|
|
|
|
|
|
|
|
-set -o errexit
|
|
|
|
|
-set -o nounset
|
|
|
|
|
set -o pipefail
|
|
set -o pipefail
|
|
|
|
|
|
|
|
show_usage() {
|
|
show_usage() {
|
|
@@ -47,12 +45,15 @@ main() {
|
|
|
username=$(basename "${cert}" | sed 's/\.[^.]*$//')
|
|
username=$(basename "${cert}" | sed 's/\.[^.]*$//')
|
|
|
CN=$(echo "$openssl_output" | grep 'subject=' | sed 's/.*CN=//;s/,.*//')
|
|
CN=$(echo "$openssl_output" | grep 'subject=' | sed 's/.*CN=//;s/,.*//')
|
|
|
# Проверяем расширения из одного вывода openssl
|
|
# Проверяем расширения из одного вывода openssl
|
|
|
- if echo "$openssl_output" | grep -q "TLS Web Server Authentication\|serverAuth" ||
|
|
|
|
|
- echo "$openssl_output" | grep -q "SSL server : Yes"; then
|
|
|
|
|
|
|
+# if echo "$openssl_output" | grep -q "TLS Web Server Authentication\|serverAuth" ||
|
|
|
|
|
+# echo "$openssl_output" | grep -q "SSL server : Yes"; then
|
|
|
|
|
+ if echo "$openssl_output" | grep -q "TLS Web Server Authentication\|serverAuth"; then
|
|
|
|
|
+
|
|
|
echo "$username"
|
|
echo "$username"
|
|
|
[ "${username}" != "${CN}" ] && echo "$CN"
|
|
[ "${username}" != "${CN}" ] && echo "$CN"
|
|
|
fi
|
|
fi
|
|
|
done
|
|
done
|
|
|
|
|
+ exit 0
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
main "$@"
|
|
main "$@"
|