int cert_id[MAX_CERT_TYPE]; /*certificate ID in index table*/
} pkgmgr_certinfo_x;
-typedef struct _pkgmgr_instcertinfo_x {
- char *pkgid;
- char *cert_info[MAX_CERT_TYPE]; /*certificate data*/
- int is_new[MAX_CERT_TYPE]; /*whether already exist in table or not*/
- int ref_count[MAX_CERT_TYPE]; /*reference count of certificate data*/
- int cert_id[MAX_CERT_TYPE]; /*certificate ID in index table*/
-} pkgmgr_instcertinfo_x;
-
API int pkgmgrinfo_pkginfo_create_certinfo(pkgmgrinfo_certinfo_h *handle)
{
retvm_if(handle == NULL, PMINFO_R_EINVAL, "Argument supplied to hold return value is NULL\n");
API int pkgmgrinfo_create_certinfo_set_handle(pkgmgrinfo_instcertinfo_h *handle)
{
retvm_if(handle == NULL, PMINFO_R_EINVAL, "Argument supplied to hold return value is NULL\n");
- pkgmgr_instcertinfo_x *certinfo = NULL;
+ pkgmgr_certinfo_x *certinfo = NULL;
*handle = NULL;
- certinfo = calloc(1, sizeof(pkgmgr_instcertinfo_x));
+ certinfo = calloc(1, sizeof(pkgmgr_certinfo_x));
retvm_if(certinfo == NULL, PMINFO_R_ERROR, "Malloc Failed\n");
*handle = (void *)certinfo;
return PMINFO_R_OK;
retvm_if(cert_value == NULL, PMINFO_R_EINVAL, "Argument supplied is NULL\n");
retvm_if(cert_type < PMINFO_SET_AUTHOR_ROOT_CERT, PMINFO_R_EINVAL, "Invalid certificate type\n");
retvm_if(cert_type > PMINFO_SET_DISTRIBUTOR2_SIGNER_CERT, PMINFO_R_EINVAL, "Invalid certificate type\n");
- pkgmgr_instcertinfo_x *certinfo = NULL;
- certinfo = (pkgmgr_instcertinfo_x *)handle;
+ pkgmgr_certinfo_x *certinfo = NULL;
+ certinfo = (pkgmgr_certinfo_x *)handle;
if (certinfo->cert_info[cert_type])
free(certinfo->cert_info[cert_type]);
(certinfo->cert_info)[cert_type] = strdup(cert_value);
int ret;
sqlite3 *db;
char *dbpath;
- pkgmgr_instcertinfo_x *info = (pkgmgr_instcertinfo_x *)handle;
+ pkgmgr_certinfo_x *info = (pkgmgr_certinfo_x *)handle;
if (pkgid == NULL || handle == NULL) {
_LOGE("invalid parameter");
{
retvm_if(handle == NULL, PMINFO_R_EINVAL, "Argument supplied is NULL\n");
int i = 0;
- pkgmgr_instcertinfo_x *certinfo = NULL;
- certinfo = (pkgmgr_instcertinfo_x *)handle;
+ pkgmgr_certinfo_x *certinfo = NULL;
+ certinfo = (pkgmgr_certinfo_x *)handle;
if (certinfo->pkgid) {
free(certinfo->pkgid);
certinfo->pkgid = NULL;