sm.h (2fca4dad957cd7b88f4657ed51e89c12615dda72) | sm.h (b96d60a6103b1a6f7c049e6b27899ce7e6965cfd) |
---|---|
1/* 2 * Copyright (C) 2014 BlueKitchen GmbH 3 * 4 * Redistribution and use in source and binary forms, with or without 5 * modification, are permitted provided that the following conditions 6 * are met: 7 * 8 * 1. Redistributions of source code must retain the above copyright --- 248 unchanged lines hidden (view full) --- 257 * @note This generates a 128 bit random number ra and then calculates Ca = f4(PKa, PKa, ra, 0) 258 * New OOB data should be generated for each pairing. Ra is used for subsequent OOB pairings 259 * @param callback 260 * @return status 261 */ 262uint8_t sm_generate_sc_oob_data(void (*callback)(const uint8_t * confirm_value, const uint8_t * random_value)); 263 264/** | 1/* 2 * Copyright (C) 2014 BlueKitchen GmbH 3 * 4 * Redistribution and use in source and binary forms, with or without 5 * modification, are permitted provided that the following conditions 6 * are met: 7 * 8 * 1. Redistributions of source code must retain the above copyright --- 248 unchanged lines hidden (view full) --- 257 * @note This generates a 128 bit random number ra and then calculates Ca = f4(PKa, PKa, ra, 0) 258 * New OOB data should be generated for each pairing. Ra is used for subsequent OOB pairings 259 * @param callback 260 * @return status 261 */ 262uint8_t sm_generate_sc_oob_data(void (*callback)(const uint8_t * confirm_value, const uint8_t * random_value)); 263 264/** |
265 * | |
266 * @brief Registers OOB Data Callback for LE Secure Conections. The callback should set all arguments and return 1 if OOB data is availble 267 * @note the oob_sc_local_random usually is the random_value returend by sm_generate_sc_oob_data 268 * @param get_oob_data_callback 269 */ 270void sm_register_sc_oob_data_callback( int (*get_sc_oob_data_callback)(uint8_t address_type, bd_addr_t addr, uint8_t * oob_sc_peer_confirm, uint8_t * oob_sc_peer_random)); 271 | 265 * @brief Registers OOB Data Callback for LE Secure Conections. The callback should set all arguments and return 1 if OOB data is availble 266 * @note the oob_sc_local_random usually is the random_value returend by sm_generate_sc_oob_data 267 * @param get_oob_data_callback 268 */ 269void sm_register_sc_oob_data_callback( int (*get_sc_oob_data_callback)(uint8_t address_type, bd_addr_t addr, uint8_t * oob_sc_peer_confirm, uint8_t * oob_sc_peer_random)); 270 |
271/** 272 * @bbrief Register LTK Callback that allows to provide a custom LTK on re-encryption. The callback returns true if LTK was modified 273 * @param get_ltk_callback 274 */ 275void sm_register_ltk_callback( bool (*get_ltk_callback)(hci_con_handle_t con_handle, uint8_t address_type, bd_addr_t addr, uint8_t * ltk)); 276 |
|
272/* API_END */ 273 274/** 275 * @brief De-Init SM 276 */ 277void sm_deinit(void); 278 279// PTS testing --- 12 unchanged lines hidden --- | 277/* API_END */ 278 279/** 280 * @brief De-Init SM 281 */ 282void sm_deinit(void); 283 284// PTS testing --- 12 unchanged lines hidden --- |