1
0
mirror of git://git.gnupg.org/gnupg.git synced 2025-01-02 12:01:32 +01:00

See ChangeLog: Thu Dec 17 18:31:15 CET 1998 Werner Koch

This commit is contained in:
Werner Koch 1998-12-17 17:36:05 +00:00
parent 7a7a5630af
commit b1e5c79926
28 changed files with 826 additions and 663 deletions

View File

@ -62,8 +62,11 @@ Most of the stuff in mpi has been taken from the GMP library.
The file cipher/rndunix.c is heavily based on Peter Gutmann's The file cipher/rndunix.c is heavily based on Peter Gutmann's
rndunix.c from cryptlib. - He promised to add the GPL as an alternative rndunix.c from cryptlib. - He promised to add the GPL as an alternative
license to this and some other files. We don't have a dissclaimer for license to this and some other files. We don't have a disclaimer for
this file, but due to the fact that this is only needed for non-free this file, but due to the fact that this is only needed for non-free
system we can easily remove this from the distribution and put it as system we can easily remove this from the distribution and put it as
a module on some FTP server. a module on some FTP server.
The RPM specs file scripts/gnupg.specs has been contributed by
Caskey L. Dickson and Reuben Sumner.

10
NEWS
View File

@ -7,10 +7,14 @@
* Fixed the uncompress bug. * Fixed the uncompress bug.
* Rewrote the rndunix module. There are two environment variables * Rewrote the rndunix module. There are two environment variables
used for debugging now: GNUPG_RNDUNIX_DBG give the file to write used for debugging now: GNUPG_RNDUNIX_DBG give the file to write
debugging information (use "-" for stdout) and if GNUPG_RNDUNIX_DBGALL debugging information (use "-" for stdout) and if GNUPG_RNDUNIX_DBGALL
is set, all programs which are only tried are also printed. is set, all programs which are only tried are also printed.
* New option --escape-from-lines to "dash-escape" "From " lines to
prevent mailers to change them to ">From ". This is not enabled by
default because it is not in compliace with rfc2440. but you should
turn it on.
Noteworthy changes in version 0.4.5 Noteworthy changes in version 0.4.5
----------------------------------- -----------------------------------

View File

@ -28,7 +28,7 @@
* Split key support (n-out-of-m) * Split key support (n-out-of-m)
* Check Berkeley BD - it is in glibc - any licensing problems? * Check Berkeley DB - it is in glibc - any licensing problems?
* add an option to re-create a public key from a secret key; we * add an option to re-create a public key from a secret key; we
can do this in trustdb.c:verify_own_keys. can do this in trustdb.c:verify_own_keys.

4
README
View File

@ -322,8 +322,8 @@
This is work in progress, so you may find duplicated code fragments, This is work in progress, so you may find duplicated code fragments,
ugly data structures, weird usage of filenames and other things. ugly data structures, weird usage of filenames and other things.
The primary FTP site is "ftp://ftp.guug.de/pub/gcrypt/" The primary FTP site is "ftp://ftp.gnupg.org/pub/gcrypt/"
The primary WWW page is "http://www.d.shuttle.de/isil/gnupg/" The primary WWW page is "http://www.gnupg.org"
If you like, send your keys to <gnupg-keys@isil.d.shuttle.de>; use If you like, send your keys to <gnupg-keys@isil.d.shuttle.de>; use
"gpg --export --armor | mail gnupg-keys@isil.d.shuttle.de" to do this. "gpg --export --armor | mail gnupg-keys@isil.d.shuttle.de" to do this.

1
THANKS
View File

@ -59,6 +59,7 @@ Paul D. Smith psmith@baynetworks.com
Peter Gutmann pgut001@cs.auckland.ac.nz Peter Gutmann pgut001@cs.auckland.ac.nz
QingLong qinglong@bolizm.ihep.su QingLong qinglong@bolizm.ihep.su
Ralph Gillen gillen@theochem.uni-duesseldorf.de Ralph Gillen gillen@theochem.uni-duesseldorf.de
Reuben Sumner rasumner@wisdom.weizmann.ac.il
Roddy Strachan roddy@satlink.com.au Roddy Strachan roddy@satlink.com.au
Roland Rosenfeld roland@spinnaker.rhein.de Roland Rosenfeld roland@spinnaker.rhein.de
Ross Golder rossigee@bigfoot.com Ross Golder rossigee@bigfoot.com

2
TODO
View File

@ -1,6 +1,8 @@
* Check revocation and expire stuff. PLEASE: THIS MUST BE TESTED! * Check revocation and expire stuff. PLEASE: THIS MUST BE TESTED!
* Escape "From "
* Check calculation of key validity. PLEASE: IT IS IMPORTED THAT * Check calculation of key validity. PLEASE: IT IS IMPORTED THAT
THIS GET TESTED. THIS GET TESTED.

View File

@ -427,6 +427,13 @@ B<--not-dash-escaped>
A special armor header line tells GnuPG about this A special armor header line tells GnuPG about this
cleartext signature framework. cleartext signature framework.
B<--escape-from-lines>
Because some mailers change lines starting with "From "
to ">From " it is good to handle such lines in a special
way when creating cleartext signatures; all other PGP
versions do it this way too. Because this would violate
rfc2440, this option is not enabled per default.
B<--passphrase-fd> I<n> B<--passphrase-fd> I<n>
Read the passphrase from file descriptor I<n>. If you use Read the passphrase from file descriptor I<n>. If you use
0 for I<n>, the passphrase will be read from stdin. This 0 for I<n>, the passphrase will be read from stdin. This
@ -510,6 +517,7 @@ F<~/.gnupg/trustdb.gpg> The trust database
F<~/.gnupg/trustdb.gpg.lock> and the lock file 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 F</usr[/local]/lib/gnupg/> Default location for extensions

View File

@ -1,3 +1,21 @@
Thu Dec 17 18:31:15 CET 1998 Werner Koch <wk@isil.d.shuttle.de>
* misc.c (trap_unaligned): Only for glibc 1
* sign.c (write_dash_escaped): Now escapes "From " lines
* g10.c: New option --escape-from-lines
* trustdb.c (sort_tsl_list): New
(list_trust_path): Now prints sorted list.
(enum_cert_paths): Likewise.
(enum_cert_paths_print): New.
(print_paths): New printing format.
* pkclist.c (add_ownertrust): New arg quit.
(edit_ownertrust): New quit selection and does not query
the recipients ownertrust anymore.
(add_ownertrust): Print the ceritficate path.
Mon Dec 14 21:18:49 CET 1998 Werner Koch <wk@isil.d.shuttle.de> Mon Dec 14 21:18:49 CET 1998 Werner Koch <wk@isil.d.shuttle.de>
* parse-packet.c (parse_signature): Now checks for critical bit * parse-packet.c (parse_signature): Now checks for critical bit

View File

@ -1079,7 +1079,7 @@ armor_filter( void *opaque, int control,
} }
else else
iobuf_writestr(a, iobuf_writestr(a,
"Comment: For info finger gcrypt@ftp.guug.de\n"); "Comment: For info see www.gnupg.org");
if( afx->hdrlines ) if( afx->hdrlines )
iobuf_writestr(a, afx->hdrlines); iobuf_writestr(a, afx->hdrlines);
iobuf_put(a, '\n'); iobuf_put(a, '\n');

View File

@ -150,6 +150,7 @@ enum cmd_and_opt_values { aNull = 0,
oS2KCipher, oS2KCipher,
oCharset, oCharset,
oNotDashEscaped, oNotDashEscaped,
oEscapeFrom,
oLockOnce, oLockOnce,
aTest }; aTest };
@ -301,6 +302,7 @@ static ARGPARSE_OPTS opts[] = {
{ oSetFilename, "set-filename", 2, "@" }, { oSetFilename, "set-filename", 2, "@" },
{ oComment, "comment", 2, "@" }, { oComment, "comment", 2, "@" },
{ oNotDashEscaped, "not-dash-escaped", 0, "@" }, { oNotDashEscaped, "not-dash-escaped", 0, "@" },
{ oEscapeFrom, "escape-from-lines", 0, "@" },
{ oLockOnce, "lock-once", 0, "@" }, { oLockOnce, "lock-once", 0, "@" },
{0} }; {0} };
@ -727,7 +729,11 @@ main( int argc, char **argv )
register_cipher_extension(orig_argc? *orig_argv:NULL, register_cipher_extension(orig_argc? *orig_argv:NULL,
pargs.r.ret_str); pargs.r.ret_str);
break; break;
case oRFC1991: opt.rfc1991 = 1; opt.no_comment = 1; break; case oRFC1991:
opt.rfc1991 = 1;
opt.no_comment = 1;
opt.escape_from = 1;
break;
case oEmuChecksumBug: opt.emulate_bugs |= EMUBUG_GPGCHKSUM; break; case oEmuChecksumBug: opt.emulate_bugs |= EMUBUG_GPGCHKSUM; break;
case oCompressSigs: opt.compress_sigs = 1; break; case oCompressSigs: opt.compress_sigs = 1; break;
case oRunAsShmCP: case oRunAsShmCP:
@ -777,6 +783,7 @@ main( int argc, char **argv )
pargs.r.ret_str); pargs.r.ret_str);
break; break;
case oNotDashEscaped: opt.not_dash_escaped = 1; break; case oNotDashEscaped: opt.not_dash_escaped = 1; break;
case oEscapeFrom: opt.escape_from = 1; break;
case oLockOnce: opt.lock_once = 1; break; case oLockOnce: opt.lock_once = 1; break;
default : pargs.err = configfp? 1:2; break; default : pargs.err = configfp? 1:2; break;

View File

@ -278,7 +278,7 @@ proc_plaintext( CTX c, PACKET *pkt )
md_enable( c->mfx.md, DIGEST_ALGO_SHA1 ); md_enable( c->mfx.md, DIGEST_ALGO_SHA1 );
md_enable( c->mfx.md, DIGEST_ALGO_MD5 ); md_enable( c->mfx.md, DIGEST_ALGO_MD5 );
} }
/*md_start_debug( c->mfx.md, "verify" );*/ md_start_debug( c->mfx.md, "verify" );
rc = handle_plaintext( pt, &c->mfx, c->sigs_only, clearsig ); rc = handle_plaintext( pt, &c->mfx, c->sigs_only, clearsig );
if( rc == G10ERR_CREATE_FILE && !c->sigs_only) { if( rc == G10ERR_CREATE_FILE && !c->sigs_only) {
/* can't write output but we hash it anyway to /* can't write output but we hash it anyway to

View File

@ -23,7 +23,7 @@
#include <stdlib.h> #include <stdlib.h>
#include <string.h> #include <string.h>
#include <errno.h> #include <errno.h>
#if defined(__linux__) && defined(__alpha__) #if defined(__linux__) && defined(__alpha__) && __GLIBC__ < 2
#include <asm/sysinfo.h> #include <asm/sysinfo.h>
#include <asm/unistd.h> #include <asm/unistd.h>
#endif #endif
@ -50,7 +50,7 @@ pull_in_libs(void)
} }
#if defined(__linux__) && defined(__alpha__) && defined(UAC_SIGBUS) #if defined(__linux__) && defined(__alpha__) && __GLIBC__ < 2
#warning using trap_unaligned #warning using trap_unaligned
static int static int
setsysinfo(unsigned long op, void *buffer, unsigned long size, setsysinfo(unsigned long op, void *buffer, unsigned long size,

View File

@ -65,6 +65,7 @@ struct {
int s2k_digest_algo; int s2k_digest_algo;
int s2k_cipher_algo; int s2k_cipher_algo;
int not_dash_escaped; int not_dash_escaped;
int escape_from;
int lock_once; int lock_once;
} opt; } opt;

View File

@ -28,6 +28,13 @@ $Id$
force-v3-sigs force-v3-sigs
# Because some mailers change lines starting with "From " to ">From "
# it is good to handle such lines in a special way when creating
# cleartext signatures; all other PGP versions it this way too.
# To enable full OpenPGP compliance you have to remove this option.
escape_from_lines
# If you do not use the Latin-1 (ISO-8859-1) charset, you should # If you do not use the Latin-1 (ISO-8859-1) charset, you should
# tell GnuPG which is the native character set. Please check # tell GnuPG which is the native character set. Please check
# the man page for supported character sets. # the man page for supported character sets.

View File

@ -77,6 +77,22 @@ show_paths( ulong lid, int only_first )
level*2, "", level*2, "",
nbits_from_pk( pk ), pubkey_letter( pk->pubkey_algo ), nbits_from_pk( pk ), pubkey_letter( pk->pubkey_algo ),
(ulong)keyid[1], lid, datestr_from_pk( pk ) ); (ulong)keyid[1], lid, datestr_from_pk( pk ) );
#if 0
c = trust_letter(otrust);
if( c )
putchar( c );
else
printf( "%02x", otrust );
putchar('/');
c = trust_letter(validity);
if( c )
putchar( c );
else
printf( "%02x", validity );
putchar(' ');
#endif
p = get_user_id( keyid, &n ); p = get_user_id( keyid, &n );
tty_print_string( p, n ), tty_print_string( p, n ),
m_free(p); m_free(p);
@ -102,6 +118,7 @@ edit_ownertrust( ulong lid, int mode )
u32 keyid[2]; u32 keyid[2];
PKT_public_key *pk ; PKT_public_key *pk ;
int changed=0; int changed=0;
int quit=0;
rc = keyid_from_lid( lid, keyid ); rc = keyid_from_lid( lid, keyid );
if( rc ) { if( rc ) {
@ -138,13 +155,15 @@ edit_ownertrust( ulong lid, int mode )
" s = please show me more information\n") ); " s = please show me more information\n") );
if( mode ) if( mode )
tty_printf(_(" m = back to the main menu\n")); tty_printf(_(" m = back to the main menu\n"));
else
tty_printf(_(" q = quit\n"));
tty_printf("\n"); tty_printf("\n");
for(;;) { for(;;) {
/* a string with valid answers */ /* a string with valid answers */
char *ans = _("sSmM"); char *ans = _("sSmMqQ");
if( strlen(ans) != 4 ) if( strlen(ans) != 6 )
BUG(); BUG();
p = cpr_get("edit_ownertrust.value",_("Your decision? ")); p = cpr_get("edit_ownertrust.value",_("Your decision? "));
trim_spaces(p); trim_spaces(p);
@ -172,11 +191,15 @@ edit_ownertrust( ulong lid, int mode )
else if( mode && (*p == ans[2] || *p == ans[3] || *p == CONTROL_D ) ) { else if( mode && (*p == ans[2] || *p == ans[3] || *p == CONTROL_D ) ) {
break ; /* back to the menu */ break ; /* back to the menu */
} }
else if( !mode && (*p == ans[4] || *p == ans[5] ) ) {
quit = 1;
break ; /* back to the menu */
}
m_free(p); p = NULL; m_free(p); p = NULL;
} }
m_free(p); m_free(p);
m_free(pk); m_free(pk);
return changed; return quit? -1 : changed;
} }
@ -185,7 +208,7 @@ edit_ownertrust( ulong lid, int mode )
* Returns: -1 if no ownertrust were added. * Returns: -1 if no ownertrust were added.
*/ */
static int static int
add_ownertrust( PKT_public_key *pk ) add_ownertrust( PKT_public_key *pk, int *quit )
{ {
int rc; int rc;
void *context = NULL; void *context = NULL;
@ -193,6 +216,7 @@ add_ownertrust( PKT_public_key *pk )
unsigned otrust, validity; unsigned otrust, validity;
int any=0, changed=0, any_undefined=0; int any=0, changed=0, any_undefined=0;
*quit = 0;
tty_printf( tty_printf(
_("Could not find a valid trust path to the key. Let's see whether we\n" _("Could not find a valid trust path to the key. Let's see whether we\n"
"can assign some missing owner trust values.\n\n")); "can assign some missing owner trust values.\n\n"));
@ -205,12 +229,20 @@ _("Could not find a valid trust path to the key. Let's see whether we\n"
lid = pk->local_id; lid = pk->local_id;
while( enum_cert_paths( &context, &lid, &otrust, &validity ) != -1 ) { while( enum_cert_paths( &context, &lid, &otrust, &validity ) != -1 ) {
if( lid == pk->local_id )
continue;
any=1; any=1;
if( otrust == TRUST_UNDEFINED || otrust == TRUST_EXPIRED || if( otrust == TRUST_UNDEFINED || otrust == TRUST_EXPIRED ||
otrust == TRUST_UNKNOWN ) { otrust == TRUST_UNKNOWN ) {
any_undefined=1; any_undefined=1;
if( edit_ownertrust( lid, 0 ) ) enum_cert_paths_print( &context, NULL, lid );
changed=1; rc = edit_ownertrust( lid, 0 );
if( rc == -1 ) {
*quit = 1;
break;
}
else if( rc > 0 )
changed = 1;
} }
} }
enum_cert_paths( &context, NULL, NULL, NULL ); /* release context */ enum_cert_paths( &context, NULL, NULL, NULL ); /* release context */
@ -272,8 +304,10 @@ do_we_trust( PKT_public_key *pk, int trustlevel )
log_info(_("%08lX: no info to calculate a trust probability\n"), log_info(_("%08lX: no info to calculate a trust probability\n"),
(ulong)keyid_from_pk( pk, NULL) ); (ulong)keyid_from_pk( pk, NULL) );
else { else {
rc = add_ownertrust( pk ); int quit;
if( !rc ) {
rc = add_ownertrust( pk, &quit );
if( !rc && !quit ) {
rc = check_trust( pk, &trustlevel ); rc = check_trust( pk, &trustlevel );
if( rc ) if( rc )
log_fatal("trust check after add_ownertrust failed: %s\n", log_fatal("trust check after add_ownertrust failed: %s\n",
@ -407,8 +441,9 @@ check_signatures_trust( PKT_signature *sig )
"signature belongs to the owner.\n" )); "signature belongs to the owner.\n" ));
} }
else { else {
rc = add_ownertrust( pk ); int quit;
if( rc ) { rc = add_ownertrust( pk, &quit );
if( rc || quit ) {
dont_try = 1; dont_try = 1;
rc = 0; rc = 0;
} }

View File

@ -44,6 +44,7 @@ special_md_putc( MD_HANDLE md, int c, int *state )
if( *state == 1 ) { if( *state == 1 ) {
md_putc(md, '\r'); md_putc(md, '\r');
} }
*state = 0; *state = 0;
return; return;
} }

View File

@ -475,12 +475,35 @@ write_dash_escaped( IOBUF inp, IOBUF out, MD_HANDLE md )
} }
while( (c = iobuf_get(inp)) != -1 ) { while( (c = iobuf_get(inp)) != -1 ) {
/* Note: We don't escape "From " because the MUA should cope with it */
if( lastlf ) { if( lastlf ) {
if( c == '-' ) { if( c == '-' ) {
iobuf_put( out, c ); iobuf_put( out, c );
iobuf_put( out, ' ' ); iobuf_put( out, ' ' );
} }
else if( c == 'F' && opt.escape_from ) {
int i;
if( state >= 1 )
md_putc(md, '\r');
if( state >= 2 )
md_putc(md, '\n');
state = 0;
for( i=1; i < 5 && (c = iobuf_get(inp)) != -1; i++ ) {
if( "From "[i] != c )
break;
}
if( i < 5 ) {
iobuf_write( out, "From", i );
md_write( md, "From", i );
if( c == -1 )
break;
}
else {
iobuf_writestr( out, "- From" );
md_write( md, "From", 4 );
}
}
} }
again: again:
@ -614,7 +637,7 @@ clearsign_file( const char *fname, STRLIST locusr, const char *outfile )
PKT_secret_key *sk = sk_rover->sk; PKT_secret_key *sk = sk_rover->sk;
md_enable(textmd, hash_for(sk->pubkey_algo)); md_enable(textmd, hash_for(sk->pubkey_algo));
} }
/*md_start_debug( textmd, "create" );*/ md_start_debug( textmd, "create" );
if( !opt.not_dash_escaped ) if( !opt.not_dash_escaped )
iobuf_push_filter( inp, text_filter, &tfx ); iobuf_push_filter( inp, text_filter, &tfx );
rc = write_dash_escaped( inp, out, textmd ); rc = write_dash_escaped( inp, out, textmd );

View File

@ -81,6 +81,13 @@ struct trust_seg_list {
}; };
struct enum_cert_paths_ctx {
int init;
TRUST_SEG_LIST tsl_head;
TRUST_SEG_LIST tsl;
int idx;
};
struct recno_list_struct { struct recno_list_struct {
struct recno_list_struct *next; struct recno_list_struct *next;
@ -98,6 +105,7 @@ static int ins_lid_table_item( LOCAL_ID_TABLE tbl, ulong lid, unsigned flag );
static int qry_lid_table_flag( LOCAL_ID_TABLE tbl, ulong lid, unsigned *flag ); static int qry_lid_table_flag( LOCAL_ID_TABLE tbl, ulong lid, unsigned *flag );
static void print_user_id( const char *text, u32 *keyid ); static void print_user_id( const char *text, u32 *keyid );
static void sort_tsl_list( TRUST_SEG_LIST *trust_seg_list );
static int list_sigs( ulong pubkey_id ); static int list_sigs( ulong pubkey_id );
static int do_check( TRUSTREC *drec, unsigned *trustlevel ); static int do_check( TRUSTREC *drec, unsigned *trustlevel );
static int get_dir_record( PKT_public_key *pk, TRUSTREC *rec ); static int get_dir_record( PKT_public_key *pk, TRUSTREC *rec );
@ -890,17 +898,23 @@ collect_paths( int depth, int max_depth, int all, TRUSTREC *drec,
for(i=0; i < SIGS_PER_RECORD; i++ ) { for(i=0; i < SIGS_PER_RECORD; i++ ) {
TRUSTREC tmp; TRUSTREC tmp;
int ot, nt; int ot, nt;
int unchecked = 0;
if( !rec.r.sig.sig[i].lid ) if( !rec.r.sig.sig[i].lid )
continue; /* skip deleted sigs */ continue; /* skip deleted sigs */
if( !(rec.r.sig.sig[i].flag & SIGF_CHECKED) ) if( !(rec.r.sig.sig[i].flag & SIGF_CHECKED) ) {
continue; /* skip unchecked signatures */ if( !all )
if( !(rec.r.sig.sig[i].flag & SIGF_VALID) ) continue; /* skip unchecked signatures */
continue; /* skip invalid signatures */ unchecked = 1;
if( (rec.r.sig.sig[i].flag & SIGF_EXPIRED) ) }
continue; /* skip expired signatures */ else {
if( (rec.r.sig.sig[i].flag & SIGF_REVOKED) ) if( !(rec.r.sig.sig[i].flag & SIGF_VALID) )
continue; /* skip revoked signatures */ continue; /* skip invalid signatures */
if( (rec.r.sig.sig[i].flag & SIGF_EXPIRED) )
continue; /* skip expired signatures */
if( (rec.r.sig.sig[i].flag & SIGF_REVOKED) )
continue; /* skip revoked signatures */
}
/* visit every signer only once (a signer may have /* visit every signer only once (a signer may have
* signed more than one user ID) */ * signed more than one user ID) */
@ -923,7 +937,7 @@ collect_paths( int depth, int max_depth, int all, TRUSTREC *drec,
trust_seg_head ); trust_seg_head );
nt &= TRUST_MASK; nt &= TRUST_MASK;
if( nt < TRUST_MARGINAL ) { if( nt < TRUST_MARGINAL || unchecked ) {
continue; continue;
} }
@ -1175,7 +1189,7 @@ import_ownertrust( const char *fname )
continue; continue;
n = strlen(line); n = strlen(line);
if( line[n-1] != '\n' ) { if( line[n-1] != '\n' ) {
log_error_f(fname, _("line to long\n") ); log_error_f(fname, _("line too long\n") );
/* ... or last line does not have a LF */ /* ... or last line does not have a LF */
break; /* can't continue */ break; /* can't continue */
} }
@ -1249,7 +1263,7 @@ import_ownertrust( const char *fname )
static void static void
print_path( int pathlen, TRUST_INFO *path ) print_path( int pathlen, TRUST_INFO *path, FILE *fp, ulong highlight )
{ {
int rc, c, i; int rc, c, i;
u32 keyid[2]; u32 keyid[2];
@ -1257,35 +1271,67 @@ print_path( int pathlen, TRUST_INFO *path )
size_t n; size_t n;
for( i = 0; i < pathlen; i++ ) { for( i = 0; i < pathlen; i++ ) {
printf("%*s", i*2, "" ); if( highlight )
fputs(highlight == path[i].lid? "* ":" ", fp );
rc = keyid_from_lid( path[i].lid, keyid ); rc = keyid_from_lid( path[i].lid, keyid );
if( rc ) if( rc )
printf("????????.%lu:", path[i].lid ); fprintf(fp, "????????.%lu:", path[i].lid );
else else
printf("%08lX.%lu:", (ulong)keyid[1], path[i].lid ); fprintf(fp,"%08lX.%lu:", (ulong)keyid[1], path[i].lid );
c = trust_letter(path[i].otrust); c = trust_letter(path[i].otrust);
if( c ) if( c )
putchar( c ); putc( c, fp );
else else
printf( "%02x", path[i].otrust ); fprintf( fp, "%02x", path[i].otrust );
putchar('/'); putc('/', fp);
c = trust_letter(path[i].trust); c = trust_letter(path[i].trust);
if( c ) if( c )
putchar( c ); putc( c, fp );
else else
printf( "%02x", path[i].trust ); fprintf( fp, "%02x", path[i].trust );
putchar(' '); putc(' ', fp);
p = get_user_id( keyid, &n ); p = get_user_id( keyid, &n );
putchar(' '); putc(' ', fp);
putchar('\"'); putc('\"', fp);
print_string( stdout, p, n > 40? 40:n, 0 ); print_string( fp, p, n > 40? 40:n, 0 );
putchar('\"'); putc('\"', fp);
m_free(p); m_free(p);
putchar('\n'); putc('\n', fp );
} }
} }
static int
cmp_tsl_array( const void *xa, const void *xb )
{
TRUST_SEG_LIST a = *(TRUST_SEG_LIST*)xa;
TRUST_SEG_LIST b = *(TRUST_SEG_LIST*)xb;
return a->pathlen - b->pathlen;
}
static void
sort_tsl_list( TRUST_SEG_LIST *trust_seg_list )
{
TRUST_SEG_LIST *array, *tail, tsl;
size_t n;
for(n=0, tsl = *trust_seg_list; tsl; tsl = tsl->next )
n++;
array = m_alloc( (n+1) * sizeof *array );
for(n=0, tsl = *trust_seg_list; tsl; tsl = tsl->next )
array[n++] = tsl;
array[n] = NULL;
qsort( array, n, sizeof *array, cmp_tsl_array );
*trust_seg_list = NULL;
tail = trust_seg_list;
for(n=0; (tsl=array[n]); n++ ) {
*tail = tsl;
tail = &tsl->next;
}
m_free( array );
}
void void
list_trust_path( const char *username ) list_trust_path( const char *username )
@ -1318,9 +1364,12 @@ list_trust_path( const char *username )
trust_seg_list = NULL; trust_seg_list = NULL;
collect_paths( 0, opt.max_cert_depth, 1, &rec, tmppath, &trust_seg_list ); collect_paths( 0, opt.max_cert_depth, 1, &rec, tmppath, &trust_seg_list );
m_free( tmppath ); m_free( tmppath );
sort_tsl_list( &trust_seg_list );
/* and now print them */ /* and now print them */
for(tsl = trust_seg_list; tsl; tsl = tsl->next ) { for(tsl = trust_seg_list; tsl; tsl = tsl->next ) {
print_path( tsl->pathlen, tsl->path ); print_path( tsl->pathlen, tsl->path, stdout, 0 );
if( tsl->next )
putchar('\n');
} }
/* release the list */ /* release the list */
@ -1638,12 +1687,7 @@ int
enum_cert_paths( void **context, ulong *lid, enum_cert_paths( void **context, ulong *lid,
unsigned *ownertrust, unsigned *validity ) unsigned *ownertrust, unsigned *validity )
{ {
struct { struct enum_cert_paths_ctx *ctx;
int init;
TRUST_SEG_LIST tsl_head;
TRUST_SEG_LIST tsl;
int idx;
} *ctx;
TRUST_SEG_LIST tsl; TRUST_SEG_LIST tsl;
if( !lid ) { /* release the context */ if( !lid ) { /* release the context */
@ -1675,7 +1719,8 @@ enum_cert_paths( void **context, ulong *lid,
tsl = NULL; tsl = NULL;
collect_paths( 0, opt.max_cert_depth, 1, &rec, tmppath, &tsl ); collect_paths( 0, opt.max_cert_depth, 1, &rec, tmppath, &tsl );
m_free( tmppath ); m_free( tmppath );
/* and now print them */ sort_tsl_list( &tsl );
/* setup the context */
ctx->tsl_head = tsl; ctx->tsl_head = tsl;
ctx->tsl = ctx->tsl_head; ctx->tsl = ctx->tsl_head;
ctx->idx = 0; ctx->idx = 0;
@ -1701,6 +1746,28 @@ enum_cert_paths( void **context, ulong *lid,
} }
/****************
* Print the current path
*/
int
enum_cert_paths_print( void **context, FILE *fp, ulong selected_lid )
{
struct enum_cert_paths_ctx *ctx;
TRUST_SEG_LIST tsl;
if( !*context )
return;
ctx = *context;
if( !ctx->tsl )
return;
if( !fp )
fp = stderr;
print_path( ctx->tsl->pathlen, ctx->tsl->path, fp, selected_lid );
}
/**************** /****************
* Return the assigned ownertrust value for the given LID * Return the assigned ownertrust value for the given LID
*/ */

View File

@ -53,6 +53,7 @@ int check_trust( PKT_public_key *pk, unsigned *r_trustlevel );
int query_trust_info( PKT_public_key *pk ); int query_trust_info( PKT_public_key *pk );
int enum_cert_paths( void **context, ulong *lid, int enum_cert_paths( void **context, ulong *lid,
unsigned *ownertrust, unsigned *validity ); unsigned *ownertrust, unsigned *validity );
int enum_cert_paths_print( void **context, FILE *fp, ulong selected_lid );
unsigned get_ownertrust( ulong lid ); unsigned get_ownertrust( ulong lid );
int get_ownertrust_info( ulong lid ); int get_ownertrust_info( ulong lid );
byte *get_pref_data( ulong lid, const byte *namehash, size_t *ret_n ); byte *get_pref_data( ulong lid, const byte *namehash, size_t *ret_n );

View File

@ -1,3 +1,7 @@
Thu Dec 17 18:31:15 CET 1998 Werner Koch <wk@isil.d.shuttle.de>
* fr.po: Imported new version
Mon Dec 14 21:18:49 CET 1998 Werner Koch <wk@isil.d.shuttle.de> Mon Dec 14 21:18:49 CET 1998 Werner Koch <wk@isil.d.shuttle.de>
* de.po: Imported new version. * de.po: Imported new version.

View File

@ -2486,7 +2486,7 @@ msgid "error reading key record: %s\n"
msgstr "Fehler beim Lesen des Schl.Satzes: %s\n" msgstr "Fehler beim Lesen des Schl.Satzes: %s\n"
#: g10/trustdb.c:1178 #: g10/trustdb.c:1178
msgid "line to long\n" msgid "line too long\n"
msgstr "Zeile zu lang\n" msgstr "Zeile zu lang\n"
#: g10/trustdb.c:1186 #: g10/trustdb.c:1186

View File

@ -2503,7 +2503,7 @@ msgid "error reading key record: %s\n"
msgstr "%s: error comprobando la clave: %s\n" msgstr "%s: error comprobando la clave: %s\n"
#: g10/trustdb.c:1178 #: g10/trustdb.c:1178
msgid "line to long\n" msgid "line too long\n"
msgstr "" msgstr ""
#: g10/trustdb.c:1186 #: g10/trustdb.c:1186

1104
po/fr.po

File diff suppressed because it is too large Load Diff

View File

@ -2492,7 +2492,7 @@ msgid "error reading key record: %s\n"
msgstr "%s: errore nel controllare la chiave: %s\n" msgstr "%s: errore nel controllare la chiave: %s\n"
#: g10/trustdb.c:1178 #: g10/trustdb.c:1178
msgid "line to long\n" msgid "line too long\n"
msgstr "" msgstr ""
#: g10/trustdb.c:1186 #: g10/trustdb.c:1186

View File

@ -2492,7 +2492,7 @@ msgid "error reading key record: %s\n"
msgstr "erro lendo registro de chave: %s\n" msgstr "erro lendo registro de chave: %s\n"
#: g10/trustdb.c:1178 #: g10/trustdb.c:1178
msgid "line to long\n" msgid "line too long\n"
msgstr "linha muito longa\n" msgstr "linha muito longa\n"
#: g10/trustdb.c:1186 #: g10/trustdb.c:1186

View File

@ -2543,7 +2543,7 @@ msgid "error reading key record: %s\n"
msgstr "Fehler beim Erzeugen der \"Passphrase\": %s\n" msgstr "Fehler beim Erzeugen der \"Passphrase\": %s\n"
#: g10/trustdb.c:1178 #: g10/trustdb.c:1178
msgid "line to long\n" msgid "line too long\n"
msgstr "" msgstr ""
#: g10/trustdb.c:1186 #: g10/trustdb.c:1186

View File

@ -1,3 +1,8 @@
Thu Dec 17 18:31:15 CET 1998 Werner Koch <wk@isil.d.shuttle.de>
* gnupg.spec: New version by Reuben Sumner and did some more
changes.
Fri Nov 27 12:39:29 CET 1998 Werner Koch <wk@isil.d.shuttle.de> Fri Nov 27 12:39:29 CET 1998 Werner Koch <wk@isil.d.shuttle.de>

View File

@ -2,59 +2,57 @@
# gnupg -- gnu privacy guard # gnupg -- gnu privacy guard
# This is a template. The dist target uses it to create the real file. # This is a template. The dist target uses it to create the real file.
# #
%define version @pkg_version@
Summary: GPL public key crypto Summary: GPL public key crypto
Name: gnupg Name: gnupg
Version: @pkg_version@ Version: %{version}
Release: 3 Release: 1
Copyright: GPL Copyright: GPL
Group: Applications/Cryptography Group: Applications/Cryptography
Source: ftp://ftp.guug.de/pub/gcrypt/ Source: ftp://ftp.gnupg.org/pub/gcrypt/gnupg-%{version}.tar.gz
URL: http://www.d.shuttle.de/isil/crypt/gnupg.html URL: http://www.gnupg.org
Vendor: TechnoCage
Packager: Caskey L. Dickson <caskey-at-technocage.com>
Provides: gpg openpgp Provides: gpg openpgp
BuildRoot: /tmp/gnupg
%description %description
GNUPG is a complete and free replacement for PGP. Because it does not use GnuPG is a complete and free replacement for PGP. Because it does not use
IDEA or RSA it can be used without any restrictions. GNUPG is nearly in IDEA or RSA it can be used without any restrictions. GnuPG is in
compliance with the OpenPGP draft. compliance with the OpenPGP specification (RFC2440).
%prep %prep
rm -rf $RPM_BUILD_DIR/gnupg-@pkg_version@ %setup
tar -xvzf $RPM_SOURCE_DIR/gnupg-@pkg_version@.tar.gz
rm -rf $RPM_BUILD_ROOT
%build %build
cd gnupg-@pkg_version@ CFLAGS="$RPM_OPT_FLAGS" ./configure --prefix=/usr
chown -R root.root *
./configure --prefix=/usr
make make
%install %install
cd gnupg-@pkg_version@ make prefix="${RPM_BUILD_ROOT}/usr" install
make install
%clean
rm -rf $RPM_BUILD_ROOT
%files %files
%doc gnupg-@pkg_version@/doc/DETAILS %attr(-,root,root) %doc doc/DETAILS
%doc gnupg-@pkg_version@/INSTALL %attr(-,root,root) %doc INSTALL
%doc gnupg-@pkg_version@/doc/rfcs %attr(-,root,root) %doc AUTHORS
%doc gnupg-@pkg_version@/AUTHORS %attr(-,root,root) %doc ABOUT-NLS
%doc gnupg-@pkg_version@/ABOUT-NLS %attr(-,root,root) %doc COPYING
%doc gnupg-@pkg_version@/COPYING %attr(-,root,root) %doc ChangeLog
%doc gnupg-@pkg_version@/ChangeLog %attr(-,root,root) %doc NEWS
%doc gnupg-@pkg_version@/NEWS %attr(-,root,root) %doc README
%doc gnupg-@pkg_version@/README %attr(-,root,root) %doc THANKS
%doc gnupg-@pkg_version@/THANKS %attr(-,root,root) %doc TODO
%doc gnupg-@pkg_version@/TODO %attr(-,root,root) /usr/man/man1/gpg.1
/usr/man/man1/gpg.1
/usr/bin/gpg
/usr/bin/gpgm
/usr/share/locale/en/LC_MESSAGES/gnupg.mo
/usr/share/locale/de/LC_MESSAGES/gnupg.mo
/usr/share/locale/it/LC_MESSAGES/gnupg.mo
/usr/share/locale/fr/LC_MESSAGES/gnupg.mo
/usr/lib/gnupg/tiger
/usr/lib/gnupg/twofish
%attr (4755,root,root) /usr/bin/gpg %attr (4755,root,root) /usr/bin/gpg
%attr (4755,root,root) /usr/bin/gpgm %attr (755,root,root) /usr/bin/gpgm
%attr(-,root,root) /usr/share/locale/en/LC_MESSAGES/gnupg.mo
%attr(-,root,root) /usr/share/locale/de/LC_MESSAGES/gnupg.mo
%attr(-,root,root) /usr/share/locale/it/LC_MESSAGES/gnupg.mo
%attr(-,root,root) /usr/share/locale/fr/LC_MESSAGES/gnupg.mo
%attr(-,root,root) /usr/lib/gnupg/tiger
%attr(-,root,root) /usr/lib/gnupg/twofish
%attr(-,root,root) /usr/share/gnupg/options.skel