#ifndef OPEN_SECURE_CHANNEL_H
#define OPEN_SECURE_CHANNEL_H

#include <limits.h>

#include "dk_apdu.h"
#include "dk_channel.h"
#include "dk_cmd_external_authenticate.h"
#include "dk_cmd_get_data.h"
#include "dk_cmd_get_response.h"
#include "dk_cmd_initialize_update.h"
#include "dk_constants.h"
#include "dk_log.h"
#include "dk_constants.h"
#include "dk_scp_common.h"
#include "dk_scp_utils.h"
#include "tl_dk_ctx.h"
#include "tz_dk_errors.h"
#include "tz_dk_open_secure_channel_msg.h"

/**
 * Opens a secure channel.
 * 
 * @param ctx digital key context.
 * @param sendmsg TA command payload.
 * @param respmsg TA command response payload.
 * 
 * @return 0 on success; different value on error.
 */
tciReturnCode_t process_open_secure_channel(
    tl_dk_ctx_t *ctx,
    tz_dk_open_secure_channel_payload_t *sendmsg,
    tz_dk_open_secure_channel_payload_t *respmsg);

#endif