mirror of
http://124.126.16.154:8888/singularity/hyperf-saml.git
synced 2026-01-15 07:15:05 +08:00
24 lines
909 B
Bash
Executable File
24 lines
909 B
Bash
Executable File
#!/bin/sh
|
|
# shellcheck disable=SC2039
|
|
|
|
echo -e '\033[44;34;5m=============================\033[0m'
|
|
mkdir -p "$(pwd)"/cert && cd "$(pwd)"/cert || exit
|
|
echo 'Credentials directory created'
|
|
echo -e '\033[44;34;5m=============================\033[0m'
|
|
echo ''
|
|
openssl req -new -x509 -nodes -sha256 -out saml.crt -keyout saml.pem && cd - || exit
|
|
echo ''
|
|
echo -e '\033[44;34;5m=============================\033[0m'
|
|
echo -e '\033[;31;1m🎉Congratulations!\033[0m'
|
|
echo 'Now you can found credentials in the following directory:'
|
|
echo -e "\033[;36;4m$(pwd)/cert/\033[0m"
|
|
echo ''
|
|
echo -e "Public key: \033[;35;4mcert/saml.crt\033[0m"
|
|
echo -e "Private key: \033[;35;4mcert/saml.pem\033[0m"
|
|
echo ''
|
|
echo -e '\033[34;1mNotice: If you cannot read saml.pem in IDE,\033[0m'
|
|
echo -e '\033[34;1myou can print it in commander directly with following command:\033[0m'
|
|
echo ''
|
|
echo -e '\033[5mcat ./cert/saml.pem\033[0m'
|
|
echo ''
|