mirror of
git://git.gnupg.org/gnupg.git
synced 2025-01-02 12:01:32 +01:00
See ChangeLog: Sat Jun 5 15:30:33 CEST 1999 Werner Koch
This commit is contained in:
parent
04a0e61a7b
commit
717bce345c
@ -1,3 +1,7 @@
|
||||
Sat Jun 5 15:30:33 CEST 1999 Werner Koch <wk@isil.d.shuttle.de>
|
||||
|
||||
* pkclist.c (key_present_in_pk_list): New (Michael).
|
||||
|
||||
Tue May 25 19:50:32 CEST 1999 Werner Koch <wk@isil.d.shuttle.de>
|
||||
|
||||
* configure.in (IS_DEVELOPMENT_VERSION): Fixed detection.
|
||||
|
2
NEWS
2
NEWS
@ -10,6 +10,8 @@
|
||||
|
||||
* Another hack to cope with pgp2 generated detached signatures.
|
||||
|
||||
* latin-2 character set works (--charset=iso-8859-2).
|
||||
|
||||
|
||||
Noteworthy changes in version 0.9.7
|
||||
-----------------------------------
|
||||
|
2
TODO
2
TODO
@ -27,6 +27,8 @@
|
||||
* find a way to allow the import of non-self-signed keys. This is needed
|
||||
for the IN ENCR/SIGN hack.
|
||||
|
||||
* convert the given user ID to UTF-8 and add an option to suppress this.
|
||||
|
||||
Nice to have
|
||||
------------
|
||||
* Let take --help an option to select some topics.
|
||||
|
27
doc/gpg.1pod
27
doc/gpg.1pod
@ -72,7 +72,7 @@ B<-k> [I<username>] [I<keyring>]
|
||||
|
||||
B<This command may be removed in the future!>
|
||||
|
||||
B<--list-keys> [I<names>]
|
||||
B<--list-keys> [I<names>]
|
||||
B<--list-public-keys> [I<names>]
|
||||
List all keys from the public keyrings, or just the
|
||||
ones given on the command line.
|
||||
@ -81,7 +81,7 @@ B<--list-secret-keys> [I<names>]
|
||||
List all keys from the secret keyrings, or just the
|
||||
ones given on the command line.
|
||||
|
||||
B<--list-sigs> [I<names>]
|
||||
B<--list-sigs> [I<names>]
|
||||
Same as B<--list-keys>, but the signatures are listed
|
||||
too.
|
||||
|
||||
@ -141,7 +141,7 @@ B<--edit-key> I<name>
|
||||
B<revkey>
|
||||
Revoke a subkey.
|
||||
B<expire>
|
||||
Change the key expiration time. If a key is
|
||||
Change the key expiration time. If a key is
|
||||
selected, the time of this key will be changed.
|
||||
With no selection the key expiration of the
|
||||
primary key is changed.
|
||||
@ -212,7 +212,7 @@ B<--export-secret-keys> [I<names>]
|
||||
This is normally not very useful.
|
||||
|
||||
B<--import>, B<--fast-import>
|
||||
Import/merge keys. The fast version does not build
|
||||
Import/merge keys. The fast version does not build
|
||||
the trustdb; this can be done at any time with the
|
||||
command B<--update-trustdb>.
|
||||
|
||||
@ -234,7 +234,7 @@ B<--import-ownertrust> [I<filename>]
|
||||
|
||||
Long options can be put in an options file (default F<~/.gnupg/options>).
|
||||
Do not write the 2 dashes, but simply the name of the option and any
|
||||
required arguments. Lines with a hash as the first non-white-space
|
||||
required arguments. Lines with a hash as the first non-white-space
|
||||
character are ignored. Commands may be put in this file too, but that
|
||||
does not make sense.
|
||||
|
||||
@ -257,7 +257,7 @@ B<--default-key> I<name>
|
||||
is not used the default user-id is the first user-id
|
||||
from the secret keyring.
|
||||
|
||||
B<-r> I<name>, B<--recipient> I<name>
|
||||
B<-r> I<name>, B<--recipient> I<name>
|
||||
Encrypt for user id I<name>. If this option is not
|
||||
specified, GnuPG asks for the user id.
|
||||
|
||||
@ -351,7 +351,8 @@ B<--charset> I<name>
|
||||
Set the name of the native character set. This is used
|
||||
to convert some strings to proper UTF-8 encoding.
|
||||
Valid values for I<name> are:
|
||||
B<iso-8859-1> This is the default.
|
||||
B<iso-8859-1> This is the default Latin 1 set.
|
||||
B<iso-8859-2> The Latin 2 set.
|
||||
B<koi8-r> The usual Russian set (rfc1489).
|
||||
|
||||
B<--options> I<file>
|
||||
@ -548,11 +549,11 @@ a signature was bad, and other error codes for fatal errors.
|
||||
|
||||
=head1 EXAMPLES
|
||||
|
||||
-se -r Bob [file] sign and encrypt for user Bob
|
||||
-sat [file] make a clear text signature
|
||||
-sb [file] make a detached signature
|
||||
-k [userid] show keys
|
||||
-kc [userid] show fingerprint
|
||||
-se -r Bob [file] sign and encrypt for user Bob
|
||||
-sat [file] make a clear text signature
|
||||
-sb [file] make a detached signature
|
||||
-k [userid] show keys
|
||||
-kc [userid] show fingerprint
|
||||
|
||||
=head1 ENVIRONMENT
|
||||
|
||||
@ -570,7 +571,7 @@ F<~/.gnupg/pubring.gpg.lock> and the lock file
|
||||
F<~/.gnupg/trustdb.gpg> The trust database
|
||||
F<~/.gnupg/trustdb.gpg.lock> and the lock file
|
||||
|
||||
F<~/.gnupg/options> May contain options
|
||||
F<~/.gnupg/options> May contain options
|
||||
F</usr[/local]/share/gnupg/options.skel> Skeleton file
|
||||
|
||||
F</usr[/local]/lib/gnupg/> Default location for extensions
|
||||
|
@ -547,6 +547,17 @@ release_pk_list( PK_LIST pk_list )
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
static int
|
||||
key_present_in_pk_list(PK_LIST pk_list, PKT_public_key *pk)
|
||||
{
|
||||
for( ; pk_list; pk_list = pk_list->next)
|
||||
if (cmp_public_keys(pk_list->pk, pk) == 0)
|
||||
return 0;
|
||||
|
||||
return -1;
|
||||
}
|
||||
|
||||
int
|
||||
build_pk_list( STRLIST remusr, PK_LIST *ret_pk_list, unsigned use )
|
||||
{
|
||||
@ -569,13 +580,22 @@ build_pk_list( STRLIST remusr, PK_LIST *ret_pk_list, unsigned use )
|
||||
log_error(_("%s: skipped: %s\n"), rov->d, g10_errstr(rc) );
|
||||
}
|
||||
else if( !(rc=check_pubkey_algo2(pk->pubkey_algo, use )) ) {
|
||||
PK_LIST r;
|
||||
|
||||
r = m_alloc( sizeof *r );
|
||||
r->pk = pk; pk = NULL;
|
||||
r->next = pk_list;
|
||||
r->mark = 0;
|
||||
pk_list = r;
|
||||
/* Skip the actual key if the key is already present
|
||||
* in the list */
|
||||
if (key_present_in_pk_list(pk_list, pk) == 0) {
|
||||
free_public_key(pk); pk = NULL;
|
||||
log_info(_("%s: skipped: public key already present\n"),
|
||||
rov->d);
|
||||
}
|
||||
else {
|
||||
PK_LIST r;
|
||||
r = m_alloc( sizeof *r );
|
||||
r->pk = pk; pk = NULL;
|
||||
r->next = pk_list;
|
||||
r->mark = 0;
|
||||
pk_list = r;
|
||||
}
|
||||
}
|
||||
else {
|
||||
free_public_key( pk ); pk = NULL;
|
||||
@ -655,14 +675,26 @@ build_pk_list( STRLIST remusr, PK_LIST *ret_pk_list, unsigned use )
|
||||
}
|
||||
else if( do_we_trust_pre( pk, trustlevel ) ) {
|
||||
/* note: do_we_trust may have changed the trustlevel */
|
||||
PK_LIST r;
|
||||
|
||||
r = m_alloc( sizeof *r );
|
||||
r->pk = pk; pk = NULL;
|
||||
r->next = pk_list;
|
||||
r->mark = 0;
|
||||
pk_list = r;
|
||||
/* We have at least one valid recipient. It doesn't matters
|
||||
* if this recipient is already present. */
|
||||
any_recipients = 1;
|
||||
|
||||
/* Skip the actual key if the key is already present
|
||||
* in the list */
|
||||
if (key_present_in_pk_list(pk_list, pk) == 0) {
|
||||
free_public_key(pk); pk = NULL;
|
||||
log_info(_("%s: skipped: public key already present\n"),
|
||||
remusr->d);
|
||||
}
|
||||
else {
|
||||
PK_LIST r;
|
||||
r = m_alloc( sizeof *r );
|
||||
r->pk = pk; pk = NULL;
|
||||
r->next = pk_list;
|
||||
r->mark = 0;
|
||||
pk_list = r;
|
||||
}
|
||||
}
|
||||
else { /* we don't trust this pk */
|
||||
free_public_key( pk ); pk = NULL;
|
||||
|
@ -1,3 +1,7 @@
|
||||
Sat Jun 5 15:30:33 CEST 1999 Werner Koch <wk@isil.d.shuttle.de>
|
||||
|
||||
* strgutil.c (set_native_charset): Support Latin-2
|
||||
|
||||
Tue Jun 1 16:01:46 CEST 1999 Werner Koch <wk@isil.d.shuttle.de>
|
||||
|
||||
* iobuf.c (iobuf_get_real_fname): Made global and now keep a
|
||||
|
@ -27,8 +27,7 @@
|
||||
#include "memory.h"
|
||||
|
||||
|
||||
static int use_koi8 = 0;
|
||||
static ushort koi82unicode[128] = {
|
||||
static ushort koi8_unicode[128] = {
|
||||
0x2500,0x2502,0x250c,0x2510,0x2514,0x2518,0x251c,0x2524,
|
||||
0x252c,0x2534,0x253c,0x2580,0x2584,0x2588,0x258c,0x2590,
|
||||
0x2591,0x2592,0x2593,0x2320,0x25a0,0x2219,0x221a,0x2248,
|
||||
@ -47,7 +46,6 @@ static ushort koi82unicode[128] = {
|
||||
0x042c,0x042b,0x0417,0x0428,0x042d,0x0429,0x0427,0x042a
|
||||
};
|
||||
|
||||
#if 0
|
||||
static ushort latin2_unicode[128] = {
|
||||
0x0080,0x0081,0x0082,0x0083,0x0084,0x0085,0x0086,0x0087,
|
||||
0x0088,0x0089,0x008A,0x008B,0x008C,0x008D,0x008E,0x008F,
|
||||
@ -66,7 +64,9 @@ static ushort latin2_unicode[128] = {
|
||||
0x0111,0x0144,0x0148,0x00F3,0x00F4,0x0151,0x00F6,0x00F7,
|
||||
0x0159,0x016F,0x00FA,0x0171,0x00FC,0x00FD,0x0163,0x02D9
|
||||
};
|
||||
#endif
|
||||
|
||||
static const char *active_charset_name = "iso-8859-1";
|
||||
static ushort *active_charset = NULL;
|
||||
|
||||
|
||||
void
|
||||
@ -261,10 +261,18 @@ string_count_chr( const char *string, int c )
|
||||
int
|
||||
set_native_charset( const char *newset )
|
||||
{
|
||||
if( !stricmp( newset, "iso-8859-1" ) )
|
||||
use_koi8 = 0;
|
||||
else if( !stricmp( newset, "koi8-r" ) )
|
||||
use_koi8 = 1;
|
||||
if( !stricmp( newset, "iso-8859-1" ) ) {
|
||||
active_charset_name = "iso-8859-1";
|
||||
active_charset = NULL;
|
||||
}
|
||||
else if( !stricmp( newset, "iso-8859-2" ) ) {
|
||||
active_charset_name = "iso-8859-2";
|
||||
active_charset = latin2_unicode;
|
||||
}
|
||||
else if( !stricmp( newset, "koi8-r" ) ) {
|
||||
active_charset_name = "koi8-r";
|
||||
active_charset = koi8_unicode;
|
||||
}
|
||||
else
|
||||
return G10ERR_GENERAL;
|
||||
return 0;
|
||||
@ -273,7 +281,7 @@ set_native_charset( const char *newset )
|
||||
const char*
|
||||
get_native_charset()
|
||||
{
|
||||
return use_koi8? "koi8-r" : "iso-8859-1";
|
||||
return active_charset_name;
|
||||
}
|
||||
|
||||
/****************
|
||||
@ -288,7 +296,7 @@ native_to_utf8( const char *string )
|
||||
byte *p;
|
||||
size_t length=0;
|
||||
|
||||
if( use_koi8 ) {
|
||||
if( active_charset ) {
|
||||
for(s=string; *s; s++ ) {
|
||||
length++;
|
||||
if( *s & 0x80 )
|
||||
@ -297,7 +305,7 @@ native_to_utf8( const char *string )
|
||||
buffer = m_alloc( length + 1 );
|
||||
for(p=buffer, s=string; *s; s++ ) {
|
||||
if( *s & 0x80 ) {
|
||||
ushort val = koi82unicode[ *s & 0x7f ];
|
||||
ushort val = active_charset[ *s & 0x7f ];
|
||||
if( val < 0x0800 ) {
|
||||
*p++ = 0xc0 | ( (val >> 6) & 0x1f );
|
||||
*p++ = 0x80 | ( val & 0x3f );
|
||||
|
Loading…
x
Reference in New Issue
Block a user