Ai
1 Star 0 Fork 0

houmingzhang/mycommand

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
create_self_signed_cert.sh 559 Bytes
一键复制 编辑 原始数据 按行查看 历史
houmingzhang 提交于 2020-10-01 11:10 +08:00 . 命令
#!/usr/bin/env bash
set -e
# Locate shell script path
SCRIPT_DIR=$(dirname $0)
if [ ${SCRIPT_DIR} != '.' ]
then
cd ${SCRIPT_DIR}
fi
# Generate RSA private key
openssl genrsa -des3 -passout pass:x -out server.pass.key 2048
# Remove password in the private key
openssl rsa -passin pass:x -in server.pass.key -out server.key
rm -f server.pass.key
# Generate CSR sign request
SUBJ="$1"
openssl req -new -key server.key -out server.csr -subj "$SUBJ"
# Generate CRT signed cert
openssl x509 -req -days 365 -in server.csr -signkey server.key -out server.crt
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
Shell
1
https://gitee.com/dtrylzhm/mycommand.git
git@gitee.com:dtrylzhm/mycommand.git
dtrylzhm
mycommand
mycommand
master

搜索帮助