gluetun: VPNSecure.me not working due to openssl upgrade and no longer secured DES encryption for keys
Hi,
So, I am unable to get this working via VPNSecure.me. I followed the wiki exactly. The error I’m getting is:
2023-03-12T05:12:10Z INFO [openvpn] Cannot load private key file [[INLINE]]
2023-03-12T05:12:10Z INFO [openvpn] SIGUSR1[soft,private-key-password-failure] received, process restarting
I did pass in my VPNSecure.me passthrough through OPENVPN_KEY_PASSPHRASE.
I did upload client.crt and openvpn_encrypted_key files on my server.
It looks like the passphrase can’t decrypt the encrypted key file.
I also should write that I’m running docker on a Synology box. The tun module is loaded.
Any other pointers? I will follow up.
About this issue
- Original URL
- State: closed
- Created a year ago
- Comments: 18 (4 by maintainers)
Just tried it and
qmcgaw/gluetun:pr-1471
now works with my ‘old ugly DES encrypted key’ 👍Here’s what I think happened: OpenSSLv3 deprecates
des
encryption, used by VPNSecure to encrypt the client private key. To uselatest
, just re-encrypt it usingaes
, as follows (using macOS and homebrew):Replace
pk.pem
with the old private key (e.g.openvpn_encrypted_key
). Move the result toopenvpn_encrypted_key
.Cracked it (openssl was decrypting to pkcs1 format so that was just a format mismatch). Can any of you try image
qmcgaw/gluetun:pr-1471
see how it behaves (with your old ugly DES encrypted key)? Thanks!First things first: thank you for your work!
Let’s sort this out: The PKCS #8 RFC states that the format does include the encryption algorithm:
In
openssl
, you can get it as follows:Will output something like this before conversion
And after:
That said: what version of OpenSSL were you trying to use? For the command to work, we need v1 – which means we’d have to ship it in the container.
Also, assuming v1.1 available: the command to re-encrypt seems to be idem-potent. So assuming we can feed it the password, we could also consider just re-running it every time.
If you push the “rabbit hole” code somewhere, I can take a stab at it.