sm.c (34b6528f7c8ef6d121bebee1858bc76546b5defa) | sm.c (c085d9ff20f6016bfc9438c94c2d9535e4447ac4) |
---|---|
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 --- 958 unchanged lines hidden (view full) --- 967 return recv_flags == setup->sm_key_distribution_received_set; 968} 969 970static void sm_done_for_handle(hci_con_handle_t con_handle){ 971 if (sm_active_connection_handle == con_handle){ 972 sm_timeout_stop(); 973 sm_active_connection_handle = HCI_CON_HANDLE_INVALID; 974 log_info("sm: connection 0x%x released setup context", con_handle); | 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 --- 958 unchanged lines hidden (view full) --- 967 return recv_flags == setup->sm_key_distribution_received_set; 968} 969 970static void sm_done_for_handle(hci_con_handle_t con_handle){ 971 if (sm_active_connection_handle == con_handle){ 972 sm_timeout_stop(); 973 sm_active_connection_handle = HCI_CON_HANDLE_INVALID; 974 log_info("sm: connection 0x%x released setup context", con_handle); |
975 976#ifdef ENABLE_LE_SECURE_CONNECTIONS 977 // generate new ec key after each pairing (that used it) 978 if (setup->sm_use_secure_connections){ 979 sm_ec_generate_new_key(); 980 } 981#endif |
|
975 } 976} 977 978static int sm_key_distribution_flags_for_auth_req(void){ 979 980 int flags = SM_KEYDIST_ID_KEY; 981 if (sm_auth_req & SM_AUTHREQ_BONDING){ 982 // encryption and signing information only if bonding requested --- 3111 unchanged lines hidden --- | 982 } 983} 984 985static int sm_key_distribution_flags_for_auth_req(void){ 986 987 int flags = SM_KEYDIST_ID_KEY; 988 if (sm_auth_req & SM_AUTHREQ_BONDING){ 989 // encryption and signing information only if bonding requested --- 3111 unchanged lines hidden --- |