summaryrefslogtreecommitdiffstats
path: root/src/shrpx_config.cc
diff options
context:
space:
mode:
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