lpac/euicc/es9p.h
2024-02-21 22:52:51 +08:00

33 lines
1.2 KiB
C

#pragma once
#include <inttypes.h>
#include "euicc.h"
#include "es10b.h"
struct es9p_ctx
{
struct euicc_ctx *euicc_ctx;
const char *address;
char *transactionId;
struct
{
char subjectCode[8 + 1];
char reasonCode[8 + 1];
char subjectIdentifier[128 + 1];
char message[128 + 1];
} statusCodeData;
};
struct es11_authenticate_client_resp
{
char *status;
void *cjson_array_result;
};
int es9p_initiate_authentication(struct es9p_ctx *ctx, struct es10b_authenticate_server_param *resp, const char *b64_euiccChallenge, const char *b64_EUICCInfo1);
int es9p_get_bound_profile_package(struct es9p_ctx *ctx, char **b64_BoundProfilePackage, const char *b64_PrepareDownloadResponse);
int es9p_authenticate_client(struct es9p_ctx *ctx, struct es10b_prepare_download_param *resp, const char *b64_AuthenticateServerResponse);
int es9p_handle_notification(struct es9p_ctx *ctx, const char *b64_PendingNotification);
int es9p_cancel_session(struct es9p_ctx *ctx, const char *b64_CancelSessionResponse);
int es11_authenticate_client(struct es9p_ctx *ctx, struct es11_authenticate_client_resp *resp, const char *b64_AuthenticateServerResponse);
void es9p_ctx_free(struct es9p_ctx *ctx);