1
0
Fork 0
mirror of git://git.gnupg.org/gnupg.git synced 2025-07-03 22:56:33 +02:00

See ChangeLog: Wed Sep 22 10:14:17 CEST 1999 Werner Koch

This commit is contained in:
Werner Koch 1999-09-22 08:14:21 +00:00
parent db78307c03
commit 2f94e980b2
7 changed files with 86 additions and 18 deletions

View file

@ -594,21 +594,28 @@ clearsign_file( const char *fname, STRLIST locusr, const char *outfile )
}
}
if( old_style || only_md5 )
if( old_style && only_md5 )
iobuf_writestr(out, "\n" );
else {
const char *s;
int any = 0;
byte hashs_seen[256];
memset( hashs_seen, 0, sizeof hashs_seen );
iobuf_writestr(out, "Hash: " );
for( sk_rover = sk_list; sk_rover; sk_rover = sk_rover->next ) {
PKT_secret_key *sk = sk_rover->sk;
s = digest_algo_to_string( hash_for(sk->pubkey_algo) );
if( s ) {
if( any )
iobuf_put(out, ',' );
iobuf_writestr(out, s );
any = 1;
int i = hash_for(sk->pubkey_algo);
if( !hashs_seen[ i & 0xff ] ) {
s = digest_algo_to_string( i );
if( s ) {
hashs_seen[ i & 0xff ] = 1;
if( any )
iobuf_put(out, ',' );
iobuf_writestr(out, s );
any = 1;
}
}
}
assert(any);