What's new

OpenVPN 2.4.5 cannot connect because of weak algorithm

  • SNBForums Code of Conduct

    SNBForums is a community for everyone, no matter what their level of experience.

    Please be tolerant and patient of others, especially newcomers. We are all here to share and learn!

    The rules are simple: Be patient, be nice, be helpful or be gone!

gjf

Senior Member
Hi all.

With release of OpenVPN client v.2.4.5 it becomes impossible to connect to router OpenVPN server because of weak signature algorithm.

However generating the keys was performed according to this and this instructions.

Here is a topic in GitHub discussing the issue and possible solution, but anyway - I don't know why client recognizes "a weak algorithm" and how to properly solve it.

Any ideas or suggestions?
 
Post the exact error message. Everything is configurable in OpenVPN, but we need to know what your client is actually complaining about.
 
Sun Mar 18 10:41:12 2018 OpenVPN 2.4.5 x86_64-w64-mingw32 [SSL (OpenSSL)] [LZO] [LZ4] [PKCS11] [AEAD] built on Mar 1 2018
Sun Mar 18 10:41:12 2018 Windows version 6.2 (Windows 8 or greater) 64bit
Sun Mar 18 10:41:12 2018 library versions: OpenSSL 1.1.0f 25 May 2017, LZO 2.10
Enter Management Password:
Sun Mar 18 10:41:14 2018 TCP/UDP: Preserving recently used remote address: [AF_INET]xxx.xxx.xxx.xxx:xxxx
Sun Mar 18 10:41:14 2018 UDP link local: (not bound)
Sun Mar 18 10:41:14 2018 UDP link remote: [AF_INET]xxx.xxx.xxx.xxx:xxxx
Sun Mar 18 10:41:14 2018 WARNING: this configuration may cache passwords in memory -- use the auth-nocache option to prevent this
Sun Mar 18 10:41:14 2018 VERIFY ERROR: depth=0, error=CA signature digest algorithm too weak: C=AQ, ST=NA, L=SilentHill, O=HSH, OU=DamageINC, CN=Base, name=HSH, emailAddress=mail@host.domain
Sun Mar 18 10:41:14 2018 OpenSSL: error:1416F086:SSL routines:tls_process_server_certificate:certificate verify failed
Sun Mar 18 10:41:14 2018 TLS_ERROR: BIO read tls_read_plaintext error
Sun Mar 18 10:41:14 2018 TLS Error: TLS object -> incoming plaintext read error
Sun Mar 18 10:41:14 2018 TLS Error: TLS handshake failed
Sun Mar 18 10:41:14 2018 SIGUSR1[soft,tls-error] received, process restarting
 
Insert the following line in the client's config.ovpn file:

Code:
tls-cipher "DEFAULT:@SECLEVEL=0"
The explanation is here http://ics-openvpn.blinkt.de/FAQ.html
I confirm that this solution is working for me.
Please consider this as a temporary solution only. The ultimate solution is to regenerate certificates.
 
Last edited:
Insert the following line in the client's config.ovpn file:

Code:
tls-cipher "DEFAULT:@SECLEVEL=0"
The explanation is here http://ics-openvpn.blinkt.de/FAQ.html
Please consider this as a temprary solution only. The ultimate solution is to regenerate certificates.
I already mentioned it as a solution.
Anyway I used a way of generation certificate mentioned in official Wiki.
That's why I need to know - possibly Wiki should be changed to correspond to the new situation.
Also I am not sure changing signature algorithm will be supported by current firmware.
Will wait for RMerlin comments.
 
I already mentioned it as a solution.
Anyway I used a way of generation certificate mentioned in official Wiki.
That's why I need to know - possibly Wiki should be changed to correspond to the new situation.
Also I am not sure changing signature algorithm will be supported by current firmware.
Will wait for RMerlin comments.

I am sure the current firmware will support this. The problem is that the default option of easy-rsa is md5. But you can use SHA256 also and this was available since long time ago. Personally I am still using the solution above, because regenerating certifcates is not an option for me now. My OpenVPN server is used also by my daughter and some other people, they all are abroad and sending new keys to them securely is a challenge.
 
I am sure the current firmware will support this. The problem is that the default option of easy-rsa is md5. But you can use SHA256 also and this was available since long time ago. Personally I am still using the solution above, because regenerating certifcates is not an option for me now. My OpenVPN server is used also by my daughter and some other people, they all are abroad and sending new keys to them securely is a challenge.
It's nice and no problem for me in regenerating.
Anyway I need a correct manual how to do it and I need to be sure it will work and is supported by firmware.
 
I am sure the current firmware will support this. The problem is that the default option of easy-rsa is md5.

Are you sure? I checked pkitool, and it uses sha256. My Easy-RSA generated certs also showed having a sha256 signature.

Code:
admin@Stargate88:/jffs/openvpn# openssl x509 -in vpn_crt_server1_crt -noout -text | grep Signature
    Signature Algorithm: sha256WithRSAEncryption
                Digital Signature, Key Encipherment
    Signature Algorithm: sha256WithRSAEncryption
 
Sun Mar 18 10:41:14 2018 VERIFY ERROR: depth=0, error=CA signature digest algorithm too weak: C=AQ, ST=NA, L=SilentHill, O=HSH, OU=DamageINC, CN=Base, name=HSH, emailAddress=mail@host.domain
Your certificate info is weird.
It doesn't seems generated by router.

VERIFY OK: depth=1, C=TW, ST=TW, L=Taipei, O=ASUS, CN=RT-AC86U, emailAddress=me@myhost.mydomain
 
Are you sure? I checked pkitool, and it uses sha256. My Easy-RSA generated certs also showed having a sha256 signature.

Code:
admin@Stargate88:/jffs/openvpn# openssl x509 -in vpn_crt_server1_crt -noout -text | grep Signature
    Signature Algorithm: sha256WithRSAEncryption
                Digital Signature, Key Encipherment
    Signature Algorithm: sha256WithRSAEncryption

It is written here: http://ics-openvpn.blinkt.de/FAQ.html
Unfortunately, older easy-rsa distributions included the config option "default_md md5". If you are using an old easy-rsa version, update to the latest version) or change md5 to sha256 and regenerate your certificates.
It depends on which openssl version has been used when the certificates were generated. For example my certificates were generated 5 years ago, so definitely I've used an old version of openssl. And they were even created on Windows PC not on the router itself.
 
It is written here: http://ics-openvpn.blinkt.de/FAQ.html It depends on which openssl version has been used when the certificates were generated. For example my certificates were generated 5 years ago, so definitely I've used an old version of openssl. And they were even created on Windows PC not on the router itself.

The easy-rsa version included in the firmware already uses sha256. I fixed it back in 2016:

Code:
commit 2e150ce55828638fb2fb474468e01c73fdfbd6cb
Author: Eric Sauvageau <rmerl@lostrealm.ca>
Date:   Fri Dec 23 12:22:55 2016 -0500

    openvpn: Use sha256 for key/certs generated by Easy-RSA (used by key/certs auto-generated by the firmware)

Not sure if Asus has the same fix upstream. People with older certs might have to generate new ones however.
 
Looks like the signature algorithm really should not be "default", but sha256.
After that change in config the problem solved with new generated keys.
 

Similar threads

Latest threads

Sign Up For SNBForums Daily Digest

Get an update of what's new every day delivered to your mailbox. Sign up here!
Top