Lines Matching refs:ctx
1108 int ssl_async_set_key(ssl_async_key_context_t *ctx,
1114 if (ctx->slots_used >= sizeof(ctx->slots) / sizeof(*ctx->slots)) {
1117 ctx->slots[ctx->slots_used].cert = cert;
1118 ctx->slots[ctx->slots_used].pk = pk;
1119 ctx->slots[ctx->slots_used].delay = delay;
1120 ctx->slots[ctx->slots_used].pk_owned = pk_take_ownership;
1121 ++ctx->slots_used;
1162 ssl_async_operation_context_t *ctx = NULL;
1201 ctx = mbedtls_calloc(1, sizeof(*ctx));
1202 if (ctx == NULL) {
1205 ctx->slot = slot;
1206 ctx->operation_type = op_type;
1207 ctx->md_alg = md_alg;
1208 memcpy(ctx->input, input, input_len);
1209 ctx->input_len = input_len;
1210 ctx->remaining_delay = config_data->slots[slot].delay;
1211 mbedtls_ssl_set_async_operation_data(ssl, ctx);
1213 if (ctx->remaining_delay == 0) {
1246 ssl_async_operation_context_t *ctx = mbedtls_ssl_get_async_operation_data(ssl);
1249 ssl_async_key_slot_t *key_slot = &config_data->slots[ctx->slot];
1253 if (ctx->remaining_delay > 0) {
1254 --ctx->remaining_delay;
1256 ctx->slot, ctx->remaining_delay);
1260 switch (ctx->operation_type) {
1263 ctx->input, ctx->input_len,
1269 ctx->md_alg,
1270 ctx->input, ctx->input_len,
1277 ctx->slot,
1278 (long) ctx->operation_type);
1279 mbedtls_free(ctx);
1284 op_name = ssl_async_operation_names[ctx->operation_type];
1289 mbedtls_free(ctx);
1294 ctx->slot, op_name, ret);
1295 mbedtls_free(ctx);
1301 ssl_async_operation_context_t *ctx = mbedtls_ssl_get_async_operation_data(ssl);
1303 mbedtls_free(ctx);