Modify the justwork repairing logic for certification 69/276069/1
authorDohyun Pyun <dh79.pyun@samsung.com>
Thu, 9 Jun 2022 06:29:27 +0000 (15:29 +0900)
committerDohyun Pyun <dh79.pyun@samsung.com>
Thu, 9 Jun 2022 06:30:42 +0000 (15:30 +0900)
This change is related with GAP/SEC/AUT/BV-26-C

Change-Id: I423379a24b664d536b2b5e20b561c0053d1287a0
Signed-off-by: Dohyun Pyun <dh79.pyun@samsung.com>
src/device.c

index 1d760a1f83b19d2da7438674eb2347aa9be2e897..37acc5d2bd699d8ed87aeec4157628b20a6e6915 100644 (file)
@@ -77,6 +77,7 @@
 
 #ifdef TIZEN_FEATURE_BLUEZ_MODIFY
 #include "sdp-xml.h"
+#include "../profile.h"
 #ifdef TIZEN_FEATURE_BLUEZ_BATTERY_WATCH
 #include <sys/ioctl.h>
 #endif /* TIZEN_FEATURE_BLUEZ_BATTERY_WATCH */
@@ -9019,9 +9020,24 @@ int device_confirm_passkey(struct btd_device *device, uint8_t type,
        /* Just-Works repairing policy */
        if (confirm_hint && device_is_paired(device, type)) {
                if (main_opts.jw_repairing == JW_REPAIRING_NEVER) {
+#if defined TIZEN_FEATURE_BLUEZ_MODIFY
+                       /* GAP/SEC/AUT/BV-26-C
+                        * Need to modify the just work logic for ceritification
+                       */
+                       if (TIZEN_FEATURE_BLUEZ_STACK_CERTIFICATION) {
+                               btd_adapter_confirm_reply(device->adapter,
+                                                         &device->bdaddr,
+                                                         type, TRUE);
+                       } else {
+                               btd_adapter_confirm_reply(device->adapter,
+                                                         &device->bdaddr,
+                                                         type, FALSE);
+                       }
+#else
                        btd_adapter_confirm_reply(device->adapter,
                                                  &device->bdaddr,
                                                  type, FALSE);
+#endif
                        return 0;
                } else if (main_opts.jw_repairing == JW_REPAIRING_ALWAYS) {
                        btd_adapter_confirm_reply(device->adapter,