diff options
author | David Shaw <[email protected]> | 2005-04-17 04:10:03 +0000 |
---|---|---|
committer | David Shaw <[email protected]> | 2005-04-17 04:10:03 +0000 |
commit | b7c3018d32a6512b3b80e916b160f51514d5fd55 (patch) | |
tree | ff1be3af3407a5a572cf3cc174af07e039da17ba | |
parent | * gpgkeys_hkp.c: New hkp handler that uses curl or curl-shim. (diff) | |
download | gnupg-b7c3018d32a6512b3b80e916b160f51514d5fd55.tar.gz gnupg-b7c3018d32a6512b3b80e916b160f51514d5fd55.zip |
* keyserver.c (keyserver_spawn): Free some memory.
* sign.c (hash_for): Comments.
-rw-r--r-- | g10/ChangeLog | 6 | ||||
-rw-r--r-- | g10/keyserver.c | 12 | ||||
-rw-r--r-- | g10/sign.c | 14 |
3 files changed, 31 insertions, 1 deletions
diff --git a/g10/ChangeLog b/g10/ChangeLog index 2198ed328..86ec01cfe 100644 --- a/g10/ChangeLog +++ b/g10/ChangeLog @@ -1,3 +1,9 @@ +2005-04-16 David Shaw <[email protected]> + + * keyserver.c (keyserver_spawn): Free some memory. + + * sign.c (hash_for): Comments. + 2005-04-11 Werner Koch <[email protected]> * g10.c (main, add_notation_data, add_policy_url) diff --git a/g10/keyserver.c b/g10/keyserver.c index a4db688b9..90013f990 100644 --- a/g10/keyserver.c +++ b/g10/keyserver.c @@ -800,6 +800,14 @@ keyserver_search_prompt(IOBUF buffer,const char *searchstr) } notfound: + /* Leave this commented out or now, and perhaps for a very long + time. All HKPish servers return HTML error messages for + no-key-found. */ + /* + if(!started) + log_info(_("keyserver does not support searching\n")); + else + */ if(count==0) { if(localstr) @@ -851,7 +859,7 @@ keyserver_spawn(int action,STRLIST list,KEYDB_SEARCH_DESC *desc, int ret=0,i,gotversion=0,outofband=0; STRLIST temp; unsigned int maxlen,buflen; - char *command=NULL,*searchstr=NULL; + char *command,*searchstr=NULL; byte *line=NULL; struct parse_options *kopts; struct exec_info *spawn; @@ -920,6 +928,8 @@ keyserver_spawn(int action,STRLIST list,KEYDB_SEARCH_DESC *desc, else ret=exec_write(&spawn,command,NULL,NULL,0,0); + m_free(command); + if(ret) return ret; diff --git a/g10/sign.c b/g10/sign.c index 9777d0553..814f3816d 100644 --- a/g10/sign.c +++ b/g10/sign.c @@ -391,6 +391,20 @@ complete_sig( PKT_signature *sig, PKT_secret_key *sk, MD_HANDLE md ) return rc; } +/* + First try --digest-algo. If that isn't set, see if the recipient + has a preferred algorithm (which is also filtered through + --preferred-digest-prefs). If we're making a signature without a + particular recipient (i.e. signing, rather than signing+encrypting) + then take the first algorithm in --preferred-digest-prefs that is + usable for the pubkey algorithm. If --preferred-digest-prefs isn't + set, then take the OpenPGP default (i.e. SHA-1). + + Possible improvement: Use the highest-ranked usable algorithm from + the signing key prefs either before or after using the personal + list? +*/ + static int hash_for(int pubkey_algo, int packet_version ) { |