X-Git-Url: https://git.sommitrealweird.co.uk/onak.git/blobdiff_plain/a57a146ebc3f15f1ba2dfe8ecb9b59702fb8f799..bf52d4344cd29ab86c1d5981d2ea4d1717eb2f84:/merge.c?ds=inline diff --git a/merge.c b/merge.c index 95abbba..4379596 100644 --- a/merge.c +++ b/merge.c @@ -3,7 +3,7 @@ * * Jonathan McDowell * - * Copyright 2002-2004 Project Purple + * Copyright 2002-2005 Project Purple */ #include @@ -43,7 +43,16 @@ bool compare_packets(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)); + } } /**