diff options
author | Werner Koch <wk@gnupg.org> | 2010-04-21 18:26:17 +0200 |
---|---|---|
committer | Werner Koch <wk@gnupg.org> | 2010-04-21 18:26:17 +0200 |
commit | a1412b05debe693e6aabaf2c2c337bc33f7dfd41 (patch) | |
tree | 214dc8928b73aaa385d69eaa180164318ff0bb93 /g10/pkclist.c | |
parent | Disable card support for now (diff) | |
download | gnupg2-a1412b05debe693e6aabaf2c2c337bc33f7dfd41.tar.xz gnupg2-a1412b05debe693e6aabaf2c2c337bc33f7dfd41.zip |
More changes on the way to remove secring.gpg.
Diffstat (limited to 'g10/pkclist.c')
-rw-r--r-- | g10/pkclist.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/g10/pkclist.c b/g10/pkclist.c index ca5624a4b..394346cd6 100644 --- a/g10/pkclist.c +++ b/g10/pkclist.c @@ -697,7 +697,7 @@ key_present_in_pk_list(PK_LIST pk_list, PKT_public_key *pk) static char * default_recipient(void) { - PKT_secret_key *sk; + PKT_public_key *pk; byte fpr[MAX_FINGERPRINT_LEN+1]; size_t n; char *p; @@ -707,15 +707,15 @@ default_recipient(void) return xstrdup( opt.def_recipient ); if( !opt.def_recipient_self ) return NULL; - sk = xmalloc_clear( sizeof *sk ); - i = get_seckey_byname( sk, NULL, 0 ); + pk = xmalloc_clear( sizeof *pk ); + i = get_seckey_byname (pk, NULL); if( i ) { - free_secret_key( sk ); + free_public_key( pk ); return NULL; } n = MAX_FINGERPRINT_LEN; - fingerprint_from_sk( sk, fpr, &n ); - free_secret_key( sk ); + fingerprint_from_pk( pk, fpr, &n ); + free_public_key( pk ); p = xmalloc( 2*n+3 ); *p++ = '0'; *p++ = 'x'; |