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

Commit b3c06ce9 authored by Mathias Jeppsson's avatar Mathias Jeppsson Committed by Johan Redestig
Browse files

Require bonding and encryption for PBAP server

The Phonebook Access Profile specification requires bonding and
encryption. For devices not supporting SSP (Secure Simple Pairing),
InsecureRfcomm will require neither. Adding EncryptedRfcomm to force
bonding and encryption but not requiring authenticated link key.

Change-Id: I987ca50ff7f60813b5311cead8d6a30a9123d54b
parent 78c1c0ee
Loading
Loading
Loading
Loading
+1 −7
Original line number Diff line number Diff line
@@ -326,13 +326,7 @@ public class BluetoothPbapService extends Service {
            try {
                // It is mandatory for PSE to support initiation of bonding and
                // encryption.
                // InsecureRfcomm => encryption is on, authentication of link
                // key is off. For legacy pairing it doesn't matter, for 2.1
                // pairing - if we have already done MITM protection, then
                // the same linkeys will be used. If not, then all core profiles
                // will have the same level of protection. This API has to be
                // renamed - its no as insecure as the name suggests.
                mServerSocket = mAdapter.listenUsingInsecureRfcommOn(PORT_NUM);
                mServerSocket = mAdapter.listenUsingEncryptedRfcommOn(PORT_NUM);
            } catch (IOException e) {
                Log.e(TAG, "Error create RfcommServerSocket " + e.toString());
                initSocketOK = false;