intermediate CA certificate can be not trusted.

  • Version: 12.18.2
  • Platform: Linux
  • Subsystem:

What steps will reproduce the bug?

  1. Only add server intermediate CA certificate to trusted certs.
  2. Trying to Connect to this server over tls, but got below error:

Error: unable to get issuer certificate
at TLSSocket.onConnectSecure (_tls_wrap.js:1496:34)
at TLSSocket.emit (events.js:315:20)
at TLSSocket._finishInit (_tls_wrap.js:938:8)
at TLSWrap.ssl.onhandshakedone (_tls_wrap.js:696:12) {
code: 'UNABLE_TO_GET_ISSUER_CERT'
}

if add root CA certificate to trusted certs, then can connect to server.

How often does it reproduce? Is there a required condition?

What is the expected behavior?

Able to connect server over tls with server intermediate CA certificate trusted.
Or provider any option to support openssl partial_chain verify:
https://www.openssl.org/docs/manmaster/man1/openssl-verification-options.html

What do you see instead?

Additional information