[bt][gap] Wire up L2CAP security callbacks to GAP
- data::Domain now provides trampolines for L2CAP security functions.
- gap::LowEnergyConnectionManager no longer initiates pairing on every
connection. Instead, a SMP pairing request is initiated only after a
security request from L2CAP. The link is always encrypted upon
reconnection to an already paired device.
- gap::BrEdrConnectionManager currently logs a message and replies
negatively to security requests from L2CAP.
- The GAP layer currently has no unit tests for security procedures.
This is blocked on NET-1179.
NET-1151 #done
Test: 1. Boot fuchsia with the HOG driver disabled (driver.bthog.disable)
2. Connect to a LE HID device using bt-le-central. No pairing
should be initiated.
3. Enable notifications from a "Boot Input Report" characteristic
and follow these two scenarios:
- Do this without starting bt-pairing-tool which will cause the
pairing request to fail. The request to enable notifications
should fail with an "Insufficient Authentication" ATT error.
- Do this after starting bt-pairing-tool. The tool should
display a pairing request. After following the pairing
procedures the request to enable notifications should succeed.
4. Connecting to a HID device with the bthog driver enabled should
automatically initiate pairing (as bthog enables notifications).
Change-Id: Id75da08c1c818ddae6fb76e7f3a1af9fd21f14ca
8 files changed