Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
devops-tools
ssl-certificate-utils
Commits
3f502e53
Commit
3f502e53
authored
Aug 24, 2022
by
Xueshan Feng
Browse files
Test to make sure host is fqdn.
parent
4c637b8a
Changes
1
Hide whitespace changes
Inline
Side-by-side
check-cert.sh
View file @
3f502e53
...
...
@@ -2,5 +2,5 @@
fqdn
=
$1
port
=
${
2
:-
443
}
[
-x
$fqdn
]
&&
echo
"FQDN of the site is required."
&&
exit
1
!
host
$fqdn
>
/dev/null
&&
echo
"
$fqdn
is not a vaild host."
&&
exit
1
#
! host $fqdn > /dev/null && echo "$fqdn is not a vaild host." && exit 1
echo
""
| openssl s_client
-servername
$fqdn
-connect
$fqdn
:
$port
2>/dev/null | openssl x509
-text
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment