/************************************************************************ | |
(c) Copyright 2021 by 天翼物联科技有限公司. All rights reserved. | |
**************************************************************************/ | |
#ifndef _LPADES9_H | |
#define _LPADES9_H | |
#include <stdint.h> | |
#include "LPAd.h" | |
#include "LPAd_internal.h" | |
/************************************** ES9 struct ****************************/ | |
typedef struct FunctionExecutionStatus | |
{ | |
uint8_t* status; //string | |
//statusCodeData | |
uint8_t* subjectIdentifier; //string | |
uint8_t* reasonCode; //string | |
uint8_t* message; //string | |
uint8_t* subjectCode; //string | |
}funExecStatus_t; | |
typedef struct InitiateAuthentication | |
{ | |
uint8_t* euiccChallenge; //base64 string | |
uint8_t* euiccInfo1; //base64 string | |
uint8_t* smdpAddress; //string | |
}initAuthReq_t; | |
typedef struct InitiateAuthenticationRsp | |
{ | |
funExecStatus_t* funES; | |
uint8_t* transactionId; //string | |
uint8_t* serverSigned1; //base64 string | |
uint8_t* serverSignature1; //base64 string | |
uint8_t* euiccCiPKIdToBeUsed; //base64 string | |
uint8_t* serverCertificate; //base64 string | |
}initAuthRsp_t; | |
typedef struct AuthenticateClient | |
{ | |
uint8_t* transactionId; //string | |
uint8_t* authenticateServerResponse; //string | |
}authClientReq_t; | |
typedef struct AuthenticateClientRsp | |
{ | |
funExecStatus_t* funES; | |
uint8_t* transactionId; //string | |
uint8_t* profileMetadata; //base64 string | |
uint8_t* smdpSigned2; //base64 string | |
uint8_t* smdpSignature2; //base64 string | |
uint8_t* smdpCertificate; //base64 string | |
}authClientRsp_t; | |
typedef struct GetBoundProfilePackage | |
{ | |
uint8_t* transactionId; //string | |
uint8_t* prepareDownloadResponse; //string | |
}getBPPReq_t; | |
typedef struct GetBoundProfilePackageRsp | |
{ | |
funExecStatus_t* funES; | |
uint8_t* transactionId; //string | |
uint8_t* boundProfilePackage; //base64 string | |
}getBPPRsp_t; | |
typedef struct CancelSession | |
{ | |
uint8_t* transactionId; //string | |
uint8_t* cancelSessionResponse; //string | |
}cancelSession_t; | |
typedef struct HandleNotification | |
{ | |
uint8_t* pendingNotification; //base64 string | |
}handleNotificationReq_t; | |
#if 0 | |
typedef struct HandleNotificationRsp | |
{ | |
int16_t httpRspCode; | |
}handleNotificationRsp_t; | |
#endif | |
/******************************* ES9 API ******************************************/ | |
int LPAd_ES9_low_level_init(CT_LPAd_sys_hooks_t *sysHooks); | |
int LPAd_ES9_InitiateAuthentication(CT_LPAd_session_t* LPASession, initAuthReq_t* req, initAuthRsp_t* rsp); | |
int LPAd_ES9_AuthenticateClient(CT_LPAd_session_t* LPASession, authClientReq_t* req, authClientRsp_t* rsp); | |
int LPAd_ES9_GetBoundProfilePackage(CT_LPAd_session_t* LPASession, getBPPReq_t* req, getBPPRsp_t* rsp); | |
int LPAd_ES9_HandleNotification(CT_LPAd_session_t* LPASession, handleNotificationReq_t* req); | |
void free_InitAuthRsp(initAuthRsp_t* p); | |
void free_AuthClientRsp(authClientRsp_t* p); | |
void free_GetBPPRsp(getBPPRsp_t* p); | |
#endif |