I have SSL client and server, and a testing PKI like this
root_ca -> server_singing_ca -> ssl server
|--> client_signing_ca -> ssl client
in the server, I put the server certificate and the server_signing_ca certificate into the same file, and load the file using
SSL_CTX_use_certificate_chain_file().
That works. The untrusted intermediate cert is automatically send to the client during the handshake.
My question is: I want to minimize the data exchange during the handshake. Is there way to let the client to hold a copy of the server_signing_ca's cert beforehand, so I can remove it from the sever side?
And I don't want to add the server_signing_ca's cert to the trusted store.
What is the API for the client to load the server_signing_ca's certificate? I looked into
SSL_CTX_add_extra_chain_cert().
But it seems it is for the client to load the client_signing_ca's certificate to form the cert chain.