#ifdef UNSAFE_BUFFERS_BUILD
#pragma allow_unsafe_buffers
#endif
#include "device/fido/cable/v2_handshake.h"
#include <string_view>
#include "base/containers/contains.h"
#include "base/rand_util.h"
#include "base/ranges/algorithm.h"
#include "components/cbor/reader.h"
#include "components/cbor/values.h"
#include "components/cbor/writer.h"
#include "crypto/random.h"
#include "device/fido/cable/cable_discovery_data.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "third_party/boringssl/src/include/openssl/ec.h"
#include "third_party/boringssl/src/include/openssl/ec_key.h"
#include "third_party/boringssl/src/include/openssl/obj.h"
#include "url/gurl.h"
namespace device {
namespace cablev2 {
namespace {
TEST(CableV2Encoding, TunnelServerURLs) { … }
TEST(CableV2Encoding, EIDToFromComponents) { … }
TEST(CableV2Encoding, EIDEncrypt) { … }
TEST(CableV2Encoding, QRs) { … }
TEST(CableV2Encoding, KnownQRs) { … }
TEST(CableV2Encoding, RequestTypeToString) { … }
TEST(CableV2Encoding, PaddedCBOR) { … }
std::optional<std::vector<uint8_t>> EncodePaddedCBORMapOld(
cbor::Value::MapValue map) { … }
TEST(CableV2Encoding, OldPaddedCBOR) { … }
std::array<uint8_t, kP256X962Length> PublicKeyOf(const EC_KEY* private_key) { … }
TEST(CableV2Encoding, Digits) { … }
TEST(CableV2Encoding, HandshakeSignatures) { … }
TEST(CableV2Encoding, ParseInvalidLinkingInformation) { … }
class CableV2HandshakeTest : public ::testing::Test { … };
TEST_F(CableV2HandshakeTest, MessageEncrytion) { … }
TEST_F(CableV2HandshakeTest, NKHandshake) { … }
TEST_F(CableV2HandshakeTest, KNHandshake) { … }
}
}
}