This page was last modified 04:39, 24 August 2007.
KIS000282 - Authorization requires authentication in Bluetooth security manager
From Forum Nokia Wiki
Using authorization requires authentication in Bluetooth security manager
|
KIS000282
|
Overview
| Using authorization mandates using authentication when the TBTServiceSecurity class is used in certain devices. If there is a need for an authorization feature, also authentication has to be set.
|
Reported against
| S60 2nd Edition, FP2 & FP3, Nokia 6630, Nokia 6680, Nokia N90
|
Date identified
| August 25, 2005
|
Symptoms
| -
|
Detailed description
| The Bluetooth Security Manager faced some changes in Symbian OS v8.0a. In contrast to earlier platforms, it is not possible to use authorization (user confirmation for the inbound connection) without authentication (bonding between two devices).
|
How to reproduce
| Set TBTServiceSecurity’s authentication OFF (false) and authorization ON (true). Then connect the devices. The devices get connected without any dialog for the user to accept/decline the connection request.
|
Solution
| You have to set both authorization and authentication ON (=true) to be able to use authorization (which is actually also recommended to ensure better security). An example of how to set authorization ON: ... // Get the port and set it to the listening socket TInt channel; User::LeaveIfError ( iListeningSocket.GetOpt( RFCOMMGetAvailableServerChannel, KSolBtRFCOMM, channel )); TBTSockAddr listeningAddress; listeningAddress.SetPort( channel ); // Define security for the application (unique service ID, // authentication ON, encryption ON; authorization ON) TBTServiceSecurity serviceSecurity; serviceSecurity.SetUid ( KUidBTPointToPointApp ); serviceSecurity.SetAuthentication ( ETrue ); serviceSecurity.SetEncryption ( ETrue ); serviceSecurity.SetAuthorisation ( ETrue ); serviceSecurity.SetDenied( EFalse ); // Attach the defined security policy to the socket listeningAddress.SetSecurity(serviceSecurity); // Bind the socket User::LeaveIfError( iListeningSocket.Bind( listeningAddress ) ); User::LeaveIfError( iListeningSocket.Listen( KListeningQueSize ) ); ...
|