mirror of
git://git.gnupg.org/gnupg.git
synced 2025-02-22 19:58:29 +01:00
* photoid.c (get_default_photo_command, show_photos): Honor
FIXED_PHOTO_VIEWER and DISABLE_PHOTO_VIEWER. * mainproc.c (check_sig_and_print): Use --show-photos to show photos when verifying a sig made by a key with a photo. * keyserver.c (parse_keyserver_uri): Properly parse a URI with no :port section and an empty file path, but with a terminating '/'. (keyserver_work): Honor DISABLE_KEYSERVER_HELPERS. * hkp.c (hkp_ask_import): Display keyserver URI as a URI, but only if verbose. * exec.c, g10.c: USE_EXEC_PATH -> FIXED_EXEC_PATH
This commit is contained in:
parent
5d74fb31d8
commit
32b11e4501
@ -1,3 +1,20 @@
|
|||||||
|
2002-07-04 David Shaw <dshaw@jabberwocky.com>
|
||||||
|
|
||||||
|
* photoid.c (get_default_photo_command, show_photos): Honor
|
||||||
|
FIXED_PHOTO_VIEWER and DISABLE_PHOTO_VIEWER.
|
||||||
|
|
||||||
|
* mainproc.c (check_sig_and_print): Use --show-photos to show
|
||||||
|
photos when verifying a sig made by a key with a photo.
|
||||||
|
|
||||||
|
* keyserver.c (parse_keyserver_uri): Properly parse a URI with no
|
||||||
|
:port section and an empty file path, but with a terminating '/'.
|
||||||
|
(keyserver_work): Honor DISABLE_KEYSERVER_HELPERS.
|
||||||
|
|
||||||
|
* hkp.c (hkp_ask_import): Display keyserver URI as a URI, but only
|
||||||
|
if verbose.
|
||||||
|
|
||||||
|
* exec.c, g10.c: USE_EXEC_PATH -> FIXED_EXEC_PATH
|
||||||
|
|
||||||
2002-07-03 David Shaw <dshaw@jabberwocky.com>
|
2002-07-03 David Shaw <dshaw@jabberwocky.com>
|
||||||
|
|
||||||
* exec.h, exec.c (set_exec_path, exec_write), g10.c (main): If
|
* exec.h, exec.c (set_exec_path, exec_write), g10.c (main): If
|
||||||
|
@ -312,8 +312,8 @@ int exec_write(struct exec_info **info,const char *program,
|
|||||||
if(program==NULL && args_in==NULL)
|
if(program==NULL && args_in==NULL)
|
||||||
BUG();
|
BUG();
|
||||||
|
|
||||||
#ifdef USE_EXEC_PATH
|
#ifdef FIXED_EXEC_PATH
|
||||||
set_exec_path(USE_EXEC_PATH);
|
set_exec_path(FIXED_EXEC_PATH);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
*info=m_alloc_clear(sizeof(struct exec_info));
|
*info=m_alloc_clear(sizeof(struct exec_info));
|
||||||
|
@ -1332,7 +1332,7 @@ main( int argc, char **argv )
|
|||||||
break;
|
break;
|
||||||
case oTempDir: opt.temp_dir=pargs.r.ret_str; break;
|
case oTempDir: opt.temp_dir=pargs.r.ret_str; break;
|
||||||
case oExecPath:
|
case oExecPath:
|
||||||
#ifndef USE_EXEC_PATH
|
#ifndef FIXED_EXEC_PATH
|
||||||
if(set_exec_path(pargs.r.ret_str))
|
if(set_exec_path(pargs.r.ret_str))
|
||||||
log_error(_("unable to set exec-path to %s\n"),pargs.r.ret_str);
|
log_error(_("unable to set exec-path to %s\n"),pargs.r.ret_str);
|
||||||
#endif
|
#endif
|
||||||
|
@ -67,8 +67,10 @@ hkp_ask_import( KEYDB_SEARCH_DESC *desc, void *stats_handle)
|
|||||||
else
|
else
|
||||||
return -1; /* HKP does not support v3 fingerprints */
|
return -1; /* HKP does not support v3 fingerprints */
|
||||||
|
|
||||||
log_info(_("requesting key %08lX from HKP keyserver %s\n"),
|
if(opt.keyserver_options.verbose)
|
||||||
(ulong)key[1],opt.keyserver_host );
|
log_info(_("requesting key %08lX from %s\n"),
|
||||||
|
(ulong)key[1],opt.keyserver_uri);
|
||||||
|
|
||||||
request = m_alloc( strlen( opt.keyserver_host ) + 100 );
|
request = m_alloc( strlen( opt.keyserver_host ) + 100 );
|
||||||
/* hkp does not accept the long keyid - we should really write a
|
/* hkp does not accept the long keyid - we should really write a
|
||||||
* nicer one :-)
|
* nicer one :-)
|
||||||
|
@ -148,7 +148,7 @@ parse_keyserver_uri(char *uri,const char *configname,unsigned int configlineno)
|
|||||||
|
|
||||||
/* Get the host */
|
/* Get the host */
|
||||||
opt.keyserver_host=strsep(&uri,":/");
|
opt.keyserver_host=strsep(&uri,":/");
|
||||||
if(uri==NULL)
|
if(uri==NULL || uri[0]=='\0')
|
||||||
opt.keyserver_port="0";
|
opt.keyserver_port="0";
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -638,6 +638,11 @@ keyserver_work(int action,STRLIST list,KEYDB_SEARCH_DESC *desc,int count)
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifdef DISABLE_KEYSERVER_HELPERS
|
||||||
|
log_error(_("external keyserver calls are not supported in this build\n"));
|
||||||
|
return G10ERR_KEYSERVER;
|
||||||
|
#endif
|
||||||
|
|
||||||
/* It's not the internal HKP code, so try and spawn a handler for it */
|
/* It's not the internal HKP code, so try and spawn a handler for it */
|
||||||
|
|
||||||
rc=keyserver_spawn(action,list,desc,count,&ret);
|
rc=keyserver_spawn(action,list,desc,count,&ret);
|
||||||
|
@ -38,6 +38,7 @@
|
|||||||
#include "i18n.h"
|
#include "i18n.h"
|
||||||
#include "trustdb.h"
|
#include "trustdb.h"
|
||||||
#include "keyserver-internal.h"
|
#include "keyserver-internal.h"
|
||||||
|
#include "photoid.h"
|
||||||
|
|
||||||
|
|
||||||
struct kidlist_item {
|
struct kidlist_item {
|
||||||
@ -1396,7 +1397,10 @@ check_sig_and_print( CTX c, KBNODE node )
|
|||||||
/* If we have a good signature and already printed
|
/* If we have a good signature and already printed
|
||||||
* the primary user ID, print all the other user IDs */
|
* the primary user ID, print all the other user IDs */
|
||||||
if ( count && !rc ) {
|
if ( count && !rc ) {
|
||||||
|
PKT_public_key *pk=NULL;
|
||||||
for( un=keyblock; un; un = un->next ) {
|
for( un=keyblock; un; un = un->next ) {
|
||||||
|
if(un->pkt->pkttype==PKT_PUBLIC_KEY)
|
||||||
|
pk=un->pkt->pkt.public_key;
|
||||||
if( un->pkt->pkttype != PKT_USER_ID )
|
if( un->pkt->pkttype != PKT_USER_ID )
|
||||||
continue;
|
continue;
|
||||||
if ( un->pkt->pkt.user_id->is_revoked )
|
if ( un->pkt->pkt.user_id->is_revoked )
|
||||||
@ -1408,6 +1412,10 @@ check_sig_and_print( CTX c, KBNODE node )
|
|||||||
!un->pkt->pkt.user_id->attrib_data )
|
!un->pkt->pkt.user_id->attrib_data )
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
|
if(opt.show_photos && un->pkt->pkt.user_id->attrib_data)
|
||||||
|
show_photos(un->pkt->pkt.user_id->attribs,
|
||||||
|
un->pkt->pkt.user_id->numattribs,pk,NULL);
|
||||||
|
|
||||||
log_info( _(" aka \""));
|
log_info( _(" aka \""));
|
||||||
print_utf8_string( log_stream(), un->pkt->pkt.user_id->name,
|
print_utf8_string( log_stream(), un->pkt->pkt.user_id->name,
|
||||||
un->pkt->pkt.user_id->len );
|
un->pkt->pkt.user_id->len );
|
||||||
|
@ -218,6 +218,7 @@ char *image_type_to_string(byte type,int style)
|
|||||||
return string;
|
return string;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if !defined(FIXED_PHOTO_VIEWER) && !defined(DISABLE_PHOTO_VIEWER)
|
||||||
static const char *get_default_photo_command(void)
|
static const char *get_default_photo_command(void)
|
||||||
{
|
{
|
||||||
#if defined(HAVE_DOSISH_SYSTEM)
|
#if defined(HAVE_DOSISH_SYSTEM)
|
||||||
@ -240,10 +241,12 @@ static const char *get_default_photo_command(void)
|
|||||||
return "xloadimage -fork -quiet -title 'KeyID 0x%k' stdin";
|
return "xloadimage -fork -quiet -title 'KeyID 0x%k' stdin";
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
void show_photos(const struct user_attribute *attrs,
|
void show_photos(const struct user_attribute *attrs,
|
||||||
int count,PKT_public_key *pk,PKT_secret_key *sk)
|
int count,PKT_public_key *pk,PKT_secret_key *sk)
|
||||||
{
|
{
|
||||||
|
#ifndef DISABLE_PHOTO_VIEWER
|
||||||
int i;
|
int i;
|
||||||
struct expando_args args;
|
struct expando_args args;
|
||||||
u32 len;
|
u32 len;
|
||||||
@ -266,8 +269,12 @@ void show_photos(const struct user_attribute *attrs,
|
|||||||
struct exec_info *spawn;
|
struct exec_info *spawn;
|
||||||
int offset=attrs[i].len-len;
|
int offset=attrs[i].len-len;
|
||||||
|
|
||||||
|
#ifdef FIXED_PHOTO_VIEWER
|
||||||
|
opt.photo_viewer=FIXED_PHOTO_VIEWER;
|
||||||
|
#else
|
||||||
if(!opt.photo_viewer)
|
if(!opt.photo_viewer)
|
||||||
opt.photo_viewer=get_default_photo_command();
|
opt.photo_viewer=get_default_photo_command();
|
||||||
|
#endif
|
||||||
|
|
||||||
/* make command grow */
|
/* make command grow */
|
||||||
command=pct_expando(opt.photo_viewer,&args);
|
command=pct_expando(opt.photo_viewer,&args);
|
||||||
@ -320,4 +327,5 @@ void show_photos(const struct user_attribute *attrs,
|
|||||||
|
|
||||||
fail:
|
fail:
|
||||||
log_error("unable to display photo ID!\n");
|
log_error("unable to display photo ID!\n");
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user