- res = parse_subpackets(&packet->data[length + 4],
- packet->length - (4 + length),
- &length, keyid, creation);
- if (res != ONAK_E_OK) {
- return res;
+ /*
+ * Only look at the unhashed subpackets if we want the
+ * keyid and it wasn't in the signed subpacket
+ * section.
+ */
+ if (keyid != NULL && *keyid == 0) {
+ res = parse_subpackets(&packet->data[length + 4],
+ packet->length - (4 + length),
+ &length, keyid, NULL);
+ if (res != ONAK_E_OK) {
+ return res;
+ }