diff options
Diffstat (limited to 'g10')
-rw-r--r-- | g10/ChangeLog | 10 | ||||
-rw-r--r-- | g10/passphrase.c | 8 |
2 files changed, 16 insertions, 2 deletions
diff --git a/g10/ChangeLog b/g10/ChangeLog index 0be49aec0..eaf5ec360 100644 --- a/g10/ChangeLog +++ b/g10/ChangeLog @@ -1,3 +1,13 @@ +2001-05-04 Werner Koch <[email protected]> + + * passphrase.c (passphrase_clear_cache): Shortcut if agent usage + is not enabled. + +2001-05-01 Werner Koch <[email protected]> + + * passphrase.c (writen): Replaced ssize_t by int. Thanks to + to Robert Joop for reporting that SunOS 4.1.4 does not have it. + 2001-04-28 Werner Koch <[email protected]> * getkey.c (merge_public_with_secret): pkttype was not set to subkey. diff --git a/g10/passphrase.c b/g10/passphrase.c index b85943264..a34ebbd61 100644 --- a/g10/passphrase.c +++ b/g10/passphrase.c @@ -158,7 +158,7 @@ static int writen ( int fd, const void *buf, size_t nbytes ) { size_t nleft = nbytes; - ssize_t nwritten; + int nwritten; while( nleft > 0 ) { nwritten = write( fd, buf, nleft ); @@ -435,13 +435,17 @@ passphrase_clear_cache ( u32 *keyid, int algo ) int fd = -1; int nread; u32 reply; - PKT_public_key *pk = m_alloc_clear ( sizeof *pk ); + PKT_public_key *pk; byte fpr[MAX_FINGERPRINT_LEN]; #if MAX_FINGERPRINT_LEN < 20 #error agent needs a 20 byte fingerprint #endif + if (!opt.use_agent) + return; + + pk = m_alloc_clear ( sizeof *pk ); memset (fpr, 0, MAX_FINGERPRINT_LEN ); if( !keyid || get_pubkey( pk, keyid ) ) { log_debug ("oops, no key in passphrase_clear_cache\n"); |