API int pkgmgrinfo_pkginfo_compare_usr_pkg_cert_info(
const char *lhs_package_id, const char *rhs_package_id, uid_t uid,
pkgmgrinfo_cert_compare_result_type_e *compare_result) {
- // TODO: need to use pkginfo-client APIs
- return 0;
-#if 0
- sqlite3 *db;
- char *dbpath;
-
if (lhs_package_id == NULL || rhs_package_id == NULL ||
compare_result == NULL) {
_LOGE("invalid parameter");
return PMINFO_R_EINVAL;
}
- /* open unified global cert db */
- dbpath = getUserPkgCertDBPath();
- if (dbpath == NULL) return PMINFO_R_ERROR;
-
- ret = __open_db(dbpath, &db, SQLITE_OPEN_READONLY);
- if (ret != SQLITE_OK) {
- _LOGE("failed to open db: %d", ret);
- free(dbpath);
- return PMINFO_R_ERROR;
- }
- free(dbpath);
-
- if (_pkginfo_compare_certinfo(db, lhs_package_id, rhs_package_id,
- compare_result)) {
- _LOGE("failed to compare certinfo");
- sqlite3_close_v2(db);
- return PMINFO_R_ERROR;
- }
-
- sqlite3_close_v2(db);
-
- return PMINFO_R_OK;
-#endif
+ return _certinfo_compare_certinfo(lhs_package_id, rhs_package_id,
+ compare_result);
}
API int pkgmgrinfo_pkginfo_compare_pkg_cert_info(