From: ewt Date: Thu, 23 Jan 1997 20:55:52 +0000 (+0000) Subject: allows you to omit md5 signature checks X-Git-Tag: tznext/4.11.0.1.tizen20130304~10614 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=4d4c71c5805a4cbdf52297c99e6f20a1afb6e6af;p=tools%2Flibrpm-tizen.git allows you to omit md5 signature checks CVS patchset: 1346 CVS date: 1997/01/23 20:55:52 --- diff --git a/checksig.c b/checksig.c index 2deaccb..4f10bda 100644 --- a/checksig.c +++ b/checksig.c @@ -133,7 +133,7 @@ int doReSign(int add, char *passPhrase, char **argv) return 0; } -int doCheckSig(int pgp, char **argv) +int doCheckSig(int flags, char **argv) { int fd, ofd, res, res2, res3, missingKeys; struct rpmlead lead; @@ -203,10 +203,15 @@ int doCheckSig(int pgp, char **argv) sprintf(buffer, "%s: ", rpm); } while (headerNextIterator(sigIter, &tag, &type, &ptr, &count)) { - if ((tag == RPMSIGTAG_PGP) && !pgp) { + if ((tag == RPMSIGTAG_PGP) && !(flags & CHECKSIG_PGP)) continue; - } - if ((res3 = rpmVerifySignature(sigtarget, tag, ptr, count, result))) { + else if ((tag == RPMSIGTAG_MD5 || + tag == RPMSIGTAG_LITTLEENDIANMD5) + && !(flags & CHECKSIG_MD5)) + continue; + + if ((res3 = rpmVerifySignature(sigtarget, tag, ptr, count, + result))) { if (rpmIsVerbose()) { strcat(buffer, result); res2 = 1; diff --git a/checksig.h b/checksig.h index 2af89d5..354f9df 100644 --- a/checksig.h +++ b/checksig.h @@ -1,8 +1,10 @@ #ifndef H_CHECKSIG #define H_CHECKSIG -int doCheckSig(int pgp, char **argv); +#define CHECKSIG_PGP (1 << 0) +#define CHECKSIG_MD5 (1 << 1) +int doCheckSig(int flags, char **argv); int doReSign(int add, char *passPhrase, char **argv); #define ADD_SIGNATURE 1