OPENSSL_free(der_pubkey);
+ if (pub_key != NULL)
+ _INFO("%s", pub_key);
+
return pub_key;
}
_INFO("Caller uid =[%d]", uid);
#endif
+ _INFO("Caller app id = [%s]", caller_app_id);
+
pkgmgrinfo_pkginfo_h handle = NULL;
+ char *caller_pkg_id = NULL;
+ pkgmgrinfo_appinfo_h pkg_app_info = NULL;
+
#ifdef WITH_JSON_BUILDER
- int ret = pkgmgrinfo_pkginfo_get_usr_pkginfo(caller_app_id, uid, &handle);
+ int ret = pkgmgrinfo_appinfo_get_usr_appinfo(caller_app_id, uid, &pkg_app_info);
+ if (ret != PMINFO_R_OK) {
+ _ERR("pkgmgrinfo_appinfo_get_appinfo=[%d]", ret);
+
+ return NULL;
+ }
#else
- int ret = pkgmgrinfo_pkginfo_get_pkginfo(caller_app_id, &handle);
+ int ret = pkgmgrinfo_appinfo_get_appinfo(caller_app_id, &pkg_app_info);
+ if (ret != PMINFO_R_OK) {
+ _ERR("pkgmgrinfo_appinfo_get_appinfo=[%d]", ret);
+
+ return NULL;
+ }
+#endif
+
+ ret = pkgmgrinfo_appinfo_get_pkgid(pkg_app_info, &caller_pkg_id);
+ if (ret != PMINFO_R_OK) {
+ _ERR("pkgmgrinfo_appinfo_get_appinfo=[%d]", ret);
+ pkgmgrinfo_appinfo_destroy_appinfo(pkg_app_info);
+
+ return NULL;
+ }
+
+ _INFO("Caller package id = [%s]", caller_pkg_id);
+
+#ifdef WITH_JSON_BUILDER
+ ret = pkgmgrinfo_pkginfo_get_usr_pkginfo(caller_pkg_id, uid, &handle);
+#else
+ ret = pkgmgrinfo_pkginfo_get_pkginfo(caller_pkg_id, &handle);
#endif
if (ret < 0) {
_INFO("");
- char *pkgid = NULL;
+ /*char *pkgid = NULL;
ret = pkgmgrinfo_pkginfo_get_pkgid(handle, &pkgid);
if (ret != PMINFO_R_OK) {
return NULL;
}
- _INFO("");
+ _INFO("");*/
- pkgmgrinfo_certinfo_h cert_handle;
+ pkgmgrinfo_certinfo_h cert_handle = NULL;
const char *author_cert = NULL;
ret = pkgmgrinfo_pkginfo_create_certinfo(&cert_handle);
if (ret != PMINFO_R_OK) {
_INFO("");
#ifdef WITH_JSON_BUILDER
- ret = pkgmgrinfo_pkginfo_load_certinfo(pkgid, cert_handle, uid);
+ ret = pkgmgrinfo_pkginfo_load_certinfo(caller_pkg_id, cert_handle, uid);
#else
- ret = pkgmgrinfo_pkginfo_load_certinfo(pkgid, cert_handle);
+ ret = pkgmgrinfo_pkginfo_load_certinfo(caller_pkg_id, cert_handle);
#endif
+ _INFO("pkgmgrinfo_pkginfo_load_certinfo = [%d]", ret);
+
if (ret != PMINFO_R_OK) {
_ERR("");
pkgmgrinfo_pkginfo_destroy_certinfo(cert_handle);
_INFO("");
ret = pkgmgrinfo_pkginfo_get_cert_value(cert_handle, PMINFO_AUTHOR_SIGNER_CERT, &author_cert);
+ _INFO("pkgmgrinfo_pkginfo_get_cert_value = [%d]", ret);
if (ret != PMINFO_R_OK) {
pkgmgrinfo_pkginfo_destroy_certinfo(cert_handle);
_ERR("");
return NULL;
}
- /*_INFO("Author Root Cert=%s", author_cert);*/
+ _INFO("Author Signer Cert=%s", author_cert);
_INFO("");
pkgmgrinfo_pkginfo_destroy_certinfo(cert_handle);
pkgmgrinfo_pkginfo_destroy_pkginfo(handle);
+ pkgmgrinfo_appinfo_destroy_appinfo(pkg_app_info);
_INFO("");
return tz_facet_id;
}