Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 5bd2c481 authored by Hui Peng's avatar Hui Peng Committed by Gerrit Code Review
Browse files

Merge "Clean up smp-fuzzer" into main

parents aa9426ef 393921aa
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -471,7 +471,7 @@ cc_fuzz {
        ":TestMockStackL2cap",
        ":TestMockStackMetrics",
        "fuzzers/smp_fuzzer.cc",
        "smp/smp_*.cc",
        "smp/*.cc", // add other sources files  (p256 related) under smp into this test
    ],
    static_libs: [
        "libgmock",
+0 −9
Original line number Diff line number Diff line
@@ -132,13 +132,6 @@ class Fakes {

}  // namespace

// Mocking some ECC operations
bool ECC_ValidatePoint(Point const&) { return true; }
void ECC_PointMult_Bin_NAF(Point* q, Point* p, uint32_t* n) {}
void p_256_init_curve() {}
elliptic_curve_t curve_p256;

tBTM_CB btm_cb;
uint8_t oob_data[] = {0x11, 0x22, 0x33, 0x44, 0x55, 0x66, 0x77, 0x88,
                      0x99, 0xAA, 0xBB, 0xCC, 0xDD, 0xEE, 0xFF, 0x00};
tSMP_IO_REQ io_req = {};
@@ -183,8 +176,6 @@ void Fuzz(const uint8_t* data, size_t size) {
  tBT_TRANSPORT transport;
  tL2CAP_FIXED_CHNL_REG* chnl_reg;

  btm_cb = tBTM_CB();

  SMP_Init(BTM_SEC_MODE_SP);
  SMP_Register(smp_callback);
  SMP_SetTraceLevel(BT_TRACE_LEVEL_DEBUG);