Hello,
I have the following two certificate chains: server <- intermediateCA <- rootCA and client <- intermediateCA <- rootCA.
Currently there are two ways the client is authenticated by the server: both the intermediateCA and rootCA certificates are configured as CAs on the server or if only intermediateCA is configured.
I am using a custom verify callback set by mbedtls_ssl_conf_verify().
I would like to achieve two separate cases:
1) Make the MbedTLS' built-in pre-verify be successful, even when only the rootCA certificate is set as the server's CA.
2) Always obtain the whole certificate chain up to the root in the verify callback.
For case 1) this is how our OpenSSL TLS implementation works, it is discussed here https://github.com/openssl/openssl/issues/7871. From my understanding the server should be able to build the certificate chain by inquiring the client about its certificate's issuer, etc.
For case 2), whenever both rootCA and intermediateCA are configured on the server, only the chain client <- intermediateCA is received by the callback. I would like to be able to receive the chain client <- intermediateCA <- rootCA.
Are these two cases achievable with mbedTLS? For reference I am using mbedTLS 3.5.2. For my server I would like to utilize both cases 1) and 2) and for the client only the case 1).
Kind regards,
Roman Janota
mbed-tls@lists.trustedfirmware.org