|
Paul Nasrat |
4fe8a5 |
--- rpm-4.4.2/lib/poptQV.c.trust 2004-11-09 19:50:42.000000000 -0500
|
|
Paul Nasrat |
4fe8a5 |
+++ rpm-4.4.2/lib/poptQV.c 2006-04-27 13:42:31.000000000 -0400
|
|
Paul Nasrat |
ef1157 |
@@ -31,6 +31,10 @@
|
|
Paul Nasrat |
ef1157 |
#define POPT_HDLIST -1011
|
|
Paul Nasrat |
ef1157 |
#define POPT_FTSWALK -1012
|
|
Paul Nasrat |
ef1157 |
|
|
Paul Nasrat |
ef1157 |
+/* -1025 thrugh -1032 are common in rpmcli.h. */
|
|
Paul Nasrat |
ef1157 |
+#define POPT_TARGETPLATFORM -1036
|
|
Paul Nasrat |
ef1157 |
+#define POPT_TRUST -1037
|
|
Paul Nasrat |
ef1157 |
+
|
|
Paul Nasrat |
ef1157 |
/* ========== Query/Verify/Signature source args */
|
|
Paul Nasrat |
ef1157 |
static void rpmQVSourceArgCallback( /*@unused@*/ poptContext con,
|
|
Paul Nasrat |
ef1157 |
/*@unused@*/ enum poptCallbackReason reason,
|
|
Paul Nasrat |
4fe8a5 |
@@ -240,6 +244,14 @@
|
|
Paul Nasrat |
4fe8a5 |
qva->qva_flags |= VERIFY_SCRIPT;
|
|
Paul Nasrat |
ef1157 |
break;
|
|
Paul Nasrat |
4fe8a5 |
|
|
Paul Nasrat |
ef1157 |
+ /* XXX perhaps POPT_ARG_INT instead of callback. */
|
|
Paul Nasrat |
ef1157 |
+ case POPT_TRUST:
|
|
Paul Nasrat |
ef1157 |
+ { char * end = NULL;
|
|
Paul Nasrat |
ef1157 |
+ long trust = (int) strtol(arg, &end, 0);
|
|
Paul Nasrat |
ef1157 |
+ /* XXX range checks on trust. */
|
|
Paul Nasrat |
ef1157 |
+ /* XXX if (end && *end) argerror(_("non-numeric trust metric.")); */
|
|
Paul Nasrat |
ef1157 |
+ qva->trust = trust;
|
|
Paul Nasrat |
ef1157 |
+ } break;
|
|
Paul Nasrat |
ef1157 |
}
|
|
Paul Nasrat |
ef1157 |
}
|
|
Paul Nasrat |
ef1157 |
|
|
Paul Nasrat |
4fe8a5 |
@@ -376,14 +388,6 @@
|
|
Paul Nasrat |
ef1157 |
N_("don't verify package signature(s)"), NULL },
|
|
Paul Nasrat |
ef1157 |
#endif
|
|
Paul Nasrat |
ef1157 |
|
|
Paul Nasrat |
ef1157 |
-/** @todo Add --nogpg/--nopgp aliases to rpmpopt, eliminate. */
|
|
Paul Nasrat |
ef1157 |
- { "nogpg", '\0', POPT_BIT_SET|POPT_ARGFLAG_DOC_HIDDEN,
|
|
Paul Nasrat |
ef1157 |
- &rpmQVKArgs.qva_flags, VERIFY_SIGNATURE,
|
|
Paul Nasrat |
ef1157 |
- N_("don't verify GPG V3 DSA signature(s)"), NULL },
|
|
Paul Nasrat |
ef1157 |
- { "nopgp", '\0', POPT_BIT_SET|POPT_ARGFLAG_DOC_HIDDEN,
|
|
Paul Nasrat |
ef1157 |
- &rpmQVKArgs.qva_flags, VERIFY_SIGNATURE,
|
|
Paul Nasrat |
ef1157 |
- N_("don't verify PGP V3 RSA/MD5 signature(s)"), NULL },
|
|
Paul Nasrat |
ef1157 |
-
|
|
Paul Nasrat |
ef1157 |
POPT_TABLEEND
|
|
Paul Nasrat |
ef1157 |
};
|
|
Paul Nasrat |
ef1157 |
|
|
Paul Nasrat |
4fe8a5 |
@@ -408,6 +412,15 @@
|
|
Paul Nasrat |
ef1157 |
N_("sign package(s) (identical to --addsign)"), NULL },
|
|
Paul Nasrat |
ef1157 |
{ "sign", '\0', POPT_ARGFLAG_DOC_HIDDEN, &rpmQVKArgs.sign, 0,
|
|
Paul Nasrat |
ef1157 |
N_("generate signature"), NULL },
|
|
Paul Nasrat |
ef1157 |
+ /* XXX perhaps POPT_ARG_INT instead of callback. */
|
|
Paul Nasrat |
ef1157 |
+ { "trust", '\0', POPT_ARG_STRING|POPT_ARGFLAG_DOC_HIDDEN, 0, POPT_TRUST,
|
|
Paul Nasrat |
ef1157 |
+ N_("specify trust metric"), "TRUST" },
|
|
Paul Nasrat |
ef1157 |
+ { "trusted", '\0', POPT_ARG_VAL|POPT_ARGFLAG_DOC_HIDDEN,
|
|
Paul Nasrat |
ef1157 |
+ &rpmQVKArgs.trust, 1,
|
|
Paul Nasrat |
ef1157 |
+ N_("set ultimate trust when importing pubkey(s)"), NULL },
|
|
Paul Nasrat |
ef1157 |
+ { "untrusted", '\0', POPT_ARG_VAL|POPT_ARGFLAG_DOC_HIDDEN,
|
|
Paul Nasrat |
ef1157 |
+ &rpmQVKArgs.trust, -1,
|
|
Paul Nasrat |
ef1157 |
+ N_("unset ultimate trust when importing pubkey(s)"), NULL },
|
|
Paul Nasrat |
ef1157 |
|
|
Paul Nasrat |
ef1157 |
{ "nodigest", '\0', POPT_BIT_SET, &rpmQVKArgs.qva_flags, VERIFY_DIGEST,
|
|
Paul Nasrat |
ef1157 |
N_("don't verify package digest(s)"), NULL },
|
|
Paul Nasrat |
4fe8a5 |
--- rpm-4.4.2/lib/rpmcli.h.trust 2005-01-04 11:35:05.000000000 -0500
|
|
Paul Nasrat |
4fe8a5 |
+++ rpm-4.4.2/lib/rpmcli.h 2006-04-27 13:37:40.000000000 -0400
|
|
Paul Nasrat |
ef1157 |
@@ -280,6 +280,7 @@
|
|
Paul Nasrat |
ef1157 |
/*@only@*/ /*@null@*/
|
|
Paul Nasrat |
ef1157 |
const char * qva_queryFormat;/*!< Format for headerSprintf(). */
|
|
Paul Nasrat |
ef1157 |
int sign; /*!< Is a passphrase needed? */
|
|
Paul Nasrat |
ef1157 |
+ int trust; /*!< Trust metric when importing pubkeys. */
|
|
Paul Nasrat |
ef1157 |
/*@observer@*/
|
|
Paul Nasrat |
ef1157 |
const char * passPhrase; /*!< Pass phrase. */
|
|
Paul Nasrat |
ef1157 |
/*@observer@*/ /*@null@*/
|