Unverified Commit 21ca7a69 authored by mplellison's avatar mplellison Committed by GitHub

Allow Pistache::Listener to load and serve certificate chains (#772)

* 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.
parent b4e9e55e
......@@ -393,7 +393,7 @@ ssl::SSLCtxPtr ssl_create_context(const std::string &cert,
SSL_CTX_set_ecdh_auto(GetSSLContext(ctx), 1);
#endif /* OPENSSL_VERSION_NUMBER */
if (SSL_CTX_use_certificate_file(GetSSLContext(ctx), cert.c_str(), SSL_FILETYPE_PEM) <= 0) {
if (SSL_CTX_use_certificate_chain_file(GetSSLContext(ctx), cert.c_str()) <= 0) {
ERR_print_errors_fp(stderr);
throw std::runtime_error("Cannot load SSL certificate");
}
......
......@@ -42,6 +42,10 @@ if (PISTACHE_USE_SSL)
configure_file("certs/client.key" "certs/client.key" COPYONLY)
configure_file("certs/client.crt" "certs/client.crt" COPYONLY)
configure_file("certs/rootCA.crt" "certs/rootCA.crt" COPYONLY)
configure_file("certs/server_from_intermediate_with_chain.crt" "certs/server_from_intermediate_with_chain.crt" COPYONLY)
configure_file("certs/server_from_intermediate.crt" "certs/server_from_intermediate.crt" COPYONLY)
configure_file("certs/server_from_intermediate.key" "certs/server_from_intermediate.key" COPYONLY)
configure_file("certs/intermediateCA.crt" "certs/intermediateCA.crt" COPYONLY)
pistache_test(https_server_test)
endif (PISTACHE_USE_SSL)
......
-----BEGIN CERTIFICATE-----
MIICyDCCAbACAQIwDQYJKoZIhvc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V6exy/z/foj6pyDEtruAC/P9dbI3ne8B+e0vt14Rlu
U5QpiOoyVyubnrboDaDZYcECgYBgYx6LQKEnU1VN/gS3SD+fZ3a9E4vLajHQTnz9
VDdxEK+WtsyCv+K6wsKfwa41eit6gHMbvp/LrPMXC35mBPneiqNWhjPJMBbtTG5h
vAyPq0urZalbSDhpkbU30vrthTHS0DRNPh9/mZ8FmACch3jlgMxyi3NgSwerwDyX
9iWDXwKBgH4rsQLuADLO6XtsRJz+ez0CXsYACs9v1X61rLIVoE3acPUl1uh721Ne
w309RiNexEVEIQMg0OKHm9hBPGSkoXUp47TyoZri5kE9fqbYNSRc8/bTa0jIEFlP
7ZWtiMegJ2Y7jvW2/IaqXw/HI+RPefeKGrT3So3Z/xAwPx5NWHGA
-----END RSA PRIVATE KEY-----
......@@ -28,7 +28,7 @@ openssl req -new -sha256 -key server.key \
-out server.csr || exit $?
log "Create server.crt"
openssl x509 -req -in server.csr -days ${DAYS} -sha256 \
openssl x509 -req -in server.csr -days ${DAYS} -sha256 -extfile openssl.conf \
-CA rootCA.crt -CAkey rootCA.key -set_serial 01 \
-extensions server -out server.crt || exit $?
......@@ -43,16 +43,55 @@ openssl req -new -sha256 -key client.key \
-out client.csr || exit $?
log "Create client.crt"
openssl x509 -req -in client.csr -days ${DAYS} -sha256 \
openssl x509 -req -in client.csr -days ${DAYS} -sha256 -extfile openssl.conf \
-CA rootCA.crt -CAkey rootCA.key -set_serial 02 \
-extensions client -out client.crt || exit $?
rm -f client.csr || exit $?
log "Create intermediateCA.key"
openssl genrsa -out intermediateCA.key ${BITS} || exit $?
log "Create intermediateCA.csr"
openssl req -new -sha256 -key intermediateCA.key \
-subj "/C=US/ST=WA/O=Pistache/CN=intermediateCA" \
-out intermediateCA.csr || exit $?
log "Create intermediateCA.crt"
openssl x509 -req -in intermediateCA.csr -days ${DAYS} -sha256 -extfile openssl.conf \
-CA rootCA.crt -CAkey rootCA.key -set_serial 01 \
-extensions intermediateCA -out intermediateCA.crt || exit $?
rm -f intermediateCA.csr || exit $?
log "Create server_from_intermediate.key"
openssl genrsa -out server_from_intermediate.key ${BITS} || exit $?
log "Create server_from_intermediate.csr"
openssl req -new -sha256 -key server_from_intermediate.key \
-subj "/C=US/ST=WA/O=Pistache/CN=server_from_intermediate" \
-out server_from_intermediate.csr || exit $?
log "Create server_from_intermediate.crt"
openssl x509 -req -in server_from_intermediate.csr -days ${DAYS} -sha256 -extfile openssl.conf \
-CA intermediateCA.crt -CAkey intermediateCA.key -set_serial 01 \
-extensions server -out server_from_intermediate.crt || exit $?
rm -f server_from_intermediate.csr || exit $?
log "Verify server certificate"
openssl verify -purpose sslserver -CAfile rootCA.crt server.crt || exit $?
log "Verify client certificate"
openssl verify -purpose sslclient -CAfile rootCA.crt client.crt || exit $?
log "Verify server_from_intermediate certificate against intermediate"
openssl verify -purpose sslserver -partial_chain -CAfile intermediateCA.crt server_from_intermediate.crt || exit $?
log "Verify server_from_intermediate certificate against root using intermediate"
openssl verify -purpose sslserver -untrusted intermediateCA.crt -CAfile rootCA.crt server_from_intermediate.crt || exit $?
log "Create server_from_intermediate_with_chain.crt"
cat server_from_intermediate.crt intermediateCA.crt > server_from_intermediate_with_chain.crt
log "done"
[server]
basicConstraints = CA:FALSE
keyUsage = digitalSignature, keyEncipherment
extendedKeyUsage = serverAuth
[client]
basicConstraints = CA:FALSE
keyUsage = digitalSignature, keyEncipherment
extendedKeyUsage = clientAuth
[intermediateCA]
basicConstraints = critical,CA:TRUE
-----BEGIN CERTIFICATE-----
MIIDHjCCAgagAwIBAgIUCGlkAfscFo4ehhm8dWcvnzG7JRowDQYJKoZIhvcNAQEL
BQAwFjEUMBIGA1UEAwwLcGlzdGFjaGUuaW8wHhcNMjAwMjE5MDU0MDIyWhcNMzAw
MjE2MDU0MDIyWjAWMRQwEgYDVQQDDAtwaXN0YWNoZS5pbzCCASIwDQYJKoZIhvcN
AQEBBQADggEPADCCAQoCggEBAJ6YunssG8tACyaCqN8yT2cXB+zE2k1ga5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wlfLO6
gMdXPkAsr/vXTP5QUZYDFfujYBtk5CDpfxQR4hPdgA0zud97BiZMm69AunH5A0jx
eu9AsmYJwVrTFM3EX/j8m8Fg06IeJHaD42Sz942gnglJWvRfS2IJbpnr7sOGvZ/0
FIJdqjAV8v3qNcDf6X5436SCLCDZXADIHedP2AGMYLaplEZLC7UaTNm9zIvvYg0X
dR6VWb+tOSVKU4aNCehyvwIDAQABoxMwETAPBgNVHRMBAf8EBTADAQH/MA0GCSqG
SIb3DQEBCwUAA4IBAQANF+lALL3xWgXrhJA2RkBziSLFyF3YE/g7kVhZHko+Cxks
UzDBZrkn7fbhorTu/j2+QiA/mOGauVNfrgkeZvK1jXvwsE1CmH0e95SczEZVydhm
U8nPGYY2Jhq7JuSJSgYOp7ewweAbibHFo8kYVO2aNYfHHcyS9fDVzJ/Ojn7qnIvS
JO1aUvWqzdGn0XLPdKj2Jms6NN59/iXgF5I9r5NRMOgA4pUaSe7lUcMT8Oy+PyYE
3qKszDIGURdP3Ujzdl6YM3edZJTCieBq6AJwY0CmO6TUJmkpQT0Avx3jyV6lajQH
6qvKipItp6aUx/Uq9eFrpUvXsFSOsdIS1IS+9qHW
-----END CERTIFICATE-----
......@@ -83,6 +83,46 @@ TEST(http_client_test, basic_tls_request) {
ASSERT_EQ(buffer, "Hello, World!");
}
TEST(http_client_test, basic_tls_request_with_chained_server_cert) {
Http::Endpoint server(Address("localhost", Pistache::Port(0)));
auto flags = Tcp::Options::ReuseAddr;
auto server_opts = Http::Endpoint::options().flags(flags);
server.init(server_opts);
server.setHandler(Http::make_handler<HelloHandler>());
server.useSSL("./certs/server_from_intermediate_with_chain.crt",
"./certs/server_from_intermediate.key");
server.serveThreaded();
CURL *curl;
CURLcode res;
std::string buffer;
curl_global_init(CURL_GLOBAL_DEFAULT);
curl = curl_easy_init();
ASSERT_NE(curl, nullptr);
const auto url = getServerUrl(server);
curl_easy_setopt(curl, CURLOPT_URL, url.c_str());
curl_easy_setopt(curl, CURLOPT_CAINFO, "./certs/rootCA.crt");
curl_easy_setopt(curl, CURLOPT_SSL_VERIFYPEER, 1);
curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, &write_cb);
curl_easy_setopt(curl, CURLOPT_WRITEDATA, &buffer);
/* Skip hostname check */
curl_easy_setopt(curl, CURLOPT_SSL_VERIFYHOST, 0L);
res = curl_easy_perform(curl);
curl_easy_cleanup(curl);
curl_global_cleanup();
server.shutdown();
ASSERT_EQ(res, CURLE_OK);
ASSERT_EQ(buffer, "Hello, World!");
}
TEST(http_client_test, basic_tls_request_with_auth) {
Http::Endpoint server(Address("localhost", Pistache::Port(0)));
auto flags = Tcp::Options::ReuseAddr;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment