📄 mkprovkeys.sh
字号:
#! /bin/sh# this script generates keys and certificates for using secured# provisioning:VOCAL_ETC=/usr/local/vocal/etcHOSTNAME=`hostname`# generate the keyopenssl genrsa 512/1024 > ${VOCAL_ETC}/key.pem# now, create the mkreq.txt which has the right bitscat > /tmp/mkreq.$$ <<EOF[ req ] prompt=nodistinguished_name = req_distinguished_nameattributes=xyzcrl_days=365[ req_distinguished_name ]CN=${HOSTNAME}[ xyz ]EOF# now, generate the certificate requestopenssl req -config /tmp/mkreq.$$ -new -key ${VOCAL_ETC}/key.pem \ > ${VOCAL_ETC}/csr.pem# self-sign the certificate requestopenssl req -days 365 -x509 -key ${VOCAL_ETC}/key.pem \ -in ${VOCAL_ETC}/csr.pem \ > ${VOCAL_ETC}/cert.pemrm /tmp/mkreq.$$
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -