Lines Matching full:auth
128 uint8_t auth;
940 device->auth = 0xff;
1625 void device_set_auth(struct btd_device *device, uint8_t auth)
1630 device->auth = auth;
1635 return device->auth;
1692 case 0x0E: /* rejected due to security reasons - is this auth failure? */
1693 case 0x25: /* encryption mode not acceptable - is this auth failure? */
1694 case 0x26: /* link key cannot be changed - is this auth failure? */
1695 case 0x29: /* pairing with unit key unsupported - is this auth failure? */
1696 case 0x2f: /* insufficient security - is this auth failure? */
1991 struct authentication_req *auth = device->authr;
1993 if (auth && auth->type == AUTH_TYPE_NOTIFY && auth->agent)
1994 agent_cancel(auth->agent);
2000 struct authentication_req *auth = device->authr;
2002 if (auth && auth->type == AUTH_TYPE_NOTIFY && auth->agent)
2003 agent_cancel(auth->agent);
2008 device->auth = 0xff;
2115 struct authentication_req *auth = data;
2116 struct btd_device *device = auth->device;
2119 if (!auth->cb)
2122 ((agent_pincode_cb) auth->cb)(agent, err, pincode, device);
2124 auth->cb = NULL;
2129 struct authentication_req *auth = data;
2130 struct btd_device *device = auth->device;
2133 if (!auth->cb)
2136 ((agent_cb) auth->cb)(agent, err, device);
2138 auth->cb = NULL;
2144 struct authentication_req *auth = data;
2145 struct btd_device *device = auth->device;
2148 if (!auth->cb)
2151 ((agent_passkey_cb) auth->cb)(agent, err, passkey, device);
2153 auth->cb = NULL;
2158 struct authentication_req *auth = data;
2159 struct btd_device *device = auth->device;
2162 if (!auth->cb)
2165 ((agent_cb) auth->cb)(agent, err, device);
2167 auth->cb = NULL;
2173 struct authentication_req *auth;
2189 auth = g_new0(struct authentication_req, 1);
2190 auth->agent = agent;
2191 auth->device = device;
2192 auth->cb = cb;
2193 auth->type = type;
2194 device->authr = auth;
2199 auth, NULL);
2203 auth, NULL);
2207 confirm_cb, auth, NULL);
2217 pairing_consent_cb, auth, NULL);
2225 g_free(auth);
2232 static void cancel_authentication(struct authentication_req *auth)
2234 struct btd_device *device = auth->device;
2235 struct agent *agent = auth->agent;
2238 if (!auth->cb)
2244 switch (auth->type) {
2246 ((agent_pincode_cb) auth->cb)(agent, &err, NULL, device);
2249 ((agent_cb) auth->cb)(agent, &err, device);
2252 ((agent_passkey_cb) auth->cb)(agent, &err, 0, device);
2255 ((agent_cb) auth->cb) (agent, &err, device);
2264 auth->cb = NULL;
2269 struct authentication_req *auth = device->authr;
2271 if (!auth)
2276 if (auth->agent)
2277 agent_cancel(auth->agent);
2280 cancel_authentication(auth);
2283 g_free(auth);
2296 void device_set_authorizing(struct btd_device *device, gboolean auth)
2298 device->authorizing = auth;