summaryrefslogtreecommitdiffstats
path: root/src/shrpx_connection_handler.cc
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-13 08:52:01 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-13 08:52:01 +0000
commit42f47327da6a208ac3cd1f9bca07fc506ed51a63 (patch)
treee06c5e993e0d0b618f616280b372506b1f0f8419 /src/shrpx_connection_handler.cc
parentAdding debian version 1.59.0-1. (diff)
downloadnghttp2-42f47327da6a208ac3cd1f9bca07fc506ed51a63.tar.xz
nghttp2-42f47327da6a208ac3cd1f9bca07fc506ed51a63.zip
Merging upstream version 1.60.0.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'src/shrpx_connection_handler.cc')
-rw-r--r--src/shrpx_connection_handler.cc23
1 files changed, 7 insertions, 16 deletions
diff --git a/src/shrpx_connection_handler.cc b/src/shrpx_connection_handler.cc
index 330e832..af4b8fc 100644
--- a/src/shrpx_connection_handler.cc
+++ b/src/shrpx_connection_handler.cc
@@ -739,40 +739,31 @@ void ConnectionHandler::handle_ocsp_complete() {
// that case we get nullptr.
auto quic_ssl_ctx = quic_all_ssl_ctx_[ocsp_.next];
if (quic_ssl_ctx) {
-# ifndef NGHTTP2_OPENSSL_IS_BORINGSSL
auto quic_tls_ctx_data = static_cast<tls::TLSContextData *>(
SSL_CTX_get_app_data(quic_ssl_ctx));
-# ifdef HAVE_ATOMIC_STD_SHARED_PTR
+# ifdef HAVE_ATOMIC_STD_SHARED_PTR
std::atomic_store_explicit(
&quic_tls_ctx_data->ocsp_data,
std::make_shared<std::vector<uint8_t>>(ocsp_.resp),
std::memory_order_release);
-# else // !HAVE_ATOMIC_STD_SHARED_PTR
+# else // !HAVE_ATOMIC_STD_SHARED_PTR
std::lock_guard<std::mutex> g(quic_tls_ctx_data->mu);
quic_tls_ctx_data->ocsp_data =
std::make_shared<std::vector<uint8_t>>(ocsp_.resp);
-# endif // !HAVE_ATOMIC_STD_SHARED_PTR
-# else // NGHTTP2_OPENSSL_IS_BORINGSSL
- SSL_CTX_set_ocsp_response(quic_ssl_ctx, ocsp_.resp.data(),
- ocsp_.resp.size());
-# endif // NGHTTP2_OPENSSL_IS_BORINGSSL
+# endif // !HAVE_ATOMIC_STD_SHARED_PTR
}
#endif // ENABLE_HTTP3
-#ifndef NGHTTP2_OPENSSL_IS_BORINGSSL
-# ifdef HAVE_ATOMIC_STD_SHARED_PTR
+#ifdef HAVE_ATOMIC_STD_SHARED_PTR
std::atomic_store_explicit(
&tls_ctx_data->ocsp_data,
std::make_shared<std::vector<uint8_t>>(std::move(ocsp_.resp)),
std::memory_order_release);
-# else // !HAVE_ATOMIC_STD_SHARED_PTR
+#else // !HAVE_ATOMIC_STD_SHARED_PTR
std::lock_guard<std::mutex> g(tls_ctx_data->mu);
tls_ctx_data->ocsp_data =
std::make_shared<std::vector<uint8_t>>(std::move(ocsp_.resp));
-# endif // !HAVE_ATOMIC_STD_SHARED_PTR
-#else // NGHTTP2_OPENSSL_IS_BORINGSSL
- SSL_CTX_set_ocsp_response(ssl_ctx, ocsp_.resp.data(), ocsp_.resp.size());
-#endif // NGHTTP2_OPENSSL_IS_BORINGSSL
+#endif // !HAVE_ATOMIC_STD_SHARED_PTR
}
++ocsp_.next;
@@ -1288,7 +1279,7 @@ int ConnectionHandler::quic_ipc_read() {
if (decrypt_quic_connection_id(decrypted_dcid.data(),
vc.dcid + SHRPX_QUIC_CID_PREFIX_OFFSET,
- qkm.cid_encryption_key.data()) != 0) {
+ qkm.cid_encryption_ctx) != 0) {
return -1;
}