summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
5538c57)
Hanna Wallach reported an issue with UID revokations. This was because
we weren't allowing multiple signatures from the same keyid for a UID;
we now check the signature type and allow them if they're different.
*
* Jonathan McDowell <noodles@earth.li>
*
*
* Jonathan McDowell <noodles@earth.li>
*
- * Copyright 2002 Project Purple
+ * Copyright 2002-2005 Project Purple
{
char *uid = NULL;
uint64_t sigid = 0;
{
char *uid = NULL;
uint64_t sigid = 0;
while (sigs != NULL) {
sigid = sig_keyid(sigs->packet);
uid = keyid2uid(sigid);
while (sigs != NULL) {
sigid = sig_keyid(sigs->packet);
uid = keyid2uid(sigid);
+ if (sigs->packet->data[0] == 4 &&
+ sigs->packet->data[1] == 0x30) {
+ /* It's a Type 4 sig revocation */
+ sig = "rev";
+ } else {
+ sig = "sig";
+ }
if (html && uid != NULL) {
if (html && uid != NULL) {
- printf("sig <a href=\"lookup?op=get&"
+ printf("%s <a href=\"lookup?op=get&"
"search=%08llX\">%08llX</a> "
"<a href=\"lookup?op=vindex&search=0x%08llX\">"
"%s</a>\n",
"search=%08llX\">%08llX</a> "
"<a href=\"lookup?op=vindex&search=0x%08llX\">"
"%s</a>\n",
sigid & 0xFFFFFFFF,
sigid & 0xFFFFFFFF,
sigid & 0xFFFFFFFF,
txt2html(uid));
} else if (html && uid == NULL) {
sigid & 0xFFFFFFFF,
sigid & 0xFFFFFFFF,
sigid & 0xFFFFFFFF,
txt2html(uid));
} else if (html && uid == NULL) {
sigid & 0xFFFFFFFF);
} else {
sigid & 0xFFFFFFFF);
} else {
sigid & 0xFFFFFFFF,
(uid != NULL) ? uid :
"[User id not found]");
sigid & 0xFFFFFFFF,
(uid != NULL) ? uid :
"[User id not found]");
*
* Jonathan McDowell <noodles@earth.li>
*
*
* Jonathan McDowell <noodles@earth.li>
*
- * Copyright 2002-2004 Project Purple
+ * Copyright 2002-2005 Project Purple
*/
bool compare_signatures(struct openpgp_packet *a, struct openpgp_packet *b)
{
*/
bool compare_signatures(struct openpgp_packet *a, struct openpgp_packet *b)
{
- return (sig_keyid(a) == sig_keyid(b));
+ if (a->data[0] != b->data[0]) {
+ /* Different signature versions, so not the same */
+ return false;
+ } else if (a->data[0] == 4 && a->data[1] != b->data[1]) {
+ /* Type 4 signature, but different types */
+ return false;
+ /* TODO: Check signature time? */
+ } else {
+ return (sig_keyid(a) == sig_keyid(b));
+ }