summaryrefslogtreecommitdiffstats
path: root/src/shrpx_config.cc
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-13 08:51:45 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-13 08:51:45 +0000
commitb008a9f667dfbe92c7275adec7d9b9d6b05c3ec8 (patch)
treee63c9ae918acedbe29bb3b67109da9615c08e5e6 /src/shrpx_config.cc
parentAdding upstream version 1.59.0. (diff)
downloadnghttp2-b008a9f667dfbe92c7275adec7d9b9d6b05c3ec8.tar.xz
nghttp2-b008a9f667dfbe92c7275adec7d9b9d6b05c3ec8.zip
Adding upstream version 1.60.0.upstream/1.60.0
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'src/shrpx_config.cc')
-rw-r--r--src/shrpx_config.cc34
1 files changed, 34 insertions, 0 deletions
diff --git a/src/shrpx_config.cc b/src/shrpx_config.cc
index d6d0d07..89b3672 100644
--- a/src/shrpx_config.cc
+++ b/src/shrpx_config.cc
@@ -49,6 +49,8 @@
#include <fstream>
#include <unordered_map>
+#include <openssl/evp.h>
+
#include <nghttp2/nghttp2.h>
#include "url-parser/url_parser.h"
@@ -64,6 +66,10 @@
#include "ssl_compat.h"
#include "xsi_strerror.h"
+#ifndef AI_NUMERICSERV
+# define AI_NUMERICSERV 0
+#endif
+
namespace shrpx {
namespace {
@@ -4691,4 +4697,32 @@ int resolve_hostname(Address *addr, const char *hostname, uint16_t port,
return 0;
}
+#ifdef ENABLE_HTTP3
+QUICKeyingMaterial::QUICKeyingMaterial(QUICKeyingMaterial &&other) noexcept
+ : cid_encryption_ctx{std::exchange(other.cid_encryption_ctx, nullptr)},
+ reserved{other.reserved},
+ secret{other.secret},
+ salt{other.salt},
+ cid_encryption_key{other.cid_encryption_key},
+ id{other.id} {}
+
+QUICKeyingMaterial::~QUICKeyingMaterial() noexcept {
+ if (cid_encryption_ctx) {
+ EVP_CIPHER_CTX_free(cid_encryption_ctx);
+ }
+}
+
+QUICKeyingMaterial &
+QUICKeyingMaterial::operator=(QUICKeyingMaterial &&other) noexcept {
+ cid_encryption_ctx = std::exchange(other.cid_encryption_ctx, nullptr);
+ reserved = other.reserved;
+ secret = other.secret;
+ salt = other.salt;
+ cid_encryption_key = other.cid_encryption_key;
+ id = other.id;
+
+ return *this;
+}
+#endif // ENABLE_HTTP3
+
} // namespace shrpx