diff options
author | Nick Pelly <npelly@google.com> | 2009-09-24 18:03:42 -0700 |
---|---|---|
committer | Nick Pelly <npelly@google.com> | 2009-09-24 19:36:27 -0700 |
commit | 1a42cfac152faa98c2e3d9e9fd6889209de195fe (patch) | |
tree | 93c98637f1e85a64d95cfc44f2cb77d88aabfc5a /core/jni | |
parent | 18b1e79a123b979d25bfa5d0b0ee5d0382dbd64b (diff) | |
download | frameworks_base-1a42cfac152faa98c2e3d9e9fd6889209de195fe.zip frameworks_base-1a42cfac152faa98c2e3d9e9fd6889209de195fe.tar.gz frameworks_base-1a42cfac152faa98c2e3d9e9fd6889209de195fe.tar.bz2 |
Use LM_SECURE when auth && encrypt.
LM_SECURE enforces man in the middle (MITM) protection.
Change-Id: Ia800bb657b429f8872d72072f7c9450a74028af0
Diffstat (limited to 'core/jni')
-rw-r--r-- | core/jni/android_bluetooth_BluetoothSocket.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/core/jni/android_bluetooth_BluetoothSocket.cpp b/core/jni/android_bluetooth_BluetoothSocket.cpp index 51cf0cb..70d74d5 100644 --- a/core/jni/android_bluetooth_BluetoothSocket.cpp +++ b/core/jni/android_bluetooth_BluetoothSocket.cpp @@ -124,11 +124,13 @@ static void initSocketNative(JNIEnv *env, jobject obj) { switch (type) { case TYPE_RFCOMM: lm |= auth ? RFCOMM_LM_AUTH : 0; - lm |= encrypt? RFCOMM_LM_ENCRYPT : 0; + lm |= encrypt ? RFCOMM_LM_ENCRYPT : 0; + lm |= (auth && encrypt) ? RFCOMM_LM_SECURE : 0; break; case TYPE_L2CAP: lm |= auth ? L2CAP_LM_AUTH : 0; - lm |= encrypt? L2CAP_LM_ENCRYPT : 0; + lm |= encrypt ? L2CAP_LM_ENCRYPT : 0; + lm |= (auth && encrypt) ? L2CAP_LM_SECURE : 0; break; } |