Lines Matching refs:ctx

1105 static int ssl_async_set_key(ssl_async_key_context_t *ctx,  in ssl_async_set_key()  argument
1111 if (ctx->slots_used >= sizeof(ctx->slots) / sizeof(*ctx->slots)) { in ssl_async_set_key()
1114 ctx->slots[ctx->slots_used].cert = cert; in ssl_async_set_key()
1115 ctx->slots[ctx->slots_used].pk = pk; in ssl_async_set_key()
1116 ctx->slots[ctx->slots_used].delay = delay; in ssl_async_set_key()
1117 ctx->slots[ctx->slots_used].pk_owned = pk_take_ownership; in ssl_async_set_key()
1118 ++ctx->slots_used; in ssl_async_set_key()
1157 ssl_async_operation_context_t *ctx = NULL; in ssl_async_start() local
1195 ctx = mbedtls_calloc(1, sizeof(*ctx)); in ssl_async_start()
1196 if (ctx == NULL) { in ssl_async_start()
1199 ctx->slot = slot; in ssl_async_start()
1200 ctx->operation_type = op_type; in ssl_async_start()
1201 ctx->md_alg = md_alg; in ssl_async_start()
1202 memcpy(ctx->input, input, input_len); in ssl_async_start()
1203 ctx->input_len = input_len; in ssl_async_start()
1204 ctx->remaining_delay = config_data->slots[slot].delay; in ssl_async_start()
1205 mbedtls_ssl_set_async_operation_data(ssl, ctx); in ssl_async_start()
1207 if (ctx->remaining_delay == 0) { in ssl_async_start()
1230 ssl_async_operation_context_t *ctx = mbedtls_ssl_get_async_operation_data(ssl); in ssl_async_resume() local
1233 ssl_async_key_slot_t *key_slot = &config_data->slots[ctx->slot]; in ssl_async_resume()
1237 if (ctx->remaining_delay > 0) { in ssl_async_resume()
1238 --ctx->remaining_delay; in ssl_async_resume()
1240 ctx->slot, ctx->remaining_delay); in ssl_async_resume()
1244 switch (ctx->operation_type) { in ssl_async_resume()
1247 ctx->md_alg, in ssl_async_resume()
1248 ctx->input, ctx->input_len, in ssl_async_resume()
1254 ctx->slot, in ssl_async_resume()
1255 (long) ctx->operation_type); in ssl_async_resume()
1256 mbedtls_free(ctx); in ssl_async_resume()
1261 op_name = ssl_async_operation_names[ctx->operation_type]; in ssl_async_resume()
1266 mbedtls_free(ctx); in ssl_async_resume()
1271 ctx->slot, op_name, ret); in ssl_async_resume()
1272 mbedtls_free(ctx); in ssl_async_resume()
1278 ssl_async_operation_context_t *ctx = mbedtls_ssl_get_async_operation_data(ssl); in ssl_async_cancel() local
1280 mbedtls_free(ctx); in ssl_async_cancel()