allows you to omit md5 signature checks
authorewt <devnull@localhost>
Thu, 23 Jan 1997 20:55:52 +0000 (20:55 +0000)
committerewt <devnull@localhost>
Thu, 23 Jan 1997 20:55:52 +0000 (20:55 +0000)
CVS patchset: 1346
CVS date: 1997/01/23 20:55:52

checksig.c
checksig.h

index 2deaccb..4f10bda 100644 (file)
@@ -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;
index 2af89d5..354f9df 100644 (file)
@@ -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