Skip to content

Commit

Permalink
fix(build-key)
Browse files Browse the repository at this point in the history
  • Loading branch information
redgeoff committed Jul 22, 2017
1 parent 24c60d7 commit fcca6ab
Show file tree
Hide file tree
Showing 3 changed files with 37 additions and 2 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ The following should be repeated for each new client/user for whom you wish to g

You will then find a file like the following that you should provide to the individual who will be connecting to your VPN.

~client-configs/files/client-name.ovpn
~/client-configs/files/client-name.ovpn


# Revoke client certificate
Expand Down
35 changes: 35 additions & 0 deletions build-key.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
#!/usr/bin/expect

# Usage: build-key.sh name

# The following command doesn't work so we need to use expect
# yes "" | ./build-key ${name}

set name [lindex $argv 0];

spawn ./build-key $name
expect "Country Name"
send "\n"
expect "State or Province Name"
send "\n"
expect "Locality Name"
send "\n"
expect "Organization Name"
send "\n"
expect "Organizational Unit Name"
send "\n"
expect "Common Name"
send "\n"
expect "Name"
send "\n"
expect "Email Address"
send "\n"
expect "A challenge password"
send "\n"
expect "An optional company name"
send "\n"
expect "Sign the certificate"
send "y\n"
expect "1 out of 1 certificate"
send "y\n"
expect "$ "
2 changes: 1 addition & 1 deletion generate-client-certificate.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,4 @@ fi

cd ~/openvpn-ca
source vars
yes "" | ./build-key $name
/vagrant/build-key.sh $name

0 comments on commit fcca6ab

Please sign in to comment.