You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mynewt.apache.org by GitBox <gi...@apache.org> on 2019/12/06 10:08:38 UTC

[GitHub] [mynewt-nimble] andrzej-kaczmarek commented on a change in pull request #688: nimble/host: Add support for OOB Secure Connections

andrzej-kaczmarek commented on a change in pull request #688: nimble/host: Add support for OOB Secure Connections
URL: https://github.com/apache/mynewt-nimble/pull/688#discussion_r354463762
 
 

 ##########
 File path: nimble/host/include/host/ble_sm.h
 ##########
 @@ -84,17 +84,34 @@ extern "C" {
 #define BLE_SM_IOACT_INPUT                      2
 #define BLE_SM_IOACT_DISP                       3
 #define BLE_SM_IOACT_NUMCMP                     4
-#define BLE_SM_IOACT_MAX_PLUS_ONE               5
+#define BLE_SM_IOACT_OOB_SC                     5
+#define BLE_SM_IOACT_MAX_PLUS_ONE               6
+
+struct ble_sm_sc_oob_data {
+    /** Random Number. */
+    uint8_t r[16];
+
+    /** Confirm Value. */
+    uint8_t c[16];
+};
 
 struct ble_sm_io {
     uint8_t action;
     union {
         uint32_t passkey;
         uint8_t  oob[16];
         uint8_t  numcmp_accept;
+        struct ble_sm_sc_oob_data *oob_sc[2];
     };
 };
 
+#if MYNEWT_VAL(BLE_SM_SC)
+int ble_sm_sc_oob_generate_data(struct ble_sm_sc_oob_data *oobd);
+#else
+#define ble_sm_sc_oob_generate_data(oobd) \
+    ((void)(oobd), BLE_HS_ENOTSUP)
 
 Review comment:
   just return `BLE_HS_ENOTSUP` from that function instead

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services