easy-rsa
easy-rsa copied to clipboard
Embed/Inline configs and certificates together
It would be nice if the tool could embed the config and the certificates as a single file so that it would be easier to distribute the config to clients.
Right now clients are using different platforms so distributing as separate files is not a good option.
I am using a script like this and works fine for me but it would be nicer to have a better integrated solution:
#!/bin/bash
set -e
cd /etc/openvpn/easy-rsa/
cp config.template /tmp/$1.ovpn
echo "<ca>" >> /tmp/$1.ovpn
cat keys/ca.crt | grep -A 100 "BEGIN CERTIFICATE" | grep -B 100 "END CERTIFICATE" >> /tmp/$1.ovpn
echo "</ca>" >> /tmp/$1.ovpn
echo "<cert>" >> /tmp/$1.ovpn
cat keys/$1.crt | grep -A 100 "BEGIN CERTIFICATE" | grep -B 100 "END CERTIFICATE" >> /tmp/$1.ovpn
echo "</cert>" >> /tmp/$1.ovpn
echo "<key>" >> /tmp/$1.ovpn
cat keys/$1.key | grep -A 100 "BEGIN PRIVATE KEY" | grep -B 100 "END PRIVATE KEY" >> /tmp/$1.ovpn
echo "</key>" >> /tmp/$1.ovpn
There’s another project, ssl-admin, that can do this.
On Feb 21, 2017, at 10:56:01, Bogdan Rădulescu [email protected] wrote:
It would be nice if the tool could embed the config and the certificates as a single file so that it would be easier to distribute the config to clients.
Right now clients are using different platforms so distributing as separate files is not a good option.
I am using a script like this and works fine for me but it would be nicer to have a better integrated solution:
#!/bin/bash set -e
cd /etc/openvpn/easy-rsa/ cp config.template /tmp/$1.ovpn echo "
" >> /tmp/$1.ovpn cat keys/ca.crt | grep -A 100 "BEGIN CERTIFICATE" | grep -B 100 "END CERTIFICATE" >> /tmp/$1.ovpn echo " " >> /tmp/$1.ovpn echo "" >> /tmp/$1.ovpn cat keys/$1.crt | grep -A 100 "BEGIN CERTIFICATE" | grep -B 100 "END CERTIFICATE" >> /tmp/$1.ovpn echo " " >> /tmp/$1.ovpn echo "" >> /tmp/$1.ovpn cat keys/$1.key | grep -A 100 "BEGIN PRIVATE KEY" | grep -B 100 "END PRIVATE KEY" >> /tmp/$1.ovpn echo " " >> /tmp/$1.ovpn — You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/OpenVPN/easy-rsa/issues/122, or mute the thread https://github.com/notifications/unsubscribe-auth/ABt4Pyb-5ZaRHvP0Fxkkyz2lf0VsLFCzks5rexchgaJpZM4MHlG3.
Also, EasyRSA has an inline function now.
Also, Easy-TLS has enhanced inlining to cover all TLS keys. Check it out !
It would be nice if the tool could embed the config and the certificates as a single file
@bogdanr Above, you use EasyRSA version 2.
You could have submitted your code as a PR.
No feedback in over half a decade.