1
0
mirror of git://git.gnupg.org/gnupg.git synced 2025-01-18 14:17:03 +01:00

* hkp.c (hkp_search): Translate string to search for from utf8 to native

before displaying it.

* keyserver.c (keyserver_search_prompt): Comments.
This commit is contained in:
David Shaw 2004-08-19 20:40:52 +00:00
parent 7f2369b7df
commit 081a9b6fb7
3 changed files with 19 additions and 9 deletions

View File

@ -1,3 +1,10 @@
2004-08-19 David Shaw <dshaw@jabberwocky.com>
* hkp.c (hkp_search): Translate string to search for from utf8 to
native before displaying it.
* keyserver.c (keyserver_search_prompt): Comments.
2004-08-19 Werner Koch <wk@g10code.de>
* seskey.c (encode_session_key): Changed the zero random byte

View File

@ -1,5 +1,6 @@
/* hkp.c - Horowitz Keyserver Protocol
* Copyright (C) 1998, 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
* Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003,
* 2004 Free Software Foundation, Inc.
*
* This file is part of GnuPG.
*
@ -486,11 +487,9 @@ int hkp_search(STRLIST tokens)
{
int rc=0,len=0,max,first=1;
#ifndef __riscos__
unsigned char *searchstr=NULL,*searchurl;
unsigned char *request;
unsigned char *searchstr=NULL,*searchstr_printable,*searchurl,*request;
#else
char *searchstr=NULL,*searchurl;
char *request;
char *searchstr=NULL,*searchstr_printable,*searchurl,*request;
#endif
struct http_context hd;
unsigned int hflags=opt.keyserver_options.honor_http_proxy?HTTP_FLAG_TRY_PROXY:0;
@ -520,8 +519,10 @@ int hkp_search(STRLIST tokens)
searchstr[len-1]='\0';
searchstr_printable=utf8_to_native(searchstr,len-1,0);
log_info(_("searching for \"%s\" from HKP server %s\n"),
searchstr,opt.keyserver_host);
searchstr_printable,opt.keyserver_host);
/* Now make it url-ish */
@ -616,7 +617,7 @@ int hkp_search(STRLIST tokens)
count--;
if(ret>-1)
keyserver_search_prompt(buffer,count,searchstr);
keyserver_search_prompt(buffer,count,searchstr_printable);
iobuf_close(buffer);
m_free(line);
@ -625,6 +626,7 @@ int hkp_search(STRLIST tokens)
m_free(request);
m_free(searchurl);
m_free(searchstr);
m_free(searchstr_printable);
return rc;
}

View File

@ -1,5 +1,5 @@
/* keyserver.c - generic keyserver code
* Copyright (C) 2001, 2002, 2003 Free Software Foundation, Inc.
* Copyright (C) 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
*
* This file is part of GnuPG.
*
@ -1020,7 +1020,8 @@ keyserver_search(STRLIST tokens)
/* Count and searchstr are just for cosmetics. If the count is too
small, it will grow safely. If negative it disables the "Key x-y
of z" messages. */
of z" messages. searchstr should be native (rather than utf8)
encoding since we're going to printf it. */
/* TODO: do this as a list sent to keyserver_work rather than calling
it once for each key to get the correct counts after the import