libalpm
Arch Linux Package Manager Library
Data Structures | Functions
be_package.c File Reference
#include <stdlib.h>
#include <string.h>
#include <errno.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <archive.h>
#include <archive_entry.h>
#include "alpm_list.h"
#include "alpm.h"
#include "util.h"
#include "log.h"
#include "handle.h"
#include "package.h"
#include "deps.h"
Include dependency graph for be_package.c:

Go to the source code of this file.

Data Structures

struct  package_changelog

Functions

int _alpm_pkg_validate_internal (alpm_handle_t *handle, const char *pkgfile, alpm_pkg_t *syncpkg, alpm_siglevel_t level, alpm_siglist_t **sigdata)
 Validate a package.
alpm_pkg_t_alpm_pkg_load_internal (alpm_handle_t *handle, const char *pkgfile, int full)
 Load a package and create the corresponding alpm_pkg_t struct.
int alpm_pkg_load (alpm_handle_t *handle, const char *filename, int full, alpm_siglevel_t level, alpm_pkg_t **pkg)
 Create a package from a file.

Function Documentation

alpm_pkg_t* _alpm_pkg_load_internal ( alpm_handle_t handle,
const char *  pkgfile,
int  full 
)
int _alpm_pkg_validate_internal ( alpm_handle_t handle,
const char *  pkgfile,
alpm_pkg_t syncpkg,
alpm_siglevel_t  level,
alpm_siglist_t **  sigdata 
)

Validate a package.

Parameters:
handlethe context handle
pkgfilepath to the package file
syncpkgpackage object to load verification data from (md5sum, sha256sum, and/or base64 signature)
levelthe required level of signature verification
sigdatasignature data from the package to pass back
Returns:
0 if package is fully valid, -1 and pm_errno otherwise

Definition at line 307 of file be_package.c.

References _alpm_access(), _alpm_check_pgp_helper(), _alpm_log(), _alpm_sigpath(), _alpm_test_checksum(), ALPM_CSUM_MD5, ALPM_CSUM_SHA256, ALPM_ERR_PKG_INVALID_CHECKSUM, ALPM_ERR_PKG_INVALID_SIG, ALPM_ERR_PKG_NOT_FOUND, ALPM_ERR_WRONG_ARGS, ALPM_LOG_DEBUG, ALPM_SIG_PACKAGE, ALPM_SIG_PACKAGE_MARGINAL_OK, ALPM_SIG_PACKAGE_OPTIONAL, ALPM_SIG_PACKAGE_UNKNOWN_OK, __alpm_pkg_t::base64_sig, __alpm_pkg_t::md5sum, __alpm_handle_t::pm_errno, RET_ERR, and __alpm_pkg_t::sha256sum.

Referenced by alpm_pkg_load().

Here is the call graph for this function:

Here is the caller graph for this function: