Open
Description
Is your enhancement proposal related to a problem? Please describe.
Currently encryption key size verification is letf up to application in accept() callback, while security level is validated by the stack. This could be simplified and keysize could also be validated by the stack so that each application don't have to reimplement this check.
See discussion in for some background: #40177
Describe the solution you'd like
Key size verification could be don in l2cap_check_security() in l2cap.c, and -EPERM would be removed from allowed returns on accept() call (could be left for time being for backward compatibility though)