mirror of
git://git.gnupg.org/gnupg.git
synced 2025-05-24 16:43:28 +02: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:
parent
7f2369b7df
commit
081a9b6fb7
@ -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>
|
2004-08-19 Werner Koch <wk@g10code.de>
|
||||||
|
|
||||||
* seskey.c (encode_session_key): Changed the zero random byte
|
* seskey.c (encode_session_key): Changed the zero random byte
|
||||||
|
16
g10/hkp.c
16
g10/hkp.c
@ -1,5 +1,6 @@
|
|||||||
/* hkp.c - Horowitz Keyserver Protocol
|
/* 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.
|
* This file is part of GnuPG.
|
||||||
*
|
*
|
||||||
@ -486,11 +487,9 @@ int hkp_search(STRLIST tokens)
|
|||||||
{
|
{
|
||||||
int rc=0,len=0,max,first=1;
|
int rc=0,len=0,max,first=1;
|
||||||
#ifndef __riscos__
|
#ifndef __riscos__
|
||||||
unsigned char *searchstr=NULL,*searchurl;
|
unsigned char *searchstr=NULL,*searchstr_printable,*searchurl,*request;
|
||||||
unsigned char *request;
|
|
||||||
#else
|
#else
|
||||||
char *searchstr=NULL,*searchurl;
|
char *searchstr=NULL,*searchstr_printable,*searchurl,*request;
|
||||||
char *request;
|
|
||||||
#endif
|
#endif
|
||||||
struct http_context hd;
|
struct http_context hd;
|
||||||
unsigned int hflags=opt.keyserver_options.honor_http_proxy?HTTP_FLAG_TRY_PROXY:0;
|
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[len-1]='\0';
|
||||||
|
|
||||||
|
searchstr_printable=utf8_to_native(searchstr,len-1,0);
|
||||||
|
|
||||||
log_info(_("searching for \"%s\" from HKP server %s\n"),
|
log_info(_("searching for \"%s\" from HKP server %s\n"),
|
||||||
searchstr,opt.keyserver_host);
|
searchstr_printable,opt.keyserver_host);
|
||||||
|
|
||||||
/* Now make it url-ish */
|
/* Now make it url-ish */
|
||||||
|
|
||||||
@ -616,7 +617,7 @@ int hkp_search(STRLIST tokens)
|
|||||||
count--;
|
count--;
|
||||||
|
|
||||||
if(ret>-1)
|
if(ret>-1)
|
||||||
keyserver_search_prompt(buffer,count,searchstr);
|
keyserver_search_prompt(buffer,count,searchstr_printable);
|
||||||
|
|
||||||
iobuf_close(buffer);
|
iobuf_close(buffer);
|
||||||
m_free(line);
|
m_free(line);
|
||||||
@ -625,6 +626,7 @@ int hkp_search(STRLIST tokens)
|
|||||||
m_free(request);
|
m_free(request);
|
||||||
m_free(searchurl);
|
m_free(searchurl);
|
||||||
m_free(searchstr);
|
m_free(searchstr);
|
||||||
|
m_free(searchstr_printable);
|
||||||
|
|
||||||
return rc;
|
return rc;
|
||||||
}
|
}
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/* keyserver.c - generic keyserver code
|
/* 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.
|
* 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
|
/* 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
|
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
|
/* 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
|
it once for each key to get the correct counts after the import
|
||||||
|
Loading…
x
Reference in New Issue
Block a user