mirror of
https://github.com/signalwire/freeswitch.git
synced 2025-04-14 00:00:44 +00:00
FS-5695 --resolve
This commit is contained in:
parent
1220189096
commit
d645d01e55
@ -7,7 +7,7 @@ export KEY_SIZE=${KEY_SIZE}
|
|||||||
|
|
||||||
TMPFILE="/tmp/fs-ca-$$-$(date +%Y%m%d%H%M%S)"
|
TMPFILE="/tmp/fs-ca-$$-$(date +%Y%m%d%H%M%S)"
|
||||||
|
|
||||||
COMMON_NAME="FreesSWITCH CA"
|
COMMON_NAME="FreeSWITCH CA"
|
||||||
ALT_NAME="DNS:test.freeswitch.org"
|
ALT_NAME="DNS:test.freeswitch.org"
|
||||||
ORG_NAME="FreeSWITCH"
|
ORG_NAME="FreeSWITCH"
|
||||||
OUTFILE="agent.pem"
|
OUTFILE="agent.pem"
|
||||||
@ -47,6 +47,7 @@ setup_ca() {
|
|||||||
default_bits = \$ENV::KEY_SIZE
|
default_bits = \$ENV::KEY_SIZE
|
||||||
prompt = no
|
prompt = no
|
||||||
distinguished_name = req_dn
|
distinguished_name = req_dn
|
||||||
|
x509_extensions = v3_ca
|
||||||
|
|
||||||
[ req_dn ]
|
[ req_dn ]
|
||||||
commonName = %CN%
|
commonName = %CN%
|
||||||
@ -69,6 +70,12 @@ setup_ca() {
|
|||||||
subjectAltName=%ALTNAME%
|
subjectAltName=%ALTNAME%
|
||||||
nsCertType=client
|
nsCertType=client
|
||||||
extendedKeyUsage=clientAuth
|
extendedKeyUsage=clientAuth
|
||||||
|
|
||||||
|
[ v3_ca ]
|
||||||
|
subjectKeyIdentifier=hash
|
||||||
|
authorityKeyIdentifier=keyid:always,issuer
|
||||||
|
basicConstraints=CA:TRUE
|
||||||
|
|
||||||
EOF
|
EOF
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@ -84,6 +91,7 @@ setup_ca() {
|
|||||||
-new -x509 -keyout "${CONFDIR}/CA/cakey.pem" \
|
-new -x509 -keyout "${CONFDIR}/CA/cakey.pem" \
|
||||||
-config "${TMPFILE}.cfg" -nodes -days ${DAYS} -sha1 >/dev/null || exit 1
|
-config "${TMPFILE}.cfg" -nodes -days ${DAYS} -sha1 >/dev/null || exit 1
|
||||||
cat "${CONFDIR}/CA/cacert.pem" > "${CONFDIR}/cafile.pem"
|
cat "${CONFDIR}/CA/cacert.pem" > "${CONFDIR}/cafile.pem"
|
||||||
|
cp $TMPFILE.cfg /tmp/ssl.cfg
|
||||||
rm "${TMPFILE}.cfg"
|
rm "${TMPFILE}.cfg"
|
||||||
|
|
||||||
echo "DONE"
|
echo "DONE"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user