fixed 'static_key_parse_error', 'parse_pem: error'

This commit is contained in:
Pavel Muhortov 2023-08-23 13:31:26 +03:00
parent 2c70d9c5bd
commit 604cc15cef

View File

@ -104,7 +104,8 @@ createuser() {
createcert() {
cd ${easyrsadir} || execerror ""
sed -i -e '$aset_var EASYRSA_REQ_CN '"${clientname}"'' ${easyrsavar}
${easyrsaexe} --passout=pass:"${clientpass}" --passin=pass:${easyrsacap} build-client-full "${clientname}"
# ${easyrsaexe} --passout=pass:"${clientpass}" --passin=pass:${easyrsacap} build-client-full "${clientname}"
${easyrsaexe} --passin=pass:"${easyrsacap}" build-client-full "${clientname}" nopass
sed -i '/EASYRSA_REQ_CN/d' ${easyrsavar}
}
@ -129,7 +130,7 @@ createovpn() {
echo -e '</cert>\n<key>'
cat "${easyrsadir}/pki/private/${clientname}.key"
echo -e '</key>\n<tls-auth>'
cat "${easyrsadir}/pki/ta.key"
cat "${easyrsadir}/pki/private/ta.key"
echo -e '</tls-auth>'
} >> "${ovpncfgdir}/${clientname}.ovpn"
}