static struct l_queue *devices;
static bool prov_in_progress;
-static const char *caps[] = {"static-oob", "out-numeric", "in-numeric"};
+static const char * const caps[] = {"static-oob",
+ "push",
+ "twist",
+ "blink",
+ "beep",
+ "vibrate",
+ "public-oob",
+ "out-alpha",
+ "in-alpha",
+ "out-numeric",
+ "in-numeric"};
static bool have_config;
struct l_dbus_message *reply = NULL;
struct l_dbus_message_builder *builder;
uint32_t val_u32;
- uint8_t oob_data[16];
+ uint8_t oob_data[64];
switch (type) {
case NONE:
/* Fall Through */
case HEXADECIMAL:
- if (len > 16) {
+ if (len > sizeof(oob_data)) {
bt_shell_printf("Bad input length\n");
break;
}
- memset(oob_data, 0, 16);
+ memset(oob_data, 0, sizeof(oob_data));
memcpy(oob_data, buf, len);
reply = l_dbus_message_new_method_return(msg);
builder = l_dbus_message_builder_new(reply);
- append_byte_array(builder, oob_data, 16);
+ append_byte_array(builder, oob_data, len);
l_dbus_message_builder_finalize(builder);
l_dbus_message_builder_destroy(builder);
break;
return NULL;
}
+static struct l_dbus_message *prompt_public_call(struct l_dbus *dbus,
+ struct l_dbus_message *msg,
+ void *user_data)
+{
+ l_dbus_message_ref(msg);
+ agent_input_request(HEXADECIMAL, 64, "Enter 512 bit Public Key",
+ agent_input_done, msg);
+ return NULL;
+}
+
static struct l_dbus_message *prompt_static_call(struct l_dbus *dbus,
struct l_dbus_message *msg,
void *user_data)
"u", "s", "number", "type");
l_dbus_interface_method(iface, "PromptStatic", 0, prompt_static_call,
"ay", "s", "data", "type");
+ l_dbus_interface_method(iface, "PublicKey", 0, prompt_public_call,
+ "ay", "", "data");
}
static bool register_agent(void)