lib/signature.c -
#include 'system.h'
#include 'rpmio_internal.h'
#include 'rpmlib.h'
#include 'rpmmacro.h'
#include 'md5.h'
#include 'misc.h'
#include 'rpmlead.h'
#include 'signature.h'
#include 'debug.h'
#define X(_x) (unsigned)((_x) & 0xff)
typedef int(* md5func )(const char *fn, byte *digest)
int rpmLookupSignatureType (int action)
const char * rpmDetectPGPVersion (pgpVersion *pgpVer)
rpmRC checkSize (FD_t fd, int siglen, int pad, int datalen)
Check package size.
rpmRC rpmReadSignature (FD_t fd, Header *headerp, sigType sig_type)
int rpmWriteSignature (FD_t fd, Header h)
Header rpmNewSignature (void)
Header rpmFreeSignature (Header h)
int makePGPSignature (const char *file, void **sig, int_32 *size, const char *passPhrase)
int makeGPGSignature (const char *file, void **sig, int_32 *size, const char *passPhrase)
int rpmAddSignature (Header h, const char *file, int_32 sigTag, const char *passPhrase)
rpmVerifySignatureReturn verifySizeSignature (const char *datafile, int_32 size, char *result)
rpmVerifySignatureReturn verifyMD5Signature (const char *datafile, const byte *sig, char *result, md5func fn)
rpmVerifySignatureReturn verifyPGPSignature (const char *datafile, const void *sig, int count, char *result)
rpmVerifySignatureReturn do_verifyGPGSignature (const char *gpghome, const char *sigfile, const char *datafile, char *result)
rpmVerifySignatureReturn verifyGPGSignature (const char *datafile, const void *sig, int count, char *result)
int checkPassPhrase (const char *passPhrase, const int sigTag)
char * rpmGetPassPhrase (const char *prompt, const int sigTag)
rpmVerifySignatureReturn rpmVerifySignature (const char *file, int_32 sigTag, const void *sig, int count, char *result)
Definition in file signature.c.
Definition at line 504 of file signature.c.
Referenced by verifyMD5Signature().
Definition at line 29 of file signature.c.
Referenced by verifyMD5Signature().
Definition at line 826 of file signature.c.
References _, dosetenv(), errno, PGP_2, PGP_5, PGP_NOTDETECTED, PGP_UNKNOWN, pgpVersion, rpmDetectPGPVersion(), RPMERR_EXEC, RPMERR_SIGGEN, rpmError, rpmExpand(), rpmIsVerbose, RPMSIGTAG_GPG, RPMSIGTAG_PGP, and RPMSIGTAG_PGP5.
Referenced by rpmGetPassPhrase().
Check package size.
Todo: rpmio: use fdSize rather than fstat(2) to get file size.
Parameters:
Returns: rpmRC return code
Definition at line 111 of file signature.c.
References _, Fileno(), RPMMESS_DEBUG, RPMMESS_WARNING, rpmMessage, rpmRC, RPMRC_BADSIZE, RPMRC_FAIL, and RPMRC_OK.
Referenced by rpmReadSignature().
Definition at line 689 of file signature.c.
References _, addMacro(), dosetenv(), errno, RPMERR_EXEC, RPMERR_FORK, rpmError, rpmExpand(), RPMSIG_BAD, RPMSIG_NOKEY, RPMSIG_OK, and xstrncasecmp().
Referenced by verifyGPGSignature().
Definition at line 357 of file signature.c.
References _, _free(), addMacro(), alloca(), delMacro(), dosetenv(), errno, Fclose(), Ferror(), Fopen(), int_32, RPMERR_EXEC, RPMERR_SIGGEN, rpmError, rpmExpand(), RPMMESS_DEBUG, rpmMessage, stpcpy(), timedRead, and xmalloc().
Referenced by rpmAddSignature().
Definition at line 245 of file signature.c.
References _, _free(), addMacro(), alloca(), delMacro(), dosetenv(), errno, Fclose(), Ferror(), Fopen(), int_32, PGP_2, PGP_5, PGP_NOTDETECTED, PGP_UNKNOWN, pgpVersion, rpmDetectPGPVersion(), RPMERR_EXEC, RPMERR_SIGGEN, rpmError, rpmExpand(), RPMMESS_DEBUG, rpmMessage, stpcpy(), timedRead, and xmalloc().
Referenced by rpmAddSignature().
Definition at line 783 of file signature.c.
References _, _free(), do_verifyGPGSignature(), Fclose(), Fwrite(), makeTempFile(), RPMERR_SCRIPT, rpmError, rpmExpand(), RPMSIG_BAD, RPMSIG_NOKEY, and rpmVerifySignatureReturn.
Referenced by rpmVerifySignature().
Definition at line 507 of file signature.c.
References md5func, RPMSIG_BAD, RPMSIG_OK, and X.
Referenced by rpmVerifySignature().
Definition at line 544 of file signature.c.
References _, _free(), addMacro(), delMacro(), dosetenv(), errno, Fclose(), Ferror(), Fopen(), Fwrite(), makeTempFile(), PGP_2, PGP_5, PGP_NOTDETECTED, PGP_UNKNOWN, pgpVersion, rpmDetectPGPVersion(), RPMERR_EXEC, rpmError, rpmExpand(), rpmGetPath(), RPMSIG_BAD, RPMSIG_NOKEY, RPMSIG_NOTTRUSTED, RPMSIG_OK, and stpncpy().
Referenced by rpmVerifySignature().
Definition at line 486 of file signature.c.
References int_32, RPMSIG_BAD, and RPMSIG_OK.
Referenced by rpmVerifySignature().
Generated automatically by Doxygen for rpm from the source code.
Закладки на сайте Проследить за страницей |
Created 1996-2024 by Maxim Chirkov Добавить, Поддержать, Вебмастеру |