#include "quiche/oblivious_http/buffers/oblivious_http_response.h"
#include <stddef.h>
#include <stdint.h>
#include <string.h>
#include <algorithm>
#include <memory>
#include <string>
#include <utility>
#include "absl/status/statusor.h"
#include "absl/strings/escaping.h"
#include "absl/strings/str_cat.h"
#include "absl/strings/string_view.h"
#include "openssl/hpke.h"
#include "quiche/common/platform/api/quiche_test.h"
#include "quiche/oblivious_http/buffers/oblivious_http_request.h"
#include "quiche/oblivious_http/common/oblivious_http_header_key_config.h"
namespace quiche {
namespace {
std::string GetHpkePrivateKey() { … }
std::string GetHpkePublicKey() { … }
std::string GetSeed() { … }
std::string GetSeededEncapsulatedKey() { … }
const ObliviousHttpHeaderKeyConfig GetOhttpKeyConfig(uint8_t key_id,
uint16_t kem_id,
uint16_t kdf_id,
uint16_t aead_id) { … }
bssl::UniquePtr<EVP_HPKE_CTX> GetSeededClientContext(uint8_t key_id,
uint16_t kem_id,
uint16_t kdf_id,
uint16_t aead_id) { … }
bssl::UniquePtr<EVP_HPKE_KEY> ConstructHpkeKey(
absl::string_view hpke_key,
const ObliviousHttpHeaderKeyConfig &ohttp_key_config) { … }
ObliviousHttpRequest SetUpObliviousHttpContext(uint8_t key_id, uint16_t kem_id,
uint16_t kdf_id,
uint16_t aead_id,
std::string plaintext) { … }
class TestQuicheRandom : public QuicheRandom { … };
size_t GetResponseNonceLength(const EVP_HPKE_CTX &hpke_context) { … }
TEST(ObliviousHttpResponse, TestDecapsulateReceivedResponse) { … }
}
TEST(ObliviousHttpResponse, EndToEndTestForResponse) { … }
TEST(ObliviousHttpResponse, TestEncapsulateWithQuicheRandom) { … }
}