galspb
When you create a new certificate to the client using a script /usr/local/etc/openvpn/easy-rsa/todo.sh error occurs - entry 91: invalid expiry date. How can I solve this problem?
Using configuration from /usr/local/etc/openvpn/easy-rsa/openssl.cnf
DEBUG[load_index]: unique_subject = "yes"
entry 91: invalid expiry date
cp: keys/ekat-sklad5.crt: No such file or directory
adding: cfg/ (stored 0%)
adding: cfg/ta.key (deflated 39%)
adding: cfg/ca.crt (deflated 36%)
adding: cfg/ekat-sklad5.key (deflated 22%)
adding: cfg/ekat-sklad5.cfg (deflated 31%)
that is not created file ekat-sklad5.crt
maikcat
did you sourced vars file first?
Michael.
galspb
cat /usr/local/etc/openvpn/easy-rsa/todo.sh
#!/usr/local/bin/bash
host=$1
if [ -z $host ]; then
echo -n "short hostname? "
read host
fi
pushd /usr/local/etc/openvpn/easy-rsa
. ./vars
./build-key $host
mkdir -p /tmp/$host/cfg
cp keys/{$host.crt,$host.key,ca.crt} ../keys/ta.key /tmp/$host/cfg/
cat <<EOF > /tmp/$host/cfg/$host.cfg
client
dev tap
proto udp
remote xx.xx.xx.xx 1194
resolv-retry infinite
nobind
persist-key
persist-tun
mute-replay-warnings
ca cfg/ca.crt
cert cfg/$host.crt
key cfg/$host.key
ns-cert-type server
tls-auth cfg/ta.key 1
cipher BF-CBC
comp-lzo
verb 3
mute 20
EOF
cd /tmp/$host
zip -r ../$host.zip ./
popd