mirror of
https://github.com/estkme-group/lpac
synced 2024-07-02 14:56:39 +02:00
change api naming back
This commit is contained in:
parent
9829bbb79a
commit
14441b14be
|
@ -10,7 +10,7 @@
|
|||
#include <unistd.h>
|
||||
#include <string.h>
|
||||
|
||||
int es10a_GetEuiccConfiguredAddresses(struct euicc_ctx *ctx, struct es10a_euicc_configured_addresses *address)
|
||||
int es10a_get_euicc_configured_addresses(struct euicc_ctx *ctx, struct es10a_euicc_configured_addresses *address)
|
||||
{
|
||||
int fret = 0;
|
||||
struct derutils_node n_request = {
|
||||
|
@ -74,7 +74,7 @@ exit:
|
|||
return fret;
|
||||
}
|
||||
|
||||
int es10a_SetDefaultDpAddress(struct euicc_ctx *ctx, const char *smdp)
|
||||
int es10a_set_default_dp_address(struct euicc_ctx *ctx, const char *smdp)
|
||||
{
|
||||
int fret = 0;
|
||||
struct derutils_node n_request = {
|
||||
|
|
|
@ -8,7 +8,7 @@ struct es10a_euicc_configured_addresses
|
|||
char *rootDsAddress;
|
||||
};
|
||||
|
||||
int es10a_GetEuiccConfiguredAddresses(struct euicc_ctx *ctx, struct es10a_euicc_configured_addresses *address);
|
||||
int es10a_SetDefaultDpAddress(struct euicc_ctx *ctx, const char *smdp);
|
||||
int es10a_get_euicc_configured_addresses(struct euicc_ctx *ctx, struct es10a_euicc_configured_addresses *address);
|
||||
int es10a_set_default_dp_address(struct euicc_ctx *ctx, const char *smdp);
|
||||
|
||||
void es10a_euicc_configured_addresses_free(struct es10a_euicc_configured_addresses *address);
|
||||
|
|
114
euicc/es10b.c
114
euicc/es10b.c
|
@ -12,7 +12,7 @@
|
|||
#include <unistd.h>
|
||||
#include <string.h>
|
||||
|
||||
int es10b_PrepareDownload(struct euicc_ctx *ctx, char **b64_PrepareDownloadResponse, struct es10b_prepare_download_param *param)
|
||||
int es10b_prepare_download(struct euicc_ctx *ctx, char **b64_PrepareDownloadResponse, struct es10b_prepare_download_param *param)
|
||||
{
|
||||
int fret = 0;
|
||||
uint8_t *reqbuf = NULL;
|
||||
|
@ -222,59 +222,57 @@ static int es10b_load_bound_profile_package_tx(struct euicc_ctx *ctx, struct es1
|
|||
{
|
||||
case 0xA0: // SuccessResult
|
||||
break;
|
||||
|
||||
case 0xA1: // ErrorResult
|
||||
|
||||
if (euicc_derutil_unpack_find_tag(&tmpnode, 0x80, n_finalResult.value, n_finalResult.length) == 0) // bppCommandId
|
||||
tmpnode.self.ptr = n_finalResult.value;
|
||||
tmpnode.self.length = 0;
|
||||
while (euicc_derutil_unpack_next(&tmpnode, &tmpnode, n_finalResult.value, n_finalResult.length) == 0)
|
||||
{
|
||||
int bppCommandId;
|
||||
|
||||
bppCommandId = euicc_derutil_convert_bin2long(tmpnode.value, tmpnode.length);
|
||||
|
||||
switch (bppCommandId)
|
||||
int tmpint;
|
||||
switch (tmpnode.tag)
|
||||
{
|
||||
case ES10B_BPP_COMMAND_ID_INITIALISE_SECURE_CHANNEL:
|
||||
case ES10B_BPP_COMMAND_ID_CONFIGURE_ISDP:
|
||||
case ES10B_BPP_COMMAND_ID_STORE_METADATA:
|
||||
case ES10B_BPP_COMMAND_ID_STORE_METADATA2:
|
||||
case ES10B_BPP_COMMAND_ID_REPLACE_SESSION_KEYS:
|
||||
case ES10B_BPP_COMMAND_ID_LOAD_PROFILE_ELEMENTS:
|
||||
result->bppCommandId = bppCommandId;
|
||||
case 0x80:
|
||||
tmpint = euicc_derutil_convert_bin2long(tmpnode.value, tmpnode.length);
|
||||
switch (tmpint)
|
||||
{
|
||||
case ES10B_BPP_COMMAND_ID_INITIALISE_SECURE_CHANNEL:
|
||||
case ES10B_BPP_COMMAND_ID_CONFIGURE_ISDP:
|
||||
case ES10B_BPP_COMMAND_ID_STORE_METADATA:
|
||||
case ES10B_BPP_COMMAND_ID_STORE_METADATA2:
|
||||
case ES10B_BPP_COMMAND_ID_REPLACE_SESSION_KEYS:
|
||||
case ES10B_BPP_COMMAND_ID_LOAD_PROFILE_ELEMENTS:
|
||||
result->bppCommandId = tmpint;
|
||||
break;
|
||||
default:
|
||||
result->bppCommandId = ES10B_BPP_COMMAND_ID_UNDEFINED;
|
||||
break;
|
||||
}
|
||||
break;
|
||||
default:
|
||||
result->bppCommandId = ES10B_BPP_COMMAND_ID_UNDEFINED;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (euicc_derutil_unpack_find_tag(&tmpnode, 0x81, n_finalResult.value, n_finalResult.length) == 0) // errorReason
|
||||
{
|
||||
int errorReason;
|
||||
|
||||
errorReason = euicc_derutil_convert_bin2long(tmpnode.value, tmpnode.length);
|
||||
|
||||
switch (errorReason)
|
||||
{
|
||||
case ES10B_ERROR_REASON_INCORRECT_INPUT_VALUES:
|
||||
case ES10B_ERROR_REASON_INVALID_SIGNATURE:
|
||||
case ES10B_ERROR_REASON_INVALID_TRANSACTION_ID:
|
||||
case ES10B_ERROR_REASON_UNSUPPORTED_CRT_VALUES:
|
||||
case ES10B_ERROR_REASON_UNSUPPORTED_REMOTE_OPERATION_TYPE:
|
||||
case ES10B_ERROR_REASON_UNSUPPORTED_PROFILE_CLASS:
|
||||
case ES10B_ERROR_REASON_SCP03T_STRUCTURE_ERROR:
|
||||
case ES10B_ERROR_REASON_SCP03T_SECURITY_ERROR:
|
||||
case ES10B_ERROR_REASON_INSTALL_FAILED_DUE_TO_ICCID_ALREADY_EXISTS_ON_EUICC:
|
||||
case ES10B_ERROR_REASON_INSTALL_FAILED_DUE_TO_INSUFFICIENT_MEMORY_FOR_PROFILE:
|
||||
case ES10B_ERROR_REASON_INSTALL_FAILED_DUE_TO_INTERRUPTION:
|
||||
case ES10B_ERROR_REASON_INSTALL_FAILED_DUE_TO_PE_PROCESSING_ERROR:
|
||||
case ES10B_ERROR_REASON_INSTALL_FAILED_DUE_TO_ICCID_MISMATCH:
|
||||
case ES10B_ERROR_REASON_TEST_PROFILE_INSTALL_FAILED_DUE_TO_INVALID_NAA_KEY:
|
||||
case ES10B_ERROR_REASON_PPR_NOT_ALLOWED:
|
||||
case ES10B_ERROR_REASON_INSTALL_FAILED_DUE_TO_UNKNOWN_ERROR:
|
||||
result->errorReason = errorReason;
|
||||
break;
|
||||
default:
|
||||
result->errorReason = ES10B_ERROR_REASON_UNDEFINED;
|
||||
case 0x81:
|
||||
tmpint = euicc_derutil_convert_bin2long(tmpnode.value, tmpnode.length);
|
||||
switch (tmpint)
|
||||
{
|
||||
case ES10B_ERROR_REASON_INCORRECT_INPUT_VALUES:
|
||||
case ES10B_ERROR_REASON_INVALID_SIGNATURE:
|
||||
case ES10B_ERROR_REASON_INVALID_TRANSACTION_ID:
|
||||
case ES10B_ERROR_REASON_UNSUPPORTED_CRT_VALUES:
|
||||
case ES10B_ERROR_REASON_UNSUPPORTED_REMOTE_OPERATION_TYPE:
|
||||
case ES10B_ERROR_REASON_UNSUPPORTED_PROFILE_CLASS:
|
||||
case ES10B_ERROR_REASON_SCP03T_STRUCTURE_ERROR:
|
||||
case ES10B_ERROR_REASON_SCP03T_SECURITY_ERROR:
|
||||
case ES10B_ERROR_REASON_INSTALL_FAILED_DUE_TO_ICCID_ALREADY_EXISTS_ON_EUICC:
|
||||
case ES10B_ERROR_REASON_INSTALL_FAILED_DUE_TO_INSUFFICIENT_MEMORY_FOR_PROFILE:
|
||||
case ES10B_ERROR_REASON_INSTALL_FAILED_DUE_TO_INTERRUPTION:
|
||||
case ES10B_ERROR_REASON_INSTALL_FAILED_DUE_TO_PE_PROCESSING_ERROR:
|
||||
case ES10B_ERROR_REASON_INSTALL_FAILED_DUE_TO_ICCID_MISMATCH:
|
||||
case ES10B_ERROR_REASON_TEST_PROFILE_INSTALL_FAILED_DUE_TO_INVALID_NAA_KEY:
|
||||
case ES10B_ERROR_REASON_PPR_NOT_ALLOWED:
|
||||
case ES10B_ERROR_REASON_INSTALL_FAILED_DUE_TO_UNKNOWN_ERROR:
|
||||
result->errorReason = tmpint;
|
||||
break;
|
||||
default:
|
||||
result->errorReason = ES10B_ERROR_REASON_UNDEFINED;
|
||||
break;
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
@ -295,7 +293,7 @@ exit:
|
|||
return fret;
|
||||
}
|
||||
|
||||
int es10b_LoadBoundProfilePackage(struct euicc_ctx *ctx, struct es10b_load_bound_profile_package_result *result, const char *b64_BoundProfilePackage)
|
||||
int es10b_load_bound_profile_package(struct euicc_ctx *ctx, struct es10b_load_bound_profile_package_result *result, const char *b64_BoundProfilePackage)
|
||||
{
|
||||
int fret = 0;
|
||||
|
||||
|
@ -423,7 +421,7 @@ exit:
|
|||
return fret;
|
||||
}
|
||||
|
||||
int es10b_GetEUICCChallenge(struct euicc_ctx *ctx, char **b64_euiccChallenge)
|
||||
int es10b_get_euicc_challenge(struct euicc_ctx *ctx, char **b64_euiccChallenge)
|
||||
{
|
||||
int fret = 0;
|
||||
struct derutils_node n_request = {
|
||||
|
@ -478,7 +476,7 @@ exit:
|
|||
return fret;
|
||||
}
|
||||
|
||||
int es10b_GetEUICCInfo(struct euicc_ctx *ctx, char **b64_EUICCInfo1)
|
||||
int es10b_get_euicc_info(struct euicc_ctx *ctx, char **b64_EUICCInfo1)
|
||||
{
|
||||
int fret = 0;
|
||||
struct derutils_node n_request = {
|
||||
|
@ -528,7 +526,7 @@ exit:
|
|||
return fret;
|
||||
}
|
||||
|
||||
int es10b_ListNotification(struct euicc_ctx *ctx, struct es10b_notification_metadata_list **notificationMetadataList)
|
||||
int es10b_list_notification(struct euicc_ctx *ctx, struct es10b_notification_metadata_list **notificationMetadataList)
|
||||
{
|
||||
int fret = 0;
|
||||
struct derutils_node n_request = {
|
||||
|
@ -657,7 +655,7 @@ exit:
|
|||
return fret;
|
||||
}
|
||||
|
||||
int es10b_RetrieveNotificationsList(struct euicc_ctx *ctx, struct es10b_pending_notification *PendingNotification, unsigned long seqNumber)
|
||||
int es10b_retrieve_notifications_list(struct euicc_ctx *ctx, struct es10b_pending_notification *PendingNotification, unsigned long seqNumber)
|
||||
{
|
||||
int fret = 0;
|
||||
uint8_t seqNumber_buf[sizeof(seqNumber)];
|
||||
|
@ -774,7 +772,7 @@ exit:
|
|||
return fret;
|
||||
}
|
||||
|
||||
int es10b_RemoveNotificationFromList(struct euicc_ctx *ctx, unsigned long seqNumber)
|
||||
int es10b_remove_notification_from_list(struct euicc_ctx *ctx, unsigned long seqNumber)
|
||||
{
|
||||
int fret = 0;
|
||||
uint8_t seqNumber_buf[sizeof(seqNumber)];
|
||||
|
@ -835,7 +833,7 @@ exit:
|
|||
return fret;
|
||||
}
|
||||
|
||||
int es10b_AuthenticateServer(struct euicc_ctx *ctx, char **b64_AuthenticateServerResponse, struct es10b_authenticate_server_param *param)
|
||||
int es10b_authenticate_server(struct euicc_ctx *ctx, char **b64_AuthenticateServerResponse, struct es10b_authenticate_server_param *param)
|
||||
{
|
||||
int fret = 0;
|
||||
uint8_t *reqbuf = NULL;
|
||||
|
@ -1032,7 +1030,7 @@ exit:
|
|||
return fret;
|
||||
}
|
||||
|
||||
int es10b_CancelSession(struct euicc_ctx *ctx, char **b64_CancelSessionResponse, struct es10b_cancel_session_param *param)
|
||||
int es10b_cancel_session(struct euicc_ctx *ctx, char **b64_CancelSessionResponse, struct es10b_cancel_session_param *param)
|
||||
{
|
||||
return -1;
|
||||
}
|
||||
|
|
|
@ -101,15 +101,15 @@ struct es10b_cancel_session_param
|
|||
} reason;
|
||||
};
|
||||
|
||||
int es10b_PrepareDownload(struct euicc_ctx *ctx, char **b64_PrepareDownloadResponse, struct es10b_prepare_download_param *param);
|
||||
int es10b_LoadBoundProfilePackage(struct euicc_ctx *ctx, struct es10b_load_bound_profile_package_result *result, const char *b64_BoundProfilePackage);
|
||||
int es10b_GetEUICCChallenge(struct euicc_ctx *ctx, char **b64_euiccChallenge);
|
||||
int es10b_GetEUICCInfo(struct euicc_ctx *ctx, char **b64_EUICCInfo1);
|
||||
int es10b_ListNotification(struct euicc_ctx *ctx, struct es10b_notification_metadata_list **notificationMetadataList);
|
||||
int es10b_RetrieveNotificationsList(struct euicc_ctx *ctx, struct es10b_pending_notification *PendingNotification, unsigned long seqNumber);
|
||||
int es10b_RemoveNotificationFromList(struct euicc_ctx *ctx, unsigned long seqNumber);
|
||||
int es10b_AuthenticateServer(struct euicc_ctx *ctx, char **b64_AuthenticateServerResponse, struct es10b_authenticate_server_param *param);
|
||||
int es10b_CancelSession(struct euicc_ctx *ctx, char **b64_CancelSessionResponse, struct es10b_cancel_session_param *param);
|
||||
int es10b_prepare_download(struct euicc_ctx *ctx, char **b64_PrepareDownloadResponse, struct es10b_prepare_download_param *param);
|
||||
int es10b_load_bound_profile_package(struct euicc_ctx *ctx, struct es10b_load_bound_profile_package_result *result, const char *b64_BoundProfilePackage);
|
||||
int es10b_get_euicc_challenge(struct euicc_ctx *ctx, char **b64_euiccChallenge);
|
||||
int es10b_get_euicc_info(struct euicc_ctx *ctx, char **b64_EUICCInfo1);
|
||||
int es10b_list_notification(struct euicc_ctx *ctx, struct es10b_notification_metadata_list **notificationMetadataList);
|
||||
int es10b_retrieve_notifications_list(struct euicc_ctx *ctx, struct es10b_pending_notification *PendingNotification, unsigned long seqNumber);
|
||||
int es10b_remove_notification_from_list(struct euicc_ctx *ctx, unsigned long seqNumber);
|
||||
int es10b_authenticate_server(struct euicc_ctx *ctx, char **b64_AuthenticateServerResponse, struct es10b_authenticate_server_param *param);
|
||||
int es10b_cancel_session(struct euicc_ctx *ctx, char **b64_CancelSessionResponse, struct es10b_cancel_session_param *param);
|
||||
|
||||
void es10b_notification_metadata_free_all(struct es10b_notification_metadata_list *notificationMetadataList);
|
||||
void es10b_notification_free(struct es10b_pending_notification *PendingNotification);
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
#include <unistd.h>
|
||||
#include <string.h>
|
||||
|
||||
int es10c_GetProfilesInfo(struct euicc_ctx *ctx, struct es10c_profile_info_list **profileInfoList)
|
||||
int es10c_get_profiles_info(struct euicc_ctx *ctx, struct es10c_profile_info_list **profileInfoList)
|
||||
{
|
||||
int fret = 0;
|
||||
struct derutils_node n_request = {
|
||||
|
@ -297,7 +297,7 @@ exit:
|
|||
return fret;
|
||||
}
|
||||
|
||||
int es10c_EnableProfile(struct euicc_ctx *ctx, const char *id, unsigned char refreshFlag)
|
||||
int es10c_enable_profile(struct euicc_ctx *ctx, const char *id, unsigned char refreshFlag)
|
||||
{
|
||||
if (refreshFlag)
|
||||
{
|
||||
|
@ -310,7 +310,7 @@ int es10c_EnableProfile(struct euicc_ctx *ctx, const char *id, unsigned char ref
|
|||
return es10c_enable_disable_delete_profile(ctx, 0xBF31, id, refreshFlag);
|
||||
}
|
||||
|
||||
int es10c_DisableProfile(struct euicc_ctx *ctx, const char *id, unsigned char refreshFlag)
|
||||
int es10c_disable_profile(struct euicc_ctx *ctx, const char *id, unsigned char refreshFlag)
|
||||
{
|
||||
if (refreshFlag)
|
||||
{
|
||||
|
@ -323,12 +323,12 @@ int es10c_DisableProfile(struct euicc_ctx *ctx, const char *id, unsigned char re
|
|||
return es10c_enable_disable_delete_profile(ctx, 0xBF32, id, refreshFlag);
|
||||
}
|
||||
|
||||
int es10c_DeleteProfile(struct euicc_ctx *ctx, const char *id)
|
||||
int es10c_delete_profile(struct euicc_ctx *ctx, const char *id)
|
||||
{
|
||||
return es10c_enable_disable_delete_profile(ctx, 0xBF33, id, 0);
|
||||
}
|
||||
|
||||
int es10c_eUICCMemoryReset(struct euicc_ctx *ctx)
|
||||
int es10c_euicc_memory_reset(struct euicc_ctx *ctx)
|
||||
{
|
||||
int fret = 0;
|
||||
uint8_t resetOptions[2];
|
||||
|
@ -386,7 +386,7 @@ exit:
|
|||
return fret;
|
||||
}
|
||||
|
||||
int es10c_GetEID(struct euicc_ctx *ctx, char **eidValue)
|
||||
int es10c_get_eid(struct euicc_ctx *ctx, char **eidValue)
|
||||
{
|
||||
int fret = 0;
|
||||
struct derutils_node n_request = {
|
||||
|
@ -446,7 +446,7 @@ exit:
|
|||
return fret;
|
||||
}
|
||||
|
||||
int es10c_SetNickname(struct euicc_ctx *ctx, const char *iccid, const char *profileNickname)
|
||||
int es10c_set_nickname(struct euicc_ctx *ctx, const char *iccid, const char *profileNickname)
|
||||
{
|
||||
int fret = 0;
|
||||
uint8_t asn1iccid[10];
|
||||
|
|
|
@ -58,12 +58,12 @@ struct es10c_profile_info_list
|
|||
struct es10c_profile_info_list *next;
|
||||
};
|
||||
|
||||
int es10c_GetProfilesInfo(struct euicc_ctx *ctx, struct es10c_profile_info_list **profileInfoList);
|
||||
int es10c_EnableProfile(struct euicc_ctx *ctx, const char *id, unsigned char refreshFlag);
|
||||
int es10c_DisableProfile(struct euicc_ctx *ctx, const char *id, unsigned char refreshFlag);
|
||||
int es10c_DeleteProfile(struct euicc_ctx *ctx, const char *id);
|
||||
int es10c_eUICCMemoryReset(struct euicc_ctx *ctx);
|
||||
int es10c_GetEID(struct euicc_ctx *ctx, char **eidValue);
|
||||
int es10c_SetNickname(struct euicc_ctx *ctx, const char *iccid, const char *profileNickname);
|
||||
int es10c_get_profiles_info(struct euicc_ctx *ctx, struct es10c_profile_info_list **profileInfoList);
|
||||
int es10c_enable_profile(struct euicc_ctx *ctx, const char *id, unsigned char refreshFlag);
|
||||
int es10c_disable_profile(struct euicc_ctx *ctx, const char *id, unsigned char refreshFlag);
|
||||
int es10c_delete_profile(struct euicc_ctx *ctx, const char *id);
|
||||
int es10c_euicc_memory_reset(struct euicc_ctx *ctx);
|
||||
int es10c_get_eid(struct euicc_ctx *ctx, char **eidValue);
|
||||
int es10c_set_nickname(struct euicc_ctx *ctx, const char *iccid, const char *profileNickname);
|
||||
|
||||
void es10c_profile_info_free_all(struct es10c_profile_info_list *profileInfoList);
|
||||
|
|
108
euicc/es10c_ex.c
108
euicc/es10c_ex.c
|
@ -18,7 +18,7 @@ static int _versiontype2str(char **out, const uint8_t *buffer, uint8_t buffer_le
|
|||
return asprintf(out, "%d.%d.%d", buffer[0], buffer[1], buffer[2]);
|
||||
}
|
||||
|
||||
int es10c_ex_get_euiccinfo2(struct euicc_ctx *ctx, struct es10c_ex_euiccinfo2 **euiccinfo2)
|
||||
int es10c_ex_get_euiccinfo2(struct euicc_ctx *ctx, struct es10c_ex_euiccinfo2 *euiccinfo2)
|
||||
{
|
||||
int fret = 0;
|
||||
struct derutils_node n_request = {
|
||||
|
@ -30,7 +30,7 @@ int es10c_ex_get_euiccinfo2(struct euicc_ctx *ctx, struct es10c_ex_euiccinfo2 **
|
|||
|
||||
struct derutils_node tmpnode, tmpchidnode, n_EUICCInfo2;
|
||||
|
||||
*euiccinfo2 = NULL;
|
||||
memset(euiccinfo2, 0, sizeof(struct es10c_ex_euiccinfo2));
|
||||
|
||||
reqlen = sizeof(ctx->apdu_request_buffer.body);
|
||||
if (euicc_derutil_pack(ctx->apdu_request_buffer.body, &reqlen, &n_request) < 0)
|
||||
|
@ -48,13 +48,6 @@ int es10c_ex_get_euiccinfo2(struct euicc_ctx *ctx, struct es10c_ex_euiccinfo2 **
|
|||
goto err;
|
||||
}
|
||||
|
||||
*euiccinfo2 = malloc(sizeof(struct es10c_ex_euiccinfo2));
|
||||
if (!*euiccinfo2)
|
||||
{
|
||||
goto err;
|
||||
}
|
||||
memset(*euiccinfo2, 0, sizeof(struct es10c_ex_euiccinfo2));
|
||||
|
||||
tmpnode.self.ptr = n_EUICCInfo2.value;
|
||||
tmpnode.self.length = 0;
|
||||
while (euicc_derutil_unpack_next(&tmpnode, &tmpnode, n_EUICCInfo2.value, n_EUICCInfo2.length) == 0)
|
||||
|
@ -62,13 +55,13 @@ int es10c_ex_get_euiccinfo2(struct euicc_ctx *ctx, struct es10c_ex_euiccinfo2 **
|
|||
switch (tmpnode.tag)
|
||||
{
|
||||
case 0x81: // profileVersion
|
||||
_versiontype2str(&(*euiccinfo2)->profileVersion, tmpnode.value, tmpnode.length);
|
||||
_versiontype2str(&euiccinfo2->profileVersion, tmpnode.value, tmpnode.length);
|
||||
break;
|
||||
case 0x82: // svn
|
||||
_versiontype2str(&(*euiccinfo2)->svn, tmpnode.value, tmpnode.length);
|
||||
_versiontype2str(&euiccinfo2->svn, tmpnode.value, tmpnode.length);
|
||||
break;
|
||||
case 0x83: // euiccFirmwareVer
|
||||
_versiontype2str(&(*euiccinfo2)->euiccFirmwareVer, tmpnode.value, tmpnode.length);
|
||||
_versiontype2str(&euiccinfo2->euiccFirmwareVer, tmpnode.value, tmpnode.length);
|
||||
break;
|
||||
case 0x84: // extCardResource
|
||||
tmpchidnode.self.ptr = tmpnode.value;
|
||||
|
@ -78,13 +71,13 @@ int es10c_ex_get_euiccinfo2(struct euicc_ctx *ctx, struct es10c_ex_euiccinfo2 **
|
|||
switch (tmpchidnode.tag)
|
||||
{
|
||||
case 0x81:
|
||||
(*euiccinfo2)->extCardResource.installedApplication = euicc_derutil_convert_bin2long(tmpchidnode.value, tmpchidnode.length);
|
||||
euiccinfo2->extCardResource.installedApplication = euicc_derutil_convert_bin2long(tmpchidnode.value, tmpchidnode.length);
|
||||
break;
|
||||
case 0x82:
|
||||
(*euiccinfo2)->extCardResource.freeNonVolatileMemory = euicc_derutil_convert_bin2long(tmpchidnode.value, tmpchidnode.length);
|
||||
euiccinfo2->extCardResource.freeNonVolatileMemory = euicc_derutil_convert_bin2long(tmpchidnode.value, tmpchidnode.length);
|
||||
break;
|
||||
case 0x83:
|
||||
(*euiccinfo2)->extCardResource.freeVolatileMemory = euicc_derutil_convert_bin2long(tmpchidnode.value, tmpchidnode.length);
|
||||
euiccinfo2->extCardResource.freeVolatileMemory = euicc_derutil_convert_bin2long(tmpchidnode.value, tmpchidnode.length);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
@ -93,23 +86,23 @@ int es10c_ex_get_euiccinfo2(struct euicc_ctx *ctx, struct es10c_ex_euiccinfo2 **
|
|||
{
|
||||
static const char *desc[] = {"contactlessSupport", "usimSupport", "isimSupport", "csimSupport", "akaMilenage", "akaCave", "akaTuak128", "akaTuak256", "rfu1", "rfu2", "gbaAuthenUsim", "gbaAuthenISim", "mbmsAuthenUsim", "eapClient", "javacard", "multos", "multipleUsimSupport", "multipleIsimSupport", "multipleCsimSupport"};
|
||||
|
||||
if (euicc_derutil_convert_bin2bits_str(&(*euiccinfo2)->uiccCapability, tmpnode.value, tmpnode.length, desc))
|
||||
if (euicc_derutil_convert_bin2bits_str(&euiccinfo2->uiccCapability, tmpnode.value, tmpnode.length, desc))
|
||||
{
|
||||
goto err;
|
||||
}
|
||||
}
|
||||
break;
|
||||
case 0x86: // javacardVersion
|
||||
_versiontype2str(&(*euiccinfo2)->javacardVersion, tmpnode.value, tmpnode.length);
|
||||
_versiontype2str(&euiccinfo2->javacardVersion, tmpnode.value, tmpnode.length);
|
||||
break;
|
||||
case 0x87: // globalplatformVersion
|
||||
_versiontype2str(&(*euiccinfo2)->globalplatformVersion, tmpnode.value, tmpnode.length);
|
||||
_versiontype2str(&euiccinfo2->globalplatformVersion, tmpnode.value, tmpnode.length);
|
||||
break;
|
||||
case 0x88: // rspCapability
|
||||
{
|
||||
static const char *desc[] = {"additionalProfile", "crlSupport", "rpmSupport", "testProfileSupport"};
|
||||
|
||||
if (euicc_derutil_convert_bin2bits_str(&(*euiccinfo2)->rspCapability, tmpnode.value, tmpnode.length, desc))
|
||||
if (euicc_derutil_convert_bin2bits_str(&euiccinfo2->rspCapability, tmpnode.value, tmpnode.length, desc))
|
||||
{
|
||||
goto err;
|
||||
}
|
||||
|
@ -127,25 +120,25 @@ int es10c_ex_get_euiccinfo2(struct euicc_ctx *ctx, struct es10c_ex_euiccinfo2 **
|
|||
count++;
|
||||
}
|
||||
|
||||
(*euiccinfo2)->euiccCiPKIdListForVerification = malloc((count + 1) * sizeof(char *));
|
||||
if (!(*euiccinfo2)->euiccCiPKIdListForVerification)
|
||||
euiccinfo2->euiccCiPKIdListForVerification = malloc((count + 1) * sizeof(char *));
|
||||
if (!euiccinfo2->euiccCiPKIdListForVerification)
|
||||
{
|
||||
goto err;
|
||||
}
|
||||
memset((*euiccinfo2)->euiccCiPKIdListForVerification, 0, (count + 1) * sizeof(char *));
|
||||
memset(euiccinfo2->euiccCiPKIdListForVerification, 0, (count + 1) * sizeof(char *));
|
||||
|
||||
tmpchidnode.self.ptr = tmpnode.value;
|
||||
tmpchidnode.self.length = 0;
|
||||
count = 0;
|
||||
while (euicc_derutil_unpack_next(&tmpchidnode, &tmpchidnode, tmpnode.value, tmpnode.length) == 0)
|
||||
{
|
||||
(*euiccinfo2)->euiccCiPKIdListForVerification[count] = malloc((tmpchidnode.length * 2 + 1) * sizeof(char));
|
||||
if (!(*euiccinfo2)->euiccCiPKIdListForVerification[count])
|
||||
euiccinfo2->euiccCiPKIdListForVerification[count] = malloc((tmpchidnode.length * 2 + 1) * sizeof(char));
|
||||
if (!euiccinfo2->euiccCiPKIdListForVerification[count])
|
||||
{
|
||||
goto err;
|
||||
}
|
||||
|
||||
euicc_hexutil_bin2hex((*euiccinfo2)->euiccCiPKIdListForVerification[count], tmpchidnode.length * 2 + 1,
|
||||
euicc_hexutil_bin2hex(euiccinfo2->euiccCiPKIdListForVerification[count], tmpchidnode.length * 2 + 1,
|
||||
tmpchidnode.value, tmpchidnode.length);
|
||||
count++;
|
||||
}
|
||||
|
@ -163,25 +156,25 @@ int es10c_ex_get_euiccinfo2(struct euicc_ctx *ctx, struct es10c_ex_euiccinfo2 **
|
|||
count++;
|
||||
}
|
||||
|
||||
(*euiccinfo2)->euiccCiPKIdListForSigning = malloc((count + 1) * sizeof(char *));
|
||||
if (!(*euiccinfo2)->euiccCiPKIdListForSigning)
|
||||
euiccinfo2->euiccCiPKIdListForSigning = malloc((count + 1) * sizeof(char *));
|
||||
if (!euiccinfo2->euiccCiPKIdListForSigning)
|
||||
{
|
||||
goto err;
|
||||
}
|
||||
memset((*euiccinfo2)->euiccCiPKIdListForSigning, 0, (count + 1) * sizeof(char *));
|
||||
memset(euiccinfo2->euiccCiPKIdListForSigning, 0, (count + 1) * sizeof(char *));
|
||||
|
||||
tmpchidnode.self.ptr = tmpnode.value;
|
||||
tmpchidnode.self.length = 0;
|
||||
count = 0;
|
||||
while (euicc_derutil_unpack_next(&tmpchidnode, &tmpchidnode, tmpnode.value, tmpnode.length) == 0)
|
||||
{
|
||||
(*euiccinfo2)->euiccCiPKIdListForSigning[count] = malloc((tmpchidnode.length * 2 + 1) * sizeof(char));
|
||||
if (!(*euiccinfo2)->euiccCiPKIdListForSigning[count])
|
||||
euiccinfo2->euiccCiPKIdListForSigning[count] = malloc((tmpchidnode.length * 2 + 1) * sizeof(char));
|
||||
if (!euiccinfo2->euiccCiPKIdListForSigning[count])
|
||||
{
|
||||
goto err;
|
||||
}
|
||||
|
||||
euicc_hexutil_bin2hex((*euiccinfo2)->euiccCiPKIdListForSigning[count], tmpchidnode.length * 2 + 1,
|
||||
euicc_hexutil_bin2hex(euiccinfo2->euiccCiPKIdListForSigning[count], tmpchidnode.length * 2 + 1,
|
||||
tmpchidnode.value, tmpchidnode.length);
|
||||
count++;
|
||||
}
|
||||
|
@ -192,17 +185,17 @@ int es10c_ex_get_euiccinfo2(struct euicc_ctx *ctx, struct es10c_ex_euiccinfo2 **
|
|||
switch (euicc_derutil_convert_bin2long(tmpnode.value, tmpnode.length))
|
||||
{
|
||||
case 1:
|
||||
(*euiccinfo2)->euiccCategory = "basicEuicc";
|
||||
euiccinfo2->euiccCategory = "basicEuicc";
|
||||
break;
|
||||
case 2:
|
||||
(*euiccinfo2)->euiccCategory = "mediumEuicc";
|
||||
euiccinfo2->euiccCategory = "mediumEuicc";
|
||||
break;
|
||||
case 3:
|
||||
(*euiccinfo2)->euiccCategory = "contactlessEuicc";
|
||||
euiccinfo2->euiccCategory = "contactlessEuicc";
|
||||
break;
|
||||
case 0:
|
||||
default:
|
||||
(*euiccinfo2)->euiccCategory = "other";
|
||||
euiccinfo2->euiccCategory = "other";
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
@ -210,23 +203,23 @@ int es10c_ex_get_euiccinfo2(struct euicc_ctx *ctx, struct es10c_ex_euiccinfo2 **
|
|||
{
|
||||
static const char *desc[] = {"pprUpdateControl", "ppr1", "ppr2", "ppr3"};
|
||||
|
||||
if (euicc_derutil_convert_bin2bits_str(&(*euiccinfo2)->forbiddenProfilePolicyRules, tmpnode.value, tmpnode.length, desc))
|
||||
if (euicc_derutil_convert_bin2bits_str(&euiccinfo2->forbiddenProfilePolicyRules, tmpnode.value, tmpnode.length, desc))
|
||||
{
|
||||
goto err;
|
||||
}
|
||||
}
|
||||
break;
|
||||
case 0x04: // ppVersion
|
||||
_versiontype2str(&(*euiccinfo2)->ppVersion, tmpnode.value, tmpnode.length);
|
||||
_versiontype2str(&euiccinfo2->ppVersion, tmpnode.value, tmpnode.length);
|
||||
break;
|
||||
case 0x0C: // sasAcreditationNumber
|
||||
(*euiccinfo2)->sasAcreditationNumber = malloc(tmpnode.length + 1);
|
||||
if (!(*euiccinfo2)->sasAcreditationNumber)
|
||||
euiccinfo2->sasAcreditationNumber = malloc(tmpnode.length + 1);
|
||||
if (!euiccinfo2->sasAcreditationNumber)
|
||||
{
|
||||
goto err;
|
||||
}
|
||||
memcpy((*euiccinfo2)->sasAcreditationNumber, tmpnode.value, tmpnode.length);
|
||||
(*euiccinfo2)->sasAcreditationNumber[tmpnode.length] = 0;
|
||||
memcpy(euiccinfo2->sasAcreditationNumber, tmpnode.value, tmpnode.length);
|
||||
euiccinfo2->sasAcreditationNumber[tmpnode.length] = 0;
|
||||
break;
|
||||
case 0xAC: // certificationDataObject
|
||||
tmpchidnode.self.ptr = tmpnode.value;
|
||||
|
@ -236,22 +229,22 @@ int es10c_ex_get_euiccinfo2(struct euicc_ctx *ctx, struct es10c_ex_euiccinfo2 **
|
|||
switch (tmpchidnode.tag)
|
||||
{
|
||||
case 0x80:
|
||||
(*euiccinfo2)->certificationDataObject.platformLabel = malloc(tmpchidnode.length + 1);
|
||||
if (!(*euiccinfo2)->certificationDataObject.platformLabel)
|
||||
euiccinfo2->certificationDataObject.platformLabel = malloc(tmpchidnode.length + 1);
|
||||
if (!euiccinfo2->certificationDataObject.platformLabel)
|
||||
{
|
||||
goto err;
|
||||
}
|
||||
memcpy((*euiccinfo2)->certificationDataObject.platformLabel, tmpchidnode.value, tmpchidnode.length);
|
||||
(*euiccinfo2)->certificationDataObject.platformLabel[tmpchidnode.length] = 0;
|
||||
memcpy(euiccinfo2->certificationDataObject.platformLabel, tmpchidnode.value, tmpchidnode.length);
|
||||
euiccinfo2->certificationDataObject.platformLabel[tmpchidnode.length] = 0;
|
||||
break;
|
||||
case 0x81:
|
||||
(*euiccinfo2)->certificationDataObject.discoveryBaseURL = malloc(tmpchidnode.length + 1);
|
||||
if (!(*euiccinfo2)->certificationDataObject.discoveryBaseURL)
|
||||
euiccinfo2->certificationDataObject.discoveryBaseURL = malloc(tmpchidnode.length + 1);
|
||||
if (!euiccinfo2->certificationDataObject.discoveryBaseURL)
|
||||
{
|
||||
goto err;
|
||||
}
|
||||
memcpy((*euiccinfo2)->certificationDataObject.discoveryBaseURL, tmpchidnode.value, tmpchidnode.length);
|
||||
(*euiccinfo2)->certificationDataObject.discoveryBaseURL[tmpchidnode.length] = 0;
|
||||
memcpy(euiccinfo2->certificationDataObject.discoveryBaseURL, tmpchidnode.value, tmpchidnode.length);
|
||||
euiccinfo2->certificationDataObject.discoveryBaseURL[tmpchidnode.length] = 0;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
@ -264,7 +257,7 @@ int es10c_ex_get_euiccinfo2(struct euicc_ctx *ctx, struct es10c_ex_euiccinfo2 **
|
|||
|
||||
err:
|
||||
fret = -1;
|
||||
es10c_ex_euiccinfo2_free(*euiccinfo2);
|
||||
es10c_ex_euiccinfo2_free(euiccinfo2);
|
||||
exit:
|
||||
free(respbuf);
|
||||
respbuf = NULL;
|
||||
|
@ -278,6 +271,13 @@ void es10c_ex_euiccinfo2_free(struct es10c_ex_euiccinfo2 *euiccinfo2)
|
|||
return;
|
||||
}
|
||||
|
||||
free(euiccinfo2->profileVersion);
|
||||
free(euiccinfo2->svn);
|
||||
free(euiccinfo2->euiccFirmwareVer);
|
||||
free(euiccinfo2->uiccCapability);
|
||||
free(euiccinfo2->javacardVersion);
|
||||
free(euiccinfo2->globalplatformVersion);
|
||||
free(euiccinfo2->rspCapability);
|
||||
if (euiccinfo2->euiccCiPKIdListForVerification)
|
||||
{
|
||||
for (int i = 0; euiccinfo2->euiccCiPKIdListForVerification[i] != NULL; i++)
|
||||
|
@ -286,7 +286,6 @@ void es10c_ex_euiccinfo2_free(struct es10c_ex_euiccinfo2 *euiccinfo2)
|
|||
}
|
||||
free(euiccinfo2->euiccCiPKIdListForVerification);
|
||||
}
|
||||
|
||||
if (euiccinfo2->euiccCiPKIdListForSigning)
|
||||
{
|
||||
for (int i = 0; euiccinfo2->euiccCiPKIdListForSigning[i] != NULL; i++)
|
||||
|
@ -295,12 +294,9 @@ void es10c_ex_euiccinfo2_free(struct es10c_ex_euiccinfo2 *euiccinfo2)
|
|||
}
|
||||
free(euiccinfo2->euiccCiPKIdListForSigning);
|
||||
}
|
||||
|
||||
free(euiccinfo2->uiccCapability);
|
||||
free(euiccinfo2->rspCapability);
|
||||
free(euiccinfo2->forbiddenProfilePolicyRules);
|
||||
free(euiccinfo2->ppVersion);
|
||||
free(euiccinfo2->sasAcreditationNumber);
|
||||
free(euiccinfo2->certificationDataObject.discoveryBaseURL);
|
||||
free(euiccinfo2->certificationDataObject.platformLabel);
|
||||
|
||||
free(euiccinfo2);
|
||||
}
|
||||
|
|
|
@ -30,5 +30,5 @@ struct es10c_ex_euiccinfo2
|
|||
} certificationDataObject;
|
||||
};
|
||||
|
||||
int es10c_ex_get_euiccinfo2(struct euicc_ctx *ctx, struct es10c_ex_euiccinfo2 **euiccinfo2);
|
||||
int es10c_ex_get_euiccinfo2(struct euicc_ctx *ctx, struct es10c_ex_euiccinfo2 *euiccinfo2);
|
||||
void es10c_ex_euiccinfo2_free(struct es10c_ex_euiccinfo2 *euiccinfo2);
|
||||
|
|
12
euicc/es9p.c
12
euicc/es9p.c
|
@ -248,7 +248,7 @@ exit:
|
|||
return fret;
|
||||
}
|
||||
|
||||
int es9p_InitiateAuthentication(struct es9p_ctx *ctx, struct es10b_authenticate_server_param *resp, const char *b64_euiccChallenge, const char *b64_EUICCInfo1)
|
||||
int es9p_initiate_authentication(struct es9p_ctx *ctx, struct es10b_authenticate_server_param *resp, const char *b64_euiccChallenge, const char *b64_EUICCInfo1)
|
||||
{
|
||||
const char *ikey[] = {"smdpAddress", "euiccChallenge", "euiccInfo1", NULL};
|
||||
const char *idata[] = {ctx->address, b64_euiccChallenge, b64_EUICCInfo1, NULL};
|
||||
|
@ -259,7 +259,7 @@ int es9p_InitiateAuthentication(struct es9p_ctx *ctx, struct es10b_authenticate_
|
|||
return es9p_trans_json(ctx, ctx->address, "/gsma/rsp2/es9plus/initiateAuthentication", ikey, idata, okey, oobj, optr);
|
||||
}
|
||||
|
||||
int es9p_GetBoundProfilePackage(struct es9p_ctx *ctx, char **b64_BoundProfilePackage, const char *b64_PrepareDownloadResponse)
|
||||
int es9p_get_bound_profile_package(struct es9p_ctx *ctx, char **b64_BoundProfilePackage, const char *b64_PrepareDownloadResponse)
|
||||
{
|
||||
const char *ikey[] = {"transactionId", "prepareDownloadResponse", NULL};
|
||||
const char *idata[] = {ctx->transactionId, b64_PrepareDownloadResponse, NULL};
|
||||
|
@ -270,7 +270,7 @@ int es9p_GetBoundProfilePackage(struct es9p_ctx *ctx, char **b64_BoundProfilePac
|
|||
return es9p_trans_json(ctx, ctx->address, "/gsma/rsp2/es9plus/getBoundProfilePackage", ikey, idata, okey, oobj, optr);
|
||||
}
|
||||
|
||||
int es9p_AuthenticateClient(struct es9p_ctx *ctx, struct es10b_prepare_download_param *resp, const char *b64_AuthenticateServerResponse)
|
||||
int es9p_authenticate_client(struct es9p_ctx *ctx, struct es10b_prepare_download_param *resp, const char *b64_AuthenticateServerResponse)
|
||||
{
|
||||
const char *ikey[] = {"transactionId", "authenticateServerResponse", NULL};
|
||||
const char *idata[] = {ctx->transactionId, b64_AuthenticateServerResponse, NULL};
|
||||
|
@ -281,7 +281,7 @@ int es9p_AuthenticateClient(struct es9p_ctx *ctx, struct es10b_prepare_download_
|
|||
return es9p_trans_json(ctx, ctx->address, "/gsma/rsp2/es9plus/authenticateClient", ikey, idata, okey, oobj, optr);
|
||||
}
|
||||
|
||||
int es9p_HandleNotification(struct es9p_ctx *ctx, const char *b64_PendingNotification)
|
||||
int es9p_handle_notification(struct es9p_ctx *ctx, const char *b64_PendingNotification)
|
||||
{
|
||||
const char *ikey[] = {"pendingNotification", NULL};
|
||||
const char *idata[] = {b64_PendingNotification, NULL};
|
||||
|
@ -289,7 +289,7 @@ int es9p_HandleNotification(struct es9p_ctx *ctx, const char *b64_PendingNotific
|
|||
return es9p_trans_json(ctx, ctx->address, "/gsma/rsp2/es9plus/handleNotification", ikey, idata, NULL, NULL, NULL);
|
||||
}
|
||||
|
||||
int es9p_CancelSession(struct es9p_ctx *ctx, const char *b64_CancelSessionResponse)
|
||||
int es9p_cancel_session(struct es9p_ctx *ctx, const char *b64_CancelSessionResponse)
|
||||
{
|
||||
const char *ikey[] = {"transactionId", "cancelSessionResponse", NULL};
|
||||
const char *idata[] = {ctx->transactionId, b64_CancelSessionResponse, NULL};
|
||||
|
@ -297,7 +297,7 @@ int es9p_CancelSession(struct es9p_ctx *ctx, const char *b64_CancelSessionRespon
|
|||
return es9p_trans_json(ctx, ctx->address, "/gsma/rsp2/es9plus/cancelSession", ikey, idata, NULL, NULL, NULL);
|
||||
}
|
||||
|
||||
int es11_AuthenticateClient(struct es9p_ctx *ctx, struct es11_authenticate_client_resp *resp, const char *b64_AuthenticateServerResponse)
|
||||
int es11_authenticate_client(struct es9p_ctx *ctx, struct es11_authenticate_client_resp *resp, const char *b64_AuthenticateServerResponse)
|
||||
{
|
||||
const char *ikey[] = {"transactionId", "authenticateServerResponse", NULL};
|
||||
const char *idata[] = {ctx->transactionId, b64_AuthenticateServerResponse, NULL};
|
||||
|
|
12
euicc/es9p.h
12
euicc/es9p.h
|
@ -23,11 +23,11 @@ struct es11_authenticate_client_resp
|
|||
void *cjson_array_result;
|
||||
};
|
||||
|
||||
int es9p_InitiateAuthentication(struct es9p_ctx *ctx, struct es10b_authenticate_server_param *resp, const char *b64_euiccChallenge, const char *b64_EUICCInfo1);
|
||||
int es9p_GetBoundProfilePackage(struct es9p_ctx *ctx, char **b64_BoundProfilePackage, const char *b64_PrepareDownloadResponse);
|
||||
int es9p_AuthenticateClient(struct es9p_ctx *ctx, struct es10b_prepare_download_param *resp, const char *b64_AuthenticateServerResponse);
|
||||
int es9p_HandleNotification(struct es9p_ctx *ctx, const char *b64_PendingNotification);
|
||||
int es9p_CancelSession(struct es9p_ctx *ctx, const char *b64_CancelSessionResponse);
|
||||
int es11_AuthenticateClient(struct es9p_ctx *ctx, struct es11_authenticate_client_resp *resp, const char *b64_AuthenticateServerResponse);
|
||||
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);
|
||||
|
|
|
@ -19,9 +19,9 @@ static int applet_main(int argc, char **argv)
|
|||
|
||||
smdp = argv[1];
|
||||
|
||||
if (es10a_SetDefaultDpAddress(&euicc_ctx, smdp))
|
||||
if (es10a_set_default_dp_address(&euicc_ctx, smdp))
|
||||
{
|
||||
jprint_error("es10a_SetDefaultDpAddress", NULL);
|
||||
jprint_error("es10a_set_default_dp_address", NULL);
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
|
|
@ -14,18 +14,18 @@ static int applet_main(int argc, char **argv)
|
|||
{
|
||||
char *eid = NULL;
|
||||
struct es10a_euicc_configured_addresses addresses;
|
||||
struct es10c_ex_euiccinfo2 *euiccinfo2 = NULL;
|
||||
struct es10c_ex_euiccinfo2 euiccinfo2;
|
||||
cJSON *jaddresses = NULL;
|
||||
cJSON *jeuiccinfo2 = NULL;
|
||||
cJSON *jdata = NULL;
|
||||
|
||||
if (es10c_GetEID(&euicc_ctx, &eid))
|
||||
if (es10c_get_eid(&euicc_ctx, &eid))
|
||||
{
|
||||
jprint_error("es10c_GetEID", NULL);
|
||||
jprint_error("es10c_get_eid", NULL);
|
||||
return -1;
|
||||
}
|
||||
|
||||
if (es10a_GetEuiccConfiguredAddresses(&euicc_ctx, &addresses) == 0)
|
||||
if (es10a_get_euicc_configured_addresses(&euicc_ctx, &addresses) == 0)
|
||||
{
|
||||
jaddresses = cJSON_CreateObject();
|
||||
}
|
||||
|
@ -49,77 +49,77 @@ static int applet_main(int argc, char **argv)
|
|||
|
||||
if (jeuiccinfo2)
|
||||
{
|
||||
cJSON_AddStringOrNullToObject(jeuiccinfo2, "profileVersion", euiccinfo2->profileVersion);
|
||||
cJSON_AddStringOrNullToObject(jeuiccinfo2, "svn", euiccinfo2->svn);
|
||||
cJSON_AddStringOrNullToObject(jeuiccinfo2, "euiccFirmwareVer", euiccinfo2->euiccFirmwareVer);
|
||||
cJSON_AddStringOrNullToObject(jeuiccinfo2, "profileVersion", euiccinfo2.profileVersion);
|
||||
cJSON_AddStringOrNullToObject(jeuiccinfo2, "svn", euiccinfo2.svn);
|
||||
cJSON_AddStringOrNullToObject(jeuiccinfo2, "euiccFirmwareVer", euiccinfo2.euiccFirmwareVer);
|
||||
{
|
||||
cJSON *jextCardResource = cJSON_CreateObject();
|
||||
|
||||
cJSON_AddNumberToObject(jextCardResource, "installedApplication", euiccinfo2->extCardResource.installedApplication);
|
||||
cJSON_AddNumberToObject(jextCardResource, "freeNonVolatileMemory", euiccinfo2->extCardResource.freeNonVolatileMemory);
|
||||
cJSON_AddNumberToObject(jextCardResource, "freeVolatileMemory", euiccinfo2->extCardResource.freeVolatileMemory);
|
||||
cJSON_AddNumberToObject(jextCardResource, "installedApplication", euiccinfo2.extCardResource.installedApplication);
|
||||
cJSON_AddNumberToObject(jextCardResource, "freeNonVolatileMemory", euiccinfo2.extCardResource.freeNonVolatileMemory);
|
||||
cJSON_AddNumberToObject(jextCardResource, "freeVolatileMemory", euiccinfo2.extCardResource.freeVolatileMemory);
|
||||
|
||||
cJSON_AddItemToObject(jeuiccinfo2, "extCardResource", jextCardResource);
|
||||
}
|
||||
if (euiccinfo2->uiccCapability)
|
||||
if (euiccinfo2.uiccCapability)
|
||||
{
|
||||
cJSON *juiccCapability = cJSON_CreateArray();
|
||||
for (int i = 0; euiccinfo2->uiccCapability[i] != NULL; i++)
|
||||
for (int i = 0; euiccinfo2.uiccCapability[i] != NULL; i++)
|
||||
{
|
||||
cJSON_AddItemToArray(juiccCapability, cJSON_CreateString(euiccinfo2->uiccCapability[i]));
|
||||
cJSON_AddItemToArray(juiccCapability, cJSON_CreateString(euiccinfo2.uiccCapability[i]));
|
||||
}
|
||||
cJSON_AddItemToObject(jeuiccinfo2, "uiccCapability", juiccCapability);
|
||||
}
|
||||
cJSON_AddStringOrNullToObject(jeuiccinfo2, "javacardVersion", euiccinfo2->javacardVersion);
|
||||
cJSON_AddStringOrNullToObject(jeuiccinfo2, "globalplatformVersion", euiccinfo2->globalplatformVersion);
|
||||
if (euiccinfo2->rspCapability)
|
||||
cJSON_AddStringOrNullToObject(jeuiccinfo2, "javacardVersion", euiccinfo2.javacardVersion);
|
||||
cJSON_AddStringOrNullToObject(jeuiccinfo2, "globalplatformVersion", euiccinfo2.globalplatformVersion);
|
||||
if (euiccinfo2.rspCapability)
|
||||
{
|
||||
cJSON *jrspCapability = cJSON_CreateArray();
|
||||
for (int i = 0; euiccinfo2->rspCapability[i] != NULL; i++)
|
||||
for (int i = 0; euiccinfo2.rspCapability[i] != NULL; i++)
|
||||
{
|
||||
cJSON_AddItemToArray(jrspCapability, cJSON_CreateString(euiccinfo2->rspCapability[i]));
|
||||
cJSON_AddItemToArray(jrspCapability, cJSON_CreateString(euiccinfo2.rspCapability[i]));
|
||||
}
|
||||
cJSON_AddItemToObject(jeuiccinfo2, "rspCapability", jrspCapability);
|
||||
}
|
||||
if (euiccinfo2->euiccCiPKIdListForVerification)
|
||||
if (euiccinfo2.euiccCiPKIdListForVerification)
|
||||
{
|
||||
cJSON *verification_keys = cJSON_CreateArray();
|
||||
for (int i = 0; euiccinfo2->euiccCiPKIdListForVerification[i] != NULL; i++)
|
||||
for (int i = 0; euiccinfo2.euiccCiPKIdListForVerification[i] != NULL; i++)
|
||||
{
|
||||
cJSON_AddItemToArray(verification_keys, cJSON_CreateString(euiccinfo2->euiccCiPKIdListForVerification[i]));
|
||||
cJSON_AddItemToArray(verification_keys, cJSON_CreateString(euiccinfo2.euiccCiPKIdListForVerification[i]));
|
||||
}
|
||||
cJSON_AddItemToObject(jeuiccinfo2, "euiccCiPKIdListForVerification", verification_keys);
|
||||
}
|
||||
if (euiccinfo2->euiccCiPKIdListForSigning)
|
||||
if (euiccinfo2.euiccCiPKIdListForSigning)
|
||||
{
|
||||
cJSON *signing_keys = cJSON_CreateArray();
|
||||
for (int i = 0; euiccinfo2->euiccCiPKIdListForSigning[i] != NULL; i++)
|
||||
for (int i = 0; euiccinfo2.euiccCiPKIdListForSigning[i] != NULL; i++)
|
||||
{
|
||||
cJSON_AddItemToArray(signing_keys, cJSON_CreateString(euiccinfo2->euiccCiPKIdListForSigning[i]));
|
||||
cJSON_AddItemToArray(signing_keys, cJSON_CreateString(euiccinfo2.euiccCiPKIdListForSigning[i]));
|
||||
}
|
||||
cJSON_AddItemToObject(jeuiccinfo2, "euiccCiPKIdListForSigning", signing_keys);
|
||||
}
|
||||
cJSON_AddStringOrNullToObject(jeuiccinfo2, "euiccCategory", euiccinfo2->euiccCategory);
|
||||
if (euiccinfo2->forbiddenProfilePolicyRules)
|
||||
cJSON_AddStringOrNullToObject(jeuiccinfo2, "euiccCategory", euiccinfo2.euiccCategory);
|
||||
if (euiccinfo2.forbiddenProfilePolicyRules)
|
||||
{
|
||||
cJSON *jforbiddenProfilePolicyRules = cJSON_CreateArray();
|
||||
for (int i = 0; euiccinfo2->forbiddenProfilePolicyRules[i] != NULL; i++)
|
||||
for (int i = 0; euiccinfo2.forbiddenProfilePolicyRules[i] != NULL; i++)
|
||||
{
|
||||
cJSON_AddItemToArray(jforbiddenProfilePolicyRules, cJSON_CreateString(euiccinfo2->forbiddenProfilePolicyRules[i]));
|
||||
cJSON_AddItemToArray(jforbiddenProfilePolicyRules, cJSON_CreateString(euiccinfo2.forbiddenProfilePolicyRules[i]));
|
||||
}
|
||||
cJSON_AddItemToObject(jeuiccinfo2, "forbiddenProfilePolicyRules", jforbiddenProfilePolicyRules);
|
||||
}
|
||||
cJSON_AddStringOrNullToObject(jeuiccinfo2, "ppVersion", euiccinfo2->ppVersion);
|
||||
cJSON_AddStringOrNullToObject(jeuiccinfo2, "sasAcreditationNumber", euiccinfo2->sasAcreditationNumber);
|
||||
cJSON_AddStringOrNullToObject(jeuiccinfo2, "ppVersion", euiccinfo2.ppVersion);
|
||||
cJSON_AddStringOrNullToObject(jeuiccinfo2, "sasAcreditationNumber", euiccinfo2.sasAcreditationNumber);
|
||||
{
|
||||
cJSON *jcertificationDataObject = cJSON_CreateObject();
|
||||
|
||||
cJSON_AddStringOrNullToObject(jcertificationDataObject, "platformLabel", euiccinfo2->certificationDataObject.platformLabel);
|
||||
cJSON_AddStringOrNullToObject(jcertificationDataObject, "discoveryBaseURL", euiccinfo2->certificationDataObject.discoveryBaseURL);
|
||||
cJSON_AddStringOrNullToObject(jcertificationDataObject, "platformLabel", euiccinfo2.certificationDataObject.platformLabel);
|
||||
cJSON_AddStringOrNullToObject(jcertificationDataObject, "discoveryBaseURL", euiccinfo2.certificationDataObject.discoveryBaseURL);
|
||||
|
||||
cJSON_AddItemToObject(jeuiccinfo2, "certificationDataObject", jcertificationDataObject);
|
||||
}
|
||||
es10c_ex_euiccinfo2_free(euiccinfo2);
|
||||
es10c_ex_euiccinfo2_free(&euiccinfo2);
|
||||
}
|
||||
cJSON_AddItemToObject(jdata, "EUICCInfo2", jeuiccinfo2);
|
||||
|
||||
|
|
|
@ -24,7 +24,7 @@ static int applet_main(int argc, char **argv)
|
|||
return -1;
|
||||
}
|
||||
|
||||
if ((ret = es10c_eUICCMemoryReset(&euicc_ctx)))
|
||||
if ((ret = es10c_euicc_memory_reset(&euicc_ctx)))
|
||||
{
|
||||
const char *reason;
|
||||
switch (ret)
|
||||
|
@ -36,7 +36,7 @@ static int applet_main(int argc, char **argv)
|
|||
reason = "unknown";
|
||||
break;
|
||||
}
|
||||
jprint_error("es10c_eUICCMemoryReset", reason);
|
||||
jprint_error("es10c_euicc_memory_reset", reason);
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
|
|
@ -13,9 +13,9 @@ static int applet_main(int argc, char **argv)
|
|||
struct es10b_notification_metadata_list *notifications, *rptr;
|
||||
cJSON *jdata = NULL;
|
||||
|
||||
if (es10b_ListNotification(&euicc_ctx, ¬ifications))
|
||||
if (es10b_list_notification(&euicc_ctx, ¬ifications))
|
||||
{
|
||||
jprint_error("es10b_ListNotification", NULL);
|
||||
jprint_error("es10b_list_notification", NULL);
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
|
|
@ -22,20 +22,20 @@ static int applet_main(int argc, char **argv)
|
|||
|
||||
seqNumber = atol(argv[1]);
|
||||
|
||||
jprint_progress("es10b_RetrieveNotificationsList");
|
||||
if (es10b_RetrieveNotificationsList(&euicc_ctx, ¬ification, seqNumber))
|
||||
jprint_progress("es10b_retrieve_notifications_list");
|
||||
if (es10b_retrieve_notifications_list(&euicc_ctx, ¬ification, seqNumber))
|
||||
{
|
||||
jprint_error("es10b_RetrieveNotificationsList", NULL);
|
||||
jprint_error("es10b_retrieve_notifications_list", NULL);
|
||||
return -1;
|
||||
}
|
||||
|
||||
es9p_ctx.euicc_ctx = &euicc_ctx;
|
||||
es9p_ctx.address = notification.notificationAddress;
|
||||
|
||||
jprint_progress("es9p_HandleNotification");
|
||||
if (es9p_HandleNotification(&es9p_ctx, notification.b64_PendingNotification))
|
||||
jprint_progress("es9p_handle_notification");
|
||||
if (es9p_handle_notification(&es9p_ctx, notification.b64_PendingNotification))
|
||||
{
|
||||
jprint_error("es9p_HandleNotification", NULL);
|
||||
jprint_error("es9p_handle_notification", NULL);
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
|
|
@ -20,7 +20,7 @@ static int applet_main(int argc, char **argv)
|
|||
|
||||
seqNumber = atol(argv[1]);
|
||||
|
||||
if ((ret = es10b_RemoveNotificationFromList(&euicc_ctx, seqNumber)))
|
||||
if ((ret = es10b_remove_notification_from_list(&euicc_ctx, seqNumber)))
|
||||
{
|
||||
const char *reason;
|
||||
switch (ret)
|
||||
|
@ -32,7 +32,7 @@ static int applet_main(int argc, char **argv)
|
|||
reason = "unknown";
|
||||
break;
|
||||
}
|
||||
jprint_error("es10b_RemoveNotificationFromList", reason);
|
||||
jprint_error("es10b_remove_notification_from_list", reason);
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
|
|
@ -20,7 +20,7 @@ static int applet_main(int argc, char **argv)
|
|||
|
||||
param = argv[1];
|
||||
|
||||
ret = es10c_DeleteProfile(&euicc_ctx, param);
|
||||
ret = es10c_delete_profile(&euicc_ctx, param);
|
||||
|
||||
if (ret)
|
||||
{
|
||||
|
|
|
@ -28,7 +28,7 @@ static int applet_main(int argc, char **argv)
|
|||
refreshflag = atoi(argv[2]);
|
||||
}
|
||||
|
||||
ret = es10c_DisableProfile(&euicc_ctx, param, refreshflag);
|
||||
ret = es10c_disable_profile(&euicc_ctx, param, refreshflag);
|
||||
|
||||
if (ret)
|
||||
{
|
||||
|
|
|
@ -60,22 +60,22 @@ static int applet_main(int argc, char **argv)
|
|||
es9p_ctx.euicc_ctx = &euicc_ctx;
|
||||
es9p_ctx.address = smds;
|
||||
|
||||
jprint_progress("es10b_GetEUICCChallenge");
|
||||
if (es10b_GetEUICCChallenge(&euicc_ctx, &b64_euicc_challenge))
|
||||
jprint_progress("es10b_get_euicc_challenge");
|
||||
if (es10b_get_euicc_challenge(&euicc_ctx, &b64_euicc_challenge))
|
||||
{
|
||||
jprint_error("es10b_GetEUICCChallenge", NULL);
|
||||
jprint_error("es10b_get_euicc_challenge", NULL);
|
||||
return -1;
|
||||
}
|
||||
|
||||
jprint_progress("es10b_GetEUICCInfo");
|
||||
if (es10b_GetEUICCInfo(&euicc_ctx, &b64_euicc_info_1))
|
||||
jprint_progress("es10b_get_euicc_info");
|
||||
if (es10b_get_euicc_info(&euicc_ctx, &b64_euicc_info_1))
|
||||
{
|
||||
jprint_error("es10b_GetEUICCInfo", NULL);
|
||||
jprint_error("es10b_get_euicc_info", NULL);
|
||||
return -1;
|
||||
}
|
||||
|
||||
jprint_progress("es9p_InitiateAuthentication");
|
||||
if (es9p_InitiateAuthentication(&es9p_ctx, &es10b_AuthenticateServer_param, b64_euicc_challenge, b64_euicc_info_1))
|
||||
if (es9p_initiate_authentication(&es9p_ctx, &es10b_AuthenticateServer_param, b64_euicc_challenge, b64_euicc_info_1))
|
||||
{
|
||||
jprint_error("es11_initiate_authentication", es9p_ctx.statusCodeData.message);
|
||||
return -1;
|
||||
|
@ -84,17 +84,17 @@ static int applet_main(int argc, char **argv)
|
|||
es10b_AuthenticateServer_param.matchingId = NULL;
|
||||
es10b_AuthenticateServer_param.imei = imei;
|
||||
|
||||
jprint_progress("es10b_AuthenticateServer");
|
||||
if (es10b_AuthenticateServer(&euicc_ctx, &b64_authenticate_server_response, &es10b_AuthenticateServer_param))
|
||||
jprint_progress("es10b_authenticate_server");
|
||||
if (es10b_authenticate_server(&euicc_ctx, &b64_authenticate_server_response, &es10b_AuthenticateServer_param))
|
||||
{
|
||||
jprint_error("es10b_AuthenticateServer", NULL);
|
||||
jprint_error("es10b_authenticate_server", NULL);
|
||||
return -1;
|
||||
}
|
||||
|
||||
jprint_progress("es11_AuthenticateClient");
|
||||
if (es11_AuthenticateClient(&es9p_ctx, &es11_AuthenticateClient_resp, b64_authenticate_server_response))
|
||||
jprint_progress("es11_authenticate_client");
|
||||
if (es11_authenticate_client(&es9p_ctx, &es11_AuthenticateClient_resp, b64_authenticate_server_response))
|
||||
{
|
||||
jprint_error("es11_AuthenticateClient", es11_AuthenticateClient_resp.status);
|
||||
jprint_error("es11_authenticate_client", es11_AuthenticateClient_resp.status);
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
|
|
@ -70,10 +70,10 @@ static int applet_main(int argc, char **argv)
|
|||
|
||||
if (smdp == NULL)
|
||||
{
|
||||
jprint_progress("es10a_GetEuiccConfiguredAddresses");
|
||||
if (es10a_GetEuiccConfiguredAddresses(&euicc_ctx, &configured_addresses))
|
||||
jprint_progress("es10a_get_euicc_configured_addresses");
|
||||
if (es10a_get_euicc_configured_addresses(&euicc_ctx, &configured_addresses))
|
||||
{
|
||||
jprint_error("es10a_GetEuiccConfiguredAddresses", NULL);
|
||||
jprint_error("es10a_get_euicc_configured_addresses", NULL);
|
||||
return -1;
|
||||
}
|
||||
else
|
||||
|
@ -91,41 +91,41 @@ static int applet_main(int argc, char **argv)
|
|||
es9p_ctx.euicc_ctx = &euicc_ctx;
|
||||
es9p_ctx.address = smdp;
|
||||
|
||||
jprint_progress("es10b_GetEUICCChallenge");
|
||||
if (es10b_GetEUICCChallenge(&euicc_ctx, &b64_euicc_challenge))
|
||||
jprint_progress("es10b_get_euicc_challenge");
|
||||
if (es10b_get_euicc_challenge(&euicc_ctx, &b64_euicc_challenge))
|
||||
{
|
||||
jprint_error("es10b_GetEUICCChallenge", NULL);
|
||||
jprint_error("es10b_get_euicc_challenge", NULL);
|
||||
return -1;
|
||||
}
|
||||
|
||||
jprint_progress("es10b_GetEUICCInfo");
|
||||
if (es10b_GetEUICCInfo(&euicc_ctx, &b64_euicc_info_1))
|
||||
jprint_progress("es10b_get_euicc_info");
|
||||
if (es10b_get_euicc_info(&euicc_ctx, &b64_euicc_info_1))
|
||||
{
|
||||
jprint_error("es10b_GetEUICCInfo", NULL);
|
||||
jprint_error("es10b_get_euicc_info", NULL);
|
||||
return -1;
|
||||
}
|
||||
|
||||
jprint_progress("es9p_InitiateAuthentication");
|
||||
if (es9p_InitiateAuthentication(&es9p_ctx, &es10b_AuthenticateServer_param, b64_euicc_challenge, b64_euicc_info_1))
|
||||
jprint_progress("es9p_initiate_authentication");
|
||||
if (es9p_initiate_authentication(&es9p_ctx, &es10b_AuthenticateServer_param, b64_euicc_challenge, b64_euicc_info_1))
|
||||
{
|
||||
jprint_error("es9p_InitiateAuthentication", es9p_ctx.statusCodeData.message);
|
||||
jprint_error("es9p_initiate_authentication", es9p_ctx.statusCodeData.message);
|
||||
return -1;
|
||||
}
|
||||
|
||||
es10b_AuthenticateServer_param.matchingId = matchingId;
|
||||
es10b_AuthenticateServer_param.imei = imei;
|
||||
|
||||
jprint_progress("es10b_AuthenticateServer");
|
||||
if (es10b_AuthenticateServer(&euicc_ctx, &b64_authenticate_server_response, &es10b_AuthenticateServer_param))
|
||||
jprint_progress("es10b_authenticate_server");
|
||||
if (es10b_authenticate_server(&euicc_ctx, &b64_authenticate_server_response, &es10b_AuthenticateServer_param))
|
||||
{
|
||||
jprint_error("es10b_AuthenticateServer", NULL);
|
||||
jprint_error("es10b_authenticate_server", NULL);
|
||||
return -1;
|
||||
}
|
||||
|
||||
jprint_progress("es9p_AuthenticateClient");
|
||||
if (es9p_AuthenticateClient(&es9p_ctx, &es10b_PrepareDownload_param, b64_authenticate_server_response))
|
||||
jprint_progress("es9p_authenticate_client");
|
||||
if (es9p_authenticate_client(&es9p_ctx, &es10b_PrepareDownload_param, b64_authenticate_server_response))
|
||||
{
|
||||
jprint_error("es9p_AuthenticateClient", es9p_ctx.statusCodeData.message);
|
||||
jprint_error("es9p_authenticate_client", es9p_ctx.statusCodeData.message);
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
@ -138,26 +138,26 @@ static int applet_main(int argc, char **argv)
|
|||
es10b_PrepareDownload_param.confirmationCode = NULL;
|
||||
}
|
||||
|
||||
jprint_progress("es10b_PrepareDownload");
|
||||
if (es10b_PrepareDownload(&euicc_ctx, &b64_prepare_download_response, &es10b_PrepareDownload_param))
|
||||
jprint_progress("es10b_prepare_download");
|
||||
if (es10b_prepare_download(&euicc_ctx, &b64_prepare_download_response, &es10b_PrepareDownload_param))
|
||||
{
|
||||
jprint_error("es10b_PrepareDownload", NULL);
|
||||
jprint_error("es10b_prepare_download", NULL);
|
||||
return -1;
|
||||
}
|
||||
|
||||
jprint_progress("es9p_GetBoundProfilePackage");
|
||||
if (es9p_GetBoundProfilePackage(&es9p_ctx, &b64_BoundProfilePackage, b64_prepare_download_response))
|
||||
jprint_progress("es9p_get_bound_profile_package");
|
||||
if (es9p_get_bound_profile_package(&es9p_ctx, &b64_BoundProfilePackage, b64_prepare_download_response))
|
||||
{
|
||||
jprint_error("es9p_GetBoundProfilePackage", es9p_ctx.statusCodeData.message);
|
||||
jprint_error("es9p_get_bound_profile_package", es9p_ctx.statusCodeData.message);
|
||||
return -1;
|
||||
}
|
||||
|
||||
jprint_progress("es10b_LoadBoundProfilePackage");
|
||||
if (es10b_LoadBoundProfilePackage(&euicc_ctx, &es10b_LoadBoundProfilePackage_result, b64_BoundProfilePackage))
|
||||
jprint_progress("es10b_load_bound_profile_package");
|
||||
if (es10b_load_bound_profile_package(&euicc_ctx, &es10b_LoadBoundProfilePackage_result, b64_BoundProfilePackage))
|
||||
{
|
||||
char buffer[256];
|
||||
snprintf(buffer, sizeof(buffer), "%s,%s", euicc_bppcommandid2str(es10b_LoadBoundProfilePackage_result.bppCommandId), euicc_errorreason2str(es10b_LoadBoundProfilePackage_result.errorReason));
|
||||
jprint_error("es10b_LoadBoundProfilePackage", buffer);
|
||||
jprint_error("es10b_load_bound_profile_package", buffer);
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
|
|
@ -28,7 +28,7 @@ static int applet_main(int argc, char **argv)
|
|||
refreshflag = atoi(argv[2]);
|
||||
}
|
||||
|
||||
ret = es10c_EnableProfile(&euicc_ctx, param, refreshflag);
|
||||
ret = es10c_enable_profile(&euicc_ctx, param, refreshflag);
|
||||
|
||||
if (ret)
|
||||
{
|
||||
|
|
|
@ -13,9 +13,9 @@ static int applet_main(int argc, char **argv)
|
|||
struct es10c_profile_info_list *profiles, *rptr;
|
||||
cJSON *jdata = NULL;
|
||||
|
||||
if (es10c_GetProfilesInfo(&euicc_ctx, &profiles))
|
||||
if (es10c_get_profiles_info(&euicc_ctx, &profiles))
|
||||
{
|
||||
jprint_error("es10c_GetProfilesInfo", NULL);
|
||||
jprint_error("es10c_get_profiles_info", NULL);
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
|
|
@ -30,7 +30,7 @@ static int applet_main(int argc, char **argv)
|
|||
new_name = "";
|
||||
}
|
||||
|
||||
if ((ret = es10c_SetNickname(&euicc_ctx, iccid, new_name)))
|
||||
if ((ret = es10c_set_nickname(&euicc_ctx, iccid, new_name)))
|
||||
{
|
||||
const char *reason;
|
||||
switch (ret)
|
||||
|
@ -42,7 +42,7 @@ static int applet_main(int argc, char **argv)
|
|||
reason = "unknown";
|
||||
break;
|
||||
}
|
||||
jprint_error("es10c_SetNickname", reason);
|
||||
jprint_error("es10c_set_nickname", reason);
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue