projects
/
onak.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Update Debian Vcs-* fields to point to git repository
[onak.git]
/
stripkey.c
diff --git
a/stripkey.c
b/stripkey.c
index cefab42fe97479ce10e2856ce3b6857e36b4ee27..e0fb5e38a56957699c70b7630ca1e7291b2e2a48 100644
(file)
--- a/
stripkey.c
+++ b/
stripkey.c
@@
-47,7
+47,6
@@
int main(int argc, char** argv) {
struct openpgp_signedpacket_list *uid = NULL;
struct openpgp_packet_list *sig = NULL;
struct openpgp_packet_list *prevsig = NULL;
struct openpgp_signedpacket_list *uid = NULL;
struct openpgp_packet_list *sig = NULL;
struct openpgp_packet_list *prevsig = NULL;
- int result = 0;
uint64_t my_key = 0;
if( argc > 1 )
uint64_t my_key = 0;
if( argc > 1 )
@@
-57,14
+56,15
@@
int main(int argc, char** argv) {
/* strip each key of everything but its pubkey component, uids and
* selfsigs and revsigs on those selfsigs */
/* strip each key of everything but its pubkey component, uids and
* selfsigs and revsigs on those selfsigs */
- re
sult = re
ad_openpgp_stream( stdin_getchar, NULL, &packets, 0 );
-
result =
parse_keys( packets, &keys );
+ read_openpgp_stream( stdin_getchar, NULL, &packets, 0 );
+ parse_keys( packets, &keys );
free_packet_list(packets);
packets = NULL;
free_packet_list(packets);
packets = NULL;
-
result =
cleankeys( keys );
+ cleankeys( keys );
/* Iterate over the keys... */
for( key = keys; key; key = key->next ) {
/* Iterate over the keys... */
for( key = keys; key; key = key->next ) {
- uint64_t keyid = get_keyid( key );
+ uint64_t keyid;
+ get_keyid( key, &keyid );
for( uid = key->uids; uid; uid = uid->next ) {
REPEATTHISUID:
for( sig = uid->sigs, prevsig = NULL;
for( uid = key->uids; uid; uid = uid->next ) {
REPEATTHISUID:
for( sig = uid->sigs, prevsig = NULL;
@@
-84,8
+84,8
@@
int main(int argc, char** argv) {
}
}
}
}
}
}
- flatten_publickey( key, &packets, &list_end );
}
}
+ flatten_publickey( keys, &packets, &list_end );
write_openpgp_stream( stdout_putchar, NULL, packets );
return 0;
}
write_openpgp_stream( stdout_putchar, NULL, packets );
return 0;
}