mirror of
git://git.gnupg.org/gnupg.git
synced 2025-01-03 12:11:33 +01:00
See ChangeLog: Thu Dec 17 18:31:15 CET 1998 Werner Koch
This commit is contained in:
parent
7a7a5630af
commit
b1e5c79926
5
AUTHORS
5
AUTHORS
@ -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
|
||||
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
|
||||
system we can easily remove this from the distribution and put it as
|
||||
a module on some FTP server.
|
||||
|
||||
The RPM specs file scripts/gnupg.specs has been contributed by
|
||||
Caskey L. Dickson and Reuben Sumner.
|
||||
|
||||
|
4
NEWS
4
NEWS
@ -11,6 +11,10 @@
|
||||
debugging information (use "-" for stdout) and if GNUPG_RNDUNIX_DBGALL
|
||||
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
|
||||
-----------------------------------
|
||||
|
2
PROJECTS
2
PROJECTS
@ -28,7 +28,7 @@
|
||||
|
||||
* 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
|
||||
can do this in trustdb.c:verify_own_keys.
|
||||
|
4
README
4
README
@ -322,8 +322,8 @@
|
||||
This is work in progress, so you may find duplicated code fragments,
|
||||
ugly data structures, weird usage of filenames and other things.
|
||||
|
||||
The primary FTP site is "ftp://ftp.guug.de/pub/gcrypt/"
|
||||
The primary WWW page is "http://www.d.shuttle.de/isil/gnupg/"
|
||||
The primary FTP site is "ftp://ftp.gnupg.org/pub/gcrypt/"
|
||||
The primary WWW page is "http://www.gnupg.org"
|
||||
|
||||
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.
|
||||
|
1
THANKS
1
THANKS
@ -59,6 +59,7 @@ Paul D. Smith psmith@baynetworks.com
|
||||
Peter Gutmann pgut001@cs.auckland.ac.nz
|
||||
QingLong qinglong@bolizm.ihep.su
|
||||
Ralph Gillen gillen@theochem.uni-duesseldorf.de
|
||||
Reuben Sumner rasumner@wisdom.weizmann.ac.il
|
||||
Roddy Strachan roddy@satlink.com.au
|
||||
Roland Rosenfeld roland@spinnaker.rhein.de
|
||||
Ross Golder rossigee@bigfoot.com
|
||||
|
2
TODO
2
TODO
@ -1,6 +1,8 @@
|
||||
|
||||
* Check revocation and expire stuff. PLEASE: THIS MUST BE TESTED!
|
||||
|
||||
* Escape "From "
|
||||
|
||||
* Check calculation of key validity. PLEASE: IT IS IMPORTED THAT
|
||||
THIS GET TESTED.
|
||||
|
||||
|
@ -427,6 +427,13 @@ B<--not-dash-escaped>
|
||||
A special armor header line tells GnuPG about this
|
||||
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>
|
||||
Read the passphrase from file descriptor I<n>. If you use
|
||||
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/options> May contain options
|
||||
F</usr[/local]/share/gnupg/options.skel> Skeleton file
|
||||
|
||||
F</usr[/local]/lib/gnupg/> Default location for extensions
|
||||
|
||||
|
@ -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>
|
||||
|
||||
* parse-packet.c (parse_signature): Now checks for critical bit
|
||||
|
@ -1079,7 +1079,7 @@ armor_filter( void *opaque, int control,
|
||||
}
|
||||
else
|
||||
iobuf_writestr(a,
|
||||
"Comment: For info finger gcrypt@ftp.guug.de\n");
|
||||
"Comment: For info see www.gnupg.org");
|
||||
if( afx->hdrlines )
|
||||
iobuf_writestr(a, afx->hdrlines);
|
||||
iobuf_put(a, '\n');
|
||||
|
@ -150,6 +150,7 @@ enum cmd_and_opt_values { aNull = 0,
|
||||
oS2KCipher,
|
||||
oCharset,
|
||||
oNotDashEscaped,
|
||||
oEscapeFrom,
|
||||
oLockOnce,
|
||||
aTest };
|
||||
|
||||
@ -301,6 +302,7 @@ static ARGPARSE_OPTS opts[] = {
|
||||
{ oSetFilename, "set-filename", 2, "@" },
|
||||
{ oComment, "comment", 2, "@" },
|
||||
{ oNotDashEscaped, "not-dash-escaped", 0, "@" },
|
||||
{ oEscapeFrom, "escape-from-lines", 0, "@" },
|
||||
{ oLockOnce, "lock-once", 0, "@" },
|
||||
{0} };
|
||||
|
||||
@ -727,7 +729,11 @@ main( int argc, char **argv )
|
||||
register_cipher_extension(orig_argc? *orig_argv:NULL,
|
||||
pargs.r.ret_str);
|
||||
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 oCompressSigs: opt.compress_sigs = 1; break;
|
||||
case oRunAsShmCP:
|
||||
@ -777,6 +783,7 @@ main( int argc, char **argv )
|
||||
pargs.r.ret_str);
|
||||
break;
|
||||
case oNotDashEscaped: opt.not_dash_escaped = 1; break;
|
||||
case oEscapeFrom: opt.escape_from = 1; break;
|
||||
case oLockOnce: opt.lock_once = 1; break;
|
||||
|
||||
default : pargs.err = configfp? 1:2; break;
|
||||
|
@ -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_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 );
|
||||
if( rc == G10ERR_CREATE_FILE && !c->sigs_only) {
|
||||
/* can't write output but we hash it anyway to
|
||||
|
@ -23,7 +23,7 @@
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <errno.h>
|
||||
#if defined(__linux__) && defined(__alpha__)
|
||||
#if defined(__linux__) && defined(__alpha__) && __GLIBC__ < 2
|
||||
#include <asm/sysinfo.h>
|
||||
#include <asm/unistd.h>
|
||||
#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
|
||||
static int
|
||||
setsysinfo(unsigned long op, void *buffer, unsigned long size,
|
||||
|
@ -65,6 +65,7 @@ struct {
|
||||
int s2k_digest_algo;
|
||||
int s2k_cipher_algo;
|
||||
int not_dash_escaped;
|
||||
int escape_from;
|
||||
int lock_once;
|
||||
} opt;
|
||||
|
||||
|
@ -28,6 +28,13 @@ $Id$
|
||||
|
||||
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
|
||||
# tell GnuPG which is the native character set. Please check
|
||||
# the man page for supported character sets.
|
||||
|
@ -77,6 +77,22 @@ show_paths( ulong lid, int only_first )
|
||||
level*2, "",
|
||||
nbits_from_pk( pk ), pubkey_letter( pk->pubkey_algo ),
|
||||
(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 );
|
||||
tty_print_string( p, n ),
|
||||
m_free(p);
|
||||
@ -102,6 +118,7 @@ edit_ownertrust( ulong lid, int mode )
|
||||
u32 keyid[2];
|
||||
PKT_public_key *pk ;
|
||||
int changed=0;
|
||||
int quit=0;
|
||||
|
||||
rc = keyid_from_lid( lid, keyid );
|
||||
if( rc ) {
|
||||
@ -138,13 +155,15 @@ edit_ownertrust( ulong lid, int mode )
|
||||
" s = please show me more information\n") );
|
||||
if( mode )
|
||||
tty_printf(_(" m = back to the main menu\n"));
|
||||
else
|
||||
tty_printf(_(" q = quit\n"));
|
||||
tty_printf("\n");
|
||||
|
||||
for(;;) {
|
||||
/* a string with valid answers */
|
||||
char *ans = _("sSmM");
|
||||
char *ans = _("sSmMqQ");
|
||||
|
||||
if( strlen(ans) != 4 )
|
||||
if( strlen(ans) != 6 )
|
||||
BUG();
|
||||
p = cpr_get("edit_ownertrust.value",_("Your decision? "));
|
||||
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 ) ) {
|
||||
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);
|
||||
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.
|
||||
*/
|
||||
static int
|
||||
add_ownertrust( PKT_public_key *pk )
|
||||
add_ownertrust( PKT_public_key *pk, int *quit )
|
||||
{
|
||||
int rc;
|
||||
void *context = NULL;
|
||||
@ -193,6 +216,7 @@ add_ownertrust( PKT_public_key *pk )
|
||||
unsigned otrust, validity;
|
||||
int any=0, changed=0, any_undefined=0;
|
||||
|
||||
*quit = 0;
|
||||
tty_printf(
|
||||
_("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"));
|
||||
@ -205,11 +229,19 @@ _("Could not find a valid trust path to the key. Let's see whether we\n"
|
||||
|
||||
lid = pk->local_id;
|
||||
while( enum_cert_paths( &context, &lid, &otrust, &validity ) != -1 ) {
|
||||
if( lid == pk->local_id )
|
||||
continue;
|
||||
any=1;
|
||||
if( otrust == TRUST_UNDEFINED || otrust == TRUST_EXPIRED ||
|
||||
otrust == TRUST_UNKNOWN ) {
|
||||
any_undefined=1;
|
||||
if( edit_ownertrust( lid, 0 ) )
|
||||
enum_cert_paths_print( &context, NULL, lid );
|
||||
rc = edit_ownertrust( lid, 0 );
|
||||
if( rc == -1 ) {
|
||||
*quit = 1;
|
||||
break;
|
||||
}
|
||||
else if( rc > 0 )
|
||||
changed = 1;
|
||||
}
|
||||
}
|
||||
@ -272,8 +304,10 @@ do_we_trust( PKT_public_key *pk, int trustlevel )
|
||||
log_info(_("%08lX: no info to calculate a trust probability\n"),
|
||||
(ulong)keyid_from_pk( pk, NULL) );
|
||||
else {
|
||||
rc = add_ownertrust( pk );
|
||||
if( !rc ) {
|
||||
int quit;
|
||||
|
||||
rc = add_ownertrust( pk, &quit );
|
||||
if( !rc && !quit ) {
|
||||
rc = check_trust( pk, &trustlevel );
|
||||
if( rc )
|
||||
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" ));
|
||||
}
|
||||
else {
|
||||
rc = add_ownertrust( pk );
|
||||
if( rc ) {
|
||||
int quit;
|
||||
rc = add_ownertrust( pk, &quit );
|
||||
if( rc || quit ) {
|
||||
dont_try = 1;
|
||||
rc = 0;
|
||||
}
|
||||
|
@ -44,6 +44,7 @@ special_md_putc( MD_HANDLE md, int c, int *state )
|
||||
if( *state == 1 ) {
|
||||
md_putc(md, '\r');
|
||||
}
|
||||
|
||||
*state = 0;
|
||||
return;
|
||||
}
|
||||
|
27
g10/sign.c
27
g10/sign.c
@ -475,12 +475,35 @@ write_dash_escaped( IOBUF inp, IOBUF out, MD_HANDLE md )
|
||||
}
|
||||
|
||||
while( (c = iobuf_get(inp)) != -1 ) {
|
||||
/* Note: We don't escape "From " because the MUA should cope with it */
|
||||
if( lastlf ) {
|
||||
if( c == '-' ) {
|
||||
iobuf_put( out, c );
|
||||
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:
|
||||
@ -614,7 +637,7 @@ clearsign_file( const char *fname, STRLIST locusr, const char *outfile )
|
||||
PKT_secret_key *sk = sk_rover->sk;
|
||||
md_enable(textmd, hash_for(sk->pubkey_algo));
|
||||
}
|
||||
/*md_start_debug( textmd, "create" );*/
|
||||
md_start_debug( textmd, "create" );
|
||||
if( !opt.not_dash_escaped )
|
||||
iobuf_push_filter( inp, text_filter, &tfx );
|
||||
rc = write_dash_escaped( inp, out, textmd );
|
||||
|
119
g10/trustdb.c
119
g10/trustdb.c
@ -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 *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 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 do_check( TRUSTREC *drec, unsigned *trustlevel );
|
||||
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++ ) {
|
||||
TRUSTREC tmp;
|
||||
int ot, nt;
|
||||
int unchecked = 0;
|
||||
|
||||
if( !rec.r.sig.sig[i].lid )
|
||||
continue; /* skip deleted sigs */
|
||||
if( !(rec.r.sig.sig[i].flag & SIGF_CHECKED) )
|
||||
if( !(rec.r.sig.sig[i].flag & SIGF_CHECKED) ) {
|
||||
if( !all )
|
||||
continue; /* skip unchecked signatures */
|
||||
unchecked = 1;
|
||||
}
|
||||
else {
|
||||
if( !(rec.r.sig.sig[i].flag & SIGF_VALID) )
|
||||
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
|
||||
* signed more than one user ID) */
|
||||
@ -923,7 +937,7 @@ collect_paths( int depth, int max_depth, int all, TRUSTREC *drec,
|
||||
trust_seg_head );
|
||||
nt &= TRUST_MASK;
|
||||
|
||||
if( nt < TRUST_MARGINAL ) {
|
||||
if( nt < TRUST_MARGINAL || unchecked ) {
|
||||
continue;
|
||||
}
|
||||
|
||||
@ -1175,7 +1189,7 @@ import_ownertrust( const char *fname )
|
||||
continue;
|
||||
n = strlen(line);
|
||||
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 */
|
||||
break; /* can't continue */
|
||||
}
|
||||
@ -1249,7 +1263,7 @@ import_ownertrust( const char *fname )
|
||||
|
||||
|
||||
static void
|
||||
print_path( int pathlen, TRUST_INFO *path )
|
||||
print_path( int pathlen, TRUST_INFO *path, FILE *fp, ulong highlight )
|
||||
{
|
||||
int rc, c, i;
|
||||
u32 keyid[2];
|
||||
@ -1257,35 +1271,67 @@ print_path( int pathlen, TRUST_INFO *path )
|
||||
size_t n;
|
||||
|
||||
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 );
|
||||
if( rc )
|
||||
printf("????????.%lu:", path[i].lid );
|
||||
fprintf(fp, "????????.%lu:", path[i].lid );
|
||||
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);
|
||||
if( c )
|
||||
putchar( c );
|
||||
putc( c, fp );
|
||||
else
|
||||
printf( "%02x", path[i].otrust );
|
||||
putchar('/');
|
||||
fprintf( fp, "%02x", path[i].otrust );
|
||||
putc('/', fp);
|
||||
c = trust_letter(path[i].trust);
|
||||
if( c )
|
||||
putchar( c );
|
||||
putc( c, fp );
|
||||
else
|
||||
printf( "%02x", path[i].trust );
|
||||
putchar(' ');
|
||||
fprintf( fp, "%02x", path[i].trust );
|
||||
putc(' ', fp);
|
||||
p = get_user_id( keyid, &n );
|
||||
putchar(' ');
|
||||
putchar('\"');
|
||||
print_string( stdout, p, n > 40? 40:n, 0 );
|
||||
putchar('\"');
|
||||
putc(' ', fp);
|
||||
putc('\"', fp);
|
||||
print_string( fp, p, n > 40? 40:n, 0 );
|
||||
putc('\"', fp);
|
||||
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
|
||||
list_trust_path( const char *username )
|
||||
@ -1318,9 +1364,12 @@ list_trust_path( const char *username )
|
||||
trust_seg_list = NULL;
|
||||
collect_paths( 0, opt.max_cert_depth, 1, &rec, tmppath, &trust_seg_list );
|
||||
m_free( tmppath );
|
||||
sort_tsl_list( &trust_seg_list );
|
||||
/* and now print them */
|
||||
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 */
|
||||
@ -1638,12 +1687,7 @@ int
|
||||
enum_cert_paths( void **context, ulong *lid,
|
||||
unsigned *ownertrust, unsigned *validity )
|
||||
{
|
||||
struct {
|
||||
int init;
|
||||
TRUST_SEG_LIST tsl_head;
|
||||
TRUST_SEG_LIST tsl;
|
||||
int idx;
|
||||
} *ctx;
|
||||
struct enum_cert_paths_ctx *ctx;
|
||||
TRUST_SEG_LIST tsl;
|
||||
|
||||
if( !lid ) { /* release the context */
|
||||
@ -1675,7 +1719,8 @@ enum_cert_paths( void **context, ulong *lid,
|
||||
tsl = NULL;
|
||||
collect_paths( 0, opt.max_cert_depth, 1, &rec, tmppath, &tsl );
|
||||
m_free( tmppath );
|
||||
/* and now print them */
|
||||
sort_tsl_list( &tsl );
|
||||
/* setup the context */
|
||||
ctx->tsl_head = tsl;
|
||||
ctx->tsl = ctx->tsl_head;
|
||||
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
|
||||
*/
|
||||
|
@ -53,6 +53,7 @@ int check_trust( PKT_public_key *pk, unsigned *r_trustlevel );
|
||||
int query_trust_info( PKT_public_key *pk );
|
||||
int enum_cert_paths( void **context, ulong *lid,
|
||||
unsigned *ownertrust, unsigned *validity );
|
||||
int enum_cert_paths_print( void **context, FILE *fp, ulong selected_lid );
|
||||
unsigned get_ownertrust( ulong lid );
|
||||
int get_ownertrust_info( ulong lid );
|
||||
byte *get_pref_data( ulong lid, const byte *namehash, size_t *ret_n );
|
||||
|
@ -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>
|
||||
|
||||
* de.po: Imported new version.
|
||||
|
2
po/de.po
2
po/de.po
@ -2486,7 +2486,7 @@ msgid "error reading key record: %s\n"
|
||||
msgstr "Fehler beim Lesen des Schl.Satzes: %s\n"
|
||||
|
||||
#: g10/trustdb.c:1178
|
||||
msgid "line to long\n"
|
||||
msgid "line too long\n"
|
||||
msgstr "Zeile zu lang\n"
|
||||
|
||||
#: g10/trustdb.c:1186
|
||||
|
@ -2503,7 +2503,7 @@ msgid "error reading key record: %s\n"
|
||||
msgstr "%s: error comprobando la clave: %s\n"
|
||||
|
||||
#: g10/trustdb.c:1178
|
||||
msgid "line to long\n"
|
||||
msgid "line too long\n"
|
||||
msgstr ""
|
||||
|
||||
#: g10/trustdb.c:1186
|
||||
|
2
po/it.po
2
po/it.po
@ -2492,7 +2492,7 @@ msgid "error reading key record: %s\n"
|
||||
msgstr "%s: errore nel controllare la chiave: %s\n"
|
||||
|
||||
#: g10/trustdb.c:1178
|
||||
msgid "line to long\n"
|
||||
msgid "line too long\n"
|
||||
msgstr ""
|
||||
|
||||
#: g10/trustdb.c:1186
|
||||
|
@ -2492,7 +2492,7 @@ msgid "error reading key record: %s\n"
|
||||
msgstr "erro lendo registro de chave: %s\n"
|
||||
|
||||
#: g10/trustdb.c:1178
|
||||
msgid "line to long\n"
|
||||
msgid "line too long\n"
|
||||
msgstr "linha muito longa\n"
|
||||
|
||||
#: g10/trustdb.c:1186
|
||||
|
2
po/ru.po
2
po/ru.po
@ -2543,7 +2543,7 @@ msgid "error reading key record: %s\n"
|
||||
msgstr "Fehler beim Erzeugen der \"Passphrase\": %s\n"
|
||||
|
||||
#: g10/trustdb.c:1178
|
||||
msgid "line to long\n"
|
||||
msgid "line too long\n"
|
||||
msgstr ""
|
||||
|
||||
#: g10/trustdb.c:1186
|
||||
|
@ -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>
|
||||
|
||||
|
||||
|
@ -2,59 +2,57 @@
|
||||
# gnupg -- gnu privacy guard
|
||||
# This is a template. The dist target uses it to create the real file.
|
||||
#
|
||||
%define version @pkg_version@
|
||||
Summary: GPL public key crypto
|
||||
Name: gnupg
|
||||
Version: @pkg_version@
|
||||
Release: 3
|
||||
Version: %{version}
|
||||
Release: 1
|
||||
Copyright: GPL
|
||||
Group: Applications/Cryptography
|
||||
Source: ftp://ftp.guug.de/pub/gcrypt/
|
||||
URL: http://www.d.shuttle.de/isil/crypt/gnupg.html
|
||||
Vendor: TechnoCage
|
||||
Packager: Caskey L. Dickson <caskey-at-technocage.com>
|
||||
Source: ftp://ftp.gnupg.org/pub/gcrypt/gnupg-%{version}.tar.gz
|
||||
URL: http://www.gnupg.org
|
||||
Provides: gpg openpgp
|
||||
BuildRoot: /tmp/gnupg
|
||||
|
||||
%description
|
||||
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
|
||||
compliance with the OpenPGP draft.
|
||||
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 in
|
||||
compliance with the OpenPGP specification (RFC2440).
|
||||
|
||||
%prep
|
||||
rm -rf $RPM_BUILD_DIR/gnupg-@pkg_version@
|
||||
tar -xvzf $RPM_SOURCE_DIR/gnupg-@pkg_version@.tar.gz
|
||||
%setup
|
||||
|
||||
rm -rf $RPM_BUILD_ROOT
|
||||
|
||||
%build
|
||||
cd gnupg-@pkg_version@
|
||||
chown -R root.root *
|
||||
./configure --prefix=/usr
|
||||
CFLAGS="$RPM_OPT_FLAGS" ./configure --prefix=/usr
|
||||
make
|
||||
|
||||
%install
|
||||
cd gnupg-@pkg_version@
|
||||
make install
|
||||
make prefix="${RPM_BUILD_ROOT}/usr" install
|
||||
|
||||
%clean
|
||||
rm -rf $RPM_BUILD_ROOT
|
||||
|
||||
%files
|
||||
%doc gnupg-@pkg_version@/doc/DETAILS
|
||||
%doc gnupg-@pkg_version@/INSTALL
|
||||
%doc gnupg-@pkg_version@/doc/rfcs
|
||||
%doc gnupg-@pkg_version@/AUTHORS
|
||||
%doc gnupg-@pkg_version@/ABOUT-NLS
|
||||
%doc gnupg-@pkg_version@/COPYING
|
||||
%doc gnupg-@pkg_version@/ChangeLog
|
||||
%doc gnupg-@pkg_version@/NEWS
|
||||
%doc gnupg-@pkg_version@/README
|
||||
%doc gnupg-@pkg_version@/THANKS
|
||||
%doc gnupg-@pkg_version@/TODO
|
||||
/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(-,root,root) %doc doc/DETAILS
|
||||
%attr(-,root,root) %doc INSTALL
|
||||
%attr(-,root,root) %doc AUTHORS
|
||||
%attr(-,root,root) %doc ABOUT-NLS
|
||||
%attr(-,root,root) %doc COPYING
|
||||
%attr(-,root,root) %doc ChangeLog
|
||||
%attr(-,root,root) %doc NEWS
|
||||
%attr(-,root,root) %doc README
|
||||
%attr(-,root,root) %doc THANKS
|
||||
%attr(-,root,root) %doc TODO
|
||||
%attr(-,root,root) /usr/man/man1/gpg.1
|
||||
%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
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user