opengitway / btstack

Automatically exported from code.google.com/p/btstack
0 stars 0 forks source link

l2cap_require_security_level_2_for_outgoing_sdp() doesn't work as it should #458

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
I want to request authentication when SDP channel is opened.
I tried l2cap_require_security_level_2_for_outgoing_sdp() but it doesn't 
actually change the security level.

I changed the security level in 'sdp_init()' and it works.
However, I still wonder if it is the correct way to achieve this.
BTW, SSP is not used in my case.

Original issue reported on code.google.com by alexnek...@gmail.com on 9 Mar 2015 at 12:15

GoogleCodeExporter commented 9 years ago
Hi

sorry for not answering earlier. Why do you need security level 2 for sdp? I 
think Bluetooth mandates level 2 for devices that support SSP and all services 
but SDP. 

Looking at the code, l2cap_require_security_level_2_for_outgoing_sdp() sets a 
flag that is used by l2cap_security_level_0_allowed_for_PSM(psm), which in turn 
is only called for outgoing connections. The initiating side is in general 
responsible for asserting the correct security level, but I see you point that 
you'd also like to require a minimum level also for incoming - as you did by 
modifying sdp_init().

Original comment by matthias.ringwald@gmail.com on 1 Jun 2015 at 12:10