X-Git-Url: https://git.sthu.org/?p=pgp-tools.git;a=blobdiff_plain;f=keyanalyze%2Fprocess_keys.c;h=1472a3256e0835ee093da8b96df31a8d74c28998;hp=acf5c89a3fcf2fdbbea581bcb083e9401f7ebb15;hb=ddd873fa8372173c5615c38ca1a333a487ab6cb6;hpb=a7e4b047867d36750a61651dcceedd57971ebaab diff --git a/keyanalyze/process_keys.c b/keyanalyze/process_keys.c index acf5c89..1472a32 100644 --- a/keyanalyze/process_keys.c +++ b/keyanalyze/process_keys.c @@ -184,7 +184,7 @@ int main (int argc, char *argv[]) while (fgets (buff, sizeof (buff), stdin)) { - if ((s = strtok (buff, " \t\r\n"))) + if ((s = strtok (buff, ":"))) { if (!strcmp (s, "pub")) { @@ -194,8 +194,12 @@ int main (int argc, char *argv[]) lastuid = &k->uids->next; lastsig = &k->uids->sigs; - - sprintf (k->id, "%.16s", strtok (NULL, " \t\r\n")); + + strtok (NULL, ":"); + strtok (NULL, ":"); + strtok (NULL, ":"); + + sprintf (k->id, "%s", strtok (NULL, ":")); } else if (!strcmp (s, "rev")) k->rev = 1; @@ -209,7 +213,7 @@ int main (int argc, char *argv[]) { struct sig *sig = *lastsig = new_sig(); lastsig = &sig->next; - sprintf (sig->id, "%.16s", strtok (NULL, " \t\r\n")); + sprintf (sig->id, "%s", strtok (NULL, ":")); } } }