diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-13 08:52:01 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-13 08:52:01 +0000 |
commit | 42f47327da6a208ac3cd1f9bca07fc506ed51a63 (patch) | |
tree | e06c5e993e0d0b618f616280b372506b1f0f8419 /src/shrpx_config.cc | |
parent | Adding debian version 1.59.0-1. (diff) | |
download | nghttp2-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 '')
-rw-r--r-- | src/shrpx_config.cc | 34 |
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 |