• mplellison's avatar
    Allow Pistache::Listener to load and serve certificate chains (#772) · 21ca7a69
    mplellison authored
    * Update test certificate generation to use explicit cert config.
    
    Previously, no configuration was supplied on certificate generation, so
    the certificates being used for testing were completely generic. This
    limited the effectiveness and transparency of testing.
    
    * Fix listener.cc to load a cert chain and provide it for server auth.
    
    Added test with a server cert signed by an intermediate CA.
    
    Previously, listener.cc would only load the first cert in a cert pack
    and use this to authenticate itself to clients. This meant that if the
    server held a cert signed by an intermediate CA, a client trusting only
    the root CA would be unable to authenticate the server's cert.
    
    See the OpenSSL docs here:
    https://www.openssl.org/docs/man1.0.2/man3/SSL_CTX_use_certificate_file.html
    for an overview of the SSL_CTX_use_certificate_file() and
    SSL_CTX_use_certificate_chain_file() functions.
    21ca7a69
server_from_intermediate.crt 1.16 KB