mirror of
git://git.gnupg.org/gnupg.git
synced 2025-01-05 12:31:50 +01:00
* hkp.c (dehtmlize): Understand the quote character (i.e. """) in
HTML responses. * keydb.h, getkey.c (get_user_id_printable): Rename to get_user_id_native and remove the printable stuff since we're print-ifying valid utf8 characters. Change all callers in import.c, sign.c, and encode.c.
This commit is contained in:
parent
081a9b6fb7
commit
297459b28b
@ -1,3 +1,13 @@
|
|||||||
|
2004-08-20 David Shaw <dshaw@jabberwocky.com>
|
||||||
|
|
||||||
|
* hkp.c (dehtmlize): Understand the quote character
|
||||||
|
(i.e. """) in HTML responses.
|
||||||
|
|
||||||
|
* keydb.h, getkey.c (get_user_id_printable): Rename to
|
||||||
|
get_user_id_native and remove the printable stuff since we're
|
||||||
|
print-ifying valid utf8 characters. Change all callers in
|
||||||
|
import.c, sign.c, and encode.c.
|
||||||
|
|
||||||
2004-08-19 David Shaw <dshaw@jabberwocky.com>
|
2004-08-19 David Shaw <dshaw@jabberwocky.com>
|
||||||
|
|
||||||
* hkp.c (hkp_search): Translate string to search for from utf8 to
|
* hkp.c (hkp_search): Translate string to search for from utf8 to
|
||||||
|
@ -740,7 +740,7 @@ write_pubkey_enc_from_list( PK_LIST pk_list, DEK *dek, IOBUF out )
|
|||||||
log_error("pubkey_encrypt failed: %s\n", g10_errstr(rc) );
|
log_error("pubkey_encrypt failed: %s\n", g10_errstr(rc) );
|
||||||
else {
|
else {
|
||||||
if( opt.verbose ) {
|
if( opt.verbose ) {
|
||||||
char *ustr = get_user_id_string_printable (enc->keyid);
|
char *ustr = get_user_id_string_native (enc->keyid);
|
||||||
log_info(_("%s/%s encrypted for: \"%s\"\n"),
|
log_info(_("%s/%s encrypted for: \"%s\"\n"),
|
||||||
pubkey_algo_to_string(enc->pubkey_algo),
|
pubkey_algo_to_string(enc->pubkey_algo),
|
||||||
cipher_algo_to_string(dek->algo), ustr );
|
cipher_algo_to_string(dek->algo), ustr );
|
||||||
|
14
g10/getkey.c
14
g10/getkey.c
@ -1,5 +1,5 @@
|
|||||||
/* getkey.c - Get a key from the database
|
/* getkey.c - Get a key from the database
|
||||||
* Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003
|
* Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003,
|
||||||
* 2004 Free Software Foundation, Inc.
|
* 2004 Free Software Foundation, Inc.
|
||||||
*
|
*
|
||||||
* This file is part of GnuPG.
|
* This file is part of GnuPG.
|
||||||
@ -2611,14 +2611,12 @@ get_user_id_string( u32 *keyid )
|
|||||||
|
|
||||||
|
|
||||||
char*
|
char*
|
||||||
get_user_id_string_printable ( u32 *keyid )
|
get_user_id_string_native ( u32 *keyid )
|
||||||
{
|
{
|
||||||
char *p = get_user_id_string( keyid );
|
char *p = get_user_id_string( keyid );
|
||||||
char *p2 = utf8_to_native( p, strlen(p), 0 );
|
char *p2 = utf8_to_native( p, strlen(p), 0 );
|
||||||
m_free(p);
|
m_free(p);
|
||||||
p = make_printable_string (p2, strlen (p2), 0);
|
return p2;
|
||||||
m_free (p2);
|
|
||||||
return p;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -2675,15 +2673,13 @@ get_user_id( u32 *keyid, size_t *rn )
|
|||||||
}
|
}
|
||||||
|
|
||||||
char*
|
char*
|
||||||
get_user_id_printable( u32 *keyid )
|
get_user_id_native( u32 *keyid )
|
||||||
{
|
{
|
||||||
size_t rn;
|
size_t rn;
|
||||||
char *p = get_user_id( keyid, &rn );
|
char *p = get_user_id( keyid, &rn );
|
||||||
char *p2 = utf8_to_native( p, rn, 0 );
|
char *p2 = utf8_to_native( p, rn, 0 );
|
||||||
m_free(p);
|
m_free(p);
|
||||||
p = make_printable_string (p2, strlen (p2), 0);
|
return p2;
|
||||||
m_free (p2);
|
|
||||||
return p;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
KEYDB_HANDLE
|
KEYDB_HANDLE
|
||||||
|
10
g10/hkp.c
10
g10/hkp.c
@ -310,6 +310,16 @@ dehtmlize(char *line)
|
|||||||
line+=5;
|
line+=5;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
else if((*(line+1)!='\0' && ascii_tolower(*(line+1))=='q') &&
|
||||||
|
(*(line+2)!='\0' && ascii_tolower(*(line+2))=='u') &&
|
||||||
|
(*(line+3)!='\0' && ascii_tolower(*(line+3))=='o') &&
|
||||||
|
(*(line+4)!='\0' && ascii_tolower(*(line+4))=='t') &&
|
||||||
|
(*(line+5)!='\0' && *(line+5)==';'))
|
||||||
|
{
|
||||||
|
parsed[parsedindex++]='"';
|
||||||
|
line+=6;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
default:
|
default:
|
||||||
parsed[parsedindex++]=*line;
|
parsed[parsedindex++]=*line;
|
||||||
|
10
g10/import.c
10
g10/import.c
@ -658,7 +658,7 @@ import_one( const char *fname, KBNODE keyblock, int fast,
|
|||||||
|
|
||||||
/* we are ready */
|
/* we are ready */
|
||||||
if( !opt.quiet ) {
|
if( !opt.quiet ) {
|
||||||
char *p=get_user_id_printable (keyid);
|
char *p=get_user_id_native (keyid);
|
||||||
log_info( _("key %08lX: public key \"%s\" imported\n"),
|
log_info( _("key %08lX: public key \"%s\" imported\n"),
|
||||||
(ulong)keyid[1],p);
|
(ulong)keyid[1],p);
|
||||||
m_free(p);
|
m_free(p);
|
||||||
@ -734,7 +734,7 @@ import_one( const char *fname, KBNODE keyblock, int fast,
|
|||||||
|
|
||||||
/* we are ready */
|
/* we are ready */
|
||||||
if( !opt.quiet ) {
|
if( !opt.quiet ) {
|
||||||
char *p=get_user_id_printable(keyid);
|
char *p=get_user_id_native(keyid);
|
||||||
if( n_uids == 1 )
|
if( n_uids == 1 )
|
||||||
log_info( _("key %08lX: \"%s\" 1 new user ID\n"),
|
log_info( _("key %08lX: \"%s\" 1 new user ID\n"),
|
||||||
(ulong)keyid[1], p);
|
(ulong)keyid[1], p);
|
||||||
@ -769,7 +769,7 @@ import_one( const char *fname, KBNODE keyblock, int fast,
|
|||||||
print_import_ok (pk, NULL, 0);
|
print_import_ok (pk, NULL, 0);
|
||||||
|
|
||||||
if( !opt.quiet ) {
|
if( !opt.quiet ) {
|
||||||
char *p=get_user_id_printable(keyid);
|
char *p=get_user_id_native(keyid);
|
||||||
log_info( _("key %08lX: \"%s\" not changed\n"),
|
log_info( _("key %08lX: \"%s\" not changed\n"),
|
||||||
(ulong)keyid[1],p);
|
(ulong)keyid[1],p);
|
||||||
m_free(p);
|
m_free(p);
|
||||||
@ -974,7 +974,7 @@ import_revoke_cert( const char *fname, KBNODE node, struct stats_s *stats )
|
|||||||
keydb_release (hd); hd = NULL;
|
keydb_release (hd); hd = NULL;
|
||||||
/* we are ready */
|
/* we are ready */
|
||||||
if( !opt.quiet ) {
|
if( !opt.quiet ) {
|
||||||
char *p=get_user_id_printable (keyid);
|
char *p=get_user_id_native (keyid);
|
||||||
log_info( _("key %08lX: \"%s\" revocation certificate imported\n"),
|
log_info( _("key %08lX: \"%s\" revocation certificate imported\n"),
|
||||||
(ulong)keyid[1],p);
|
(ulong)keyid[1],p);
|
||||||
m_free(p);
|
m_free(p);
|
||||||
@ -1502,7 +1502,7 @@ merge_blocks( const char *fname, KBNODE keyblock_orig, KBNODE keyblock,
|
|||||||
++*n_sigs;
|
++*n_sigs;
|
||||||
if(!opt.quiet)
|
if(!opt.quiet)
|
||||||
{
|
{
|
||||||
char *p=get_user_id_printable (keyid);
|
char *p=get_user_id_native (keyid);
|
||||||
log_info(_("key %08lX: \"%s\" revocation "
|
log_info(_("key %08lX: \"%s\" revocation "
|
||||||
"certificate added\n"), (ulong)keyid[1],p);
|
"certificate added\n"), (ulong)keyid[1],p);
|
||||||
m_free(p);
|
m_free(p);
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
/* keydb.h - Key database
|
/* keydb.h - Key database
|
||||||
* Copyright (C) 1998, 1999, 2000, 2001 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.
|
||||||
*
|
*
|
||||||
@ -218,10 +219,10 @@ void get_seckey_end( GETKEY_CTX ctx );
|
|||||||
int enum_secret_keys( void **context, PKT_secret_key *sk, int with_subkeys );
|
int enum_secret_keys( void **context, PKT_secret_key *sk, int with_subkeys );
|
||||||
void merge_keys_and_selfsig( KBNODE keyblock );
|
void merge_keys_and_selfsig( KBNODE keyblock );
|
||||||
char*get_user_id_string( u32 *keyid );
|
char*get_user_id_string( u32 *keyid );
|
||||||
char*get_user_id_string_printable( u32 *keyid );
|
char*get_user_id_string_native( u32 *keyid );
|
||||||
char*get_long_user_id_string( u32 *keyid );
|
char*get_long_user_id_string( u32 *keyid );
|
||||||
char*get_user_id( u32 *keyid, size_t *rn );
|
char*get_user_id( u32 *keyid, size_t *rn );
|
||||||
char*get_user_id_printable( u32 *keyid );
|
char*get_user_id_native( u32 *keyid );
|
||||||
KEYDB_HANDLE get_ctx_handle(GETKEY_CTX ctx);
|
KEYDB_HANDLE get_ctx_handle(GETKEY_CTX ctx);
|
||||||
|
|
||||||
/*-- keyid.c --*/
|
/*-- keyid.c --*/
|
||||||
|
@ -318,7 +318,7 @@ do_sign( PKT_secret_key *sk, PKT_signature *sig,
|
|||||||
log_error(_("signing failed: %s\n"), g10_errstr(rc) );
|
log_error(_("signing failed: %s\n"), g10_errstr(rc) );
|
||||||
else {
|
else {
|
||||||
if( opt.verbose ) {
|
if( opt.verbose ) {
|
||||||
char *ustr = get_user_id_string_printable (sig->keyid);
|
char *ustr = get_user_id_string_native (sig->keyid);
|
||||||
log_info(_("%s signature from: \"%s\"\n"),
|
log_info(_("%s signature from: \"%s\"\n"),
|
||||||
pubkey_algo_to_string(sk->pubkey_algo), ustr );
|
pubkey_algo_to_string(sk->pubkey_algo), ustr );
|
||||||
m_free(ustr);
|
m_free(ustr);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user