We are trying to create a node.js application which should interact with a server over HTTPS (>TLS v1.2). We are given some list of key, cert files to establish a connection with the server. Node HTTPS requires CA, cert, key files which are CA file, server certificate, and key files. When provided these we are getting the following error:

Error: unhandled critical extension.

After spending some time on the internet, we found that the CA cert has some custom extensions. Later when we did openssl verify -CAfile ca_file.pem server_cert.pem we could reproduce it:

error 34 at 0 depth lookup:unhandled critical extension

So, this seems something to do with OpenSSL. How do we make OpenSSL understand our custom extensions? Those custom extensions are critical as well, so that we cannot just ignore the error by setting -ignore_critical.


I got a ssl error in openvpn.

VERIFY ERROR: depth=1, error=unhandled critical extension: CN=xxxx
OpenSSL: error:xxx:SSL routines:tls_process_server_certificate:certificate verify failed

I understand it as the CA insists that some values are critical, and the are not present or wrong in the Certificate.

What fixed it for me with OpenVPN was turning the 'subjectKeyIdentifier' that was set to critical=True, to False in the CA.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.