--- pgp/src/keyadd.c 2018/04/24 16:43:54 1.1.1.7 +++ pgp/src/keyadd.c 2018/04/24 16:44:52 1.1.1.8 @@ -662,8 +662,8 @@ LANG("\n\007Could not read key from file not keyfile */ extract_keyID(mykeyID, n); /* save this */ publickey = is_ctb_type(ctb, CTB_CERT_PUBKEY_TYPE); - if (get_publickey(&tfp, NULL, keyID, - timestamp, userid1, n1, e) >= 0) { + if ((status = get_publickey(&tfp, NULL, keyID, + timestamp, userid1, n1, e)) >= 0) { if (verbose) fprintf(pgpout, "Merging key ID: %s\n", @@ -677,6 +677,9 @@ LANG("\n\007Could not read key from file } copying = FALSE; --commonkeys; + } else { + if (status == -3) + --commonkeys; /* missing userid packet? */ } } }