+/**
+ * find_signature - Checks to see if an OpenPGP signature exists in a list.
+ * @packet_list: The list of packets to look in.
+ * @packet: The signature to look for.
+ *
+ * Walks through the packet_list checking to see if the signature given is
+ * present in it. Returns a pointer to it if it is, NULL otherwise.
+ *
+ */
+struct openpgp_packet_list *find_signature(
+ struct openpgp_packet_list *packet_list,
+ struct openpgp_packet *packet)
+{
+ struct openpgp_packet_list *found = NULL;
+
+ while (!found && packet_list != NULL) {
+ if (compare_signatures(packet_list->packet, packet)) {
+ found = packet_list;
+ }
+ packet_list = packet_list -> next;
+ }
+
+ return found;
+}
+