mirror of
git://git.gnupg.org/gnupg.git
synced 2024-09-24 15:31:41 +02:00
See ChangeLog: Thu Jul 8 16:21:27 CEST 1999 Werner Koch
This commit is contained in:
parent
bd7298cf0d
commit
c5ca275573
4
NEWS
4
NEWS
@ -8,6 +8,10 @@
|
|||||||
* Changes to support libtool which is needed for the development
|
* Changes to support libtool which is needed for the development
|
||||||
of libgcrypt.
|
of libgcrypt.
|
||||||
|
|
||||||
|
* New script tools/lspgpot to help transferring assigned
|
||||||
|
trustvalues from PGP to GnuPG.
|
||||||
|
|
||||||
|
|
||||||
Noteworthy changes in version 0.9.8
|
Noteworthy changes in version 0.9.8
|
||||||
-----------------------------------
|
-----------------------------------
|
||||||
|
|
||||||
|
6
doc/FAQ
6
doc/FAQ
@ -336,3 +336,9 @@
|
|||||||
you active characterset matches the one displayed - if not, restrict
|
you active characterset matches the one displayed - if not, restrict
|
||||||
yourself to plain 7 bit ASCII and no mapping has to be done.
|
yourself to plain 7 bit ASCII and no mapping has to be done.
|
||||||
|
|
||||||
|
Q: How do I transfer owner trust values from PGP to GnuPG?
|
||||||
|
A: There is a script in the tools directory to help you:
|
||||||
|
After you have imported the PGP keyring you can give this command:
|
||||||
|
$ lspgpot pgpkeyring | gpg --import-ownertrust
|
||||||
|
|
||||||
|
|
||||||
|
@ -1087,6 +1087,14 @@ Print key listings delimited by colons.
|
|||||||
Print key listings delimited by colons and print the public key data.
|
Print key listings delimited by colons and print the public key data.
|
||||||
</para></listitem></varlistentry>
|
</para></listitem></varlistentry>
|
||||||
|
|
||||||
|
<varlistentry>
|
||||||
|
<term>--with-fingerprint</term>
|
||||||
|
<listitem><para>
|
||||||
|
Same as the command --fingerprint but changes only the format of the output
|
||||||
|
and may be used together with another command.
|
||||||
|
</para></listitem></varlistentry>
|
||||||
|
|
||||||
|
|
||||||
</variablelist>
|
</variablelist>
|
||||||
</refsect1>
|
</refsect1>
|
||||||
|
|
||||||
|
@ -1,3 +1,16 @@
|
|||||||
|
Thu Jul 8 16:21:27 CEST 1999 Werner Koch <wk@isil.d.shuttle.de>
|
||||||
|
|
||||||
|
|
||||||
|
* packet.h (PKT_ring_trust): New
|
||||||
|
* parse-packet.c (parse_trust): Store trust value
|
||||||
|
* build-packet (build_packet): Ignore ring trust packets.
|
||||||
|
* mainproc.c (add_ring_trust): New.
|
||||||
|
(list_node): Print "rtv" records.
|
||||||
|
* g10.c: New option --with-fingerprint.
|
||||||
|
|
||||||
|
* trustdb.c (verify_own_keys): Don't insert if we are dry running
|
||||||
|
(check_trust): Ditto.
|
||||||
|
|
||||||
Wed Jul 7 13:08:40 CEST 1999 Werner Koch <wk@isil.d.shuttle.de>
|
Wed Jul 7 13:08:40 CEST 1999 Werner Koch <wk@isil.d.shuttle.de>
|
||||||
|
|
||||||
|
|
||||||
|
@ -125,6 +125,7 @@ build_packet( IOBUF out, PACKET *pkt )
|
|||||||
rc = do_onepass_sig( out, ctb, pkt->pkt.onepass_sig );
|
rc = do_onepass_sig( out, ctb, pkt->pkt.onepass_sig );
|
||||||
break;
|
break;
|
||||||
case PKT_RING_TRUST:
|
case PKT_RING_TRUST:
|
||||||
|
break; /* ignore it */
|
||||||
default:
|
default:
|
||||||
log_bug("invalid packet type in build_packet()\n");
|
log_bug("invalid packet type in build_packet()\n");
|
||||||
break;
|
break;
|
||||||
|
@ -105,6 +105,7 @@ enum cmd_and_opt_values { aNull = 0,
|
|||||||
|
|
||||||
oTextmode,
|
oTextmode,
|
||||||
oFingerprint,
|
oFingerprint,
|
||||||
|
oWithFingerprint,
|
||||||
oAnswerYes,
|
oAnswerYes,
|
||||||
oAnswerNo,
|
oAnswerNo,
|
||||||
oKeyring,
|
oKeyring,
|
||||||
@ -319,6 +320,7 @@ static ARGPARSE_OPTS opts[] = {
|
|||||||
{ oUseEmbeddedFilename, "use-embedded-filename", 0, "@" },
|
{ oUseEmbeddedFilename, "use-embedded-filename", 0, "@" },
|
||||||
{ oUtf8Strings, "utf8-strings", 0, "@" },
|
{ oUtf8Strings, "utf8-strings", 0, "@" },
|
||||||
{ oNoUtf8Strings, "no-utf8-strings", 0, "@" },
|
{ oNoUtf8Strings, "no-utf8-strings", 0, "@" },
|
||||||
|
{ oWithFingerprint, "with-fingerprint", 0, "@" },
|
||||||
{0} };
|
{0} };
|
||||||
|
|
||||||
|
|
||||||
@ -510,6 +512,7 @@ main( int argc, char **argv )
|
|||||||
char *s2k_cipher_string = NULL;
|
char *s2k_cipher_string = NULL;
|
||||||
char *s2k_digest_string = NULL;
|
char *s2k_digest_string = NULL;
|
||||||
int pwfd = -1;
|
int pwfd = -1;
|
||||||
|
int with_fpr = 0; /* make an option out of --fingerprint */
|
||||||
#ifdef USE_SHM_COPROCESSING
|
#ifdef USE_SHM_COPROCESSING
|
||||||
ulong requested_shm_size=0;
|
ulong requested_shm_size=0;
|
||||||
#endif
|
#endif
|
||||||
@ -684,6 +687,8 @@ main( int argc, char **argv )
|
|||||||
case oDebugAll: opt.debug = ~0; break;
|
case oDebugAll: opt.debug = ~0; break;
|
||||||
case oStatusFD: set_status_fd( pargs.r.ret_int ); break;
|
case oStatusFD: set_status_fd( pargs.r.ret_int ); break;
|
||||||
case oLoggerFD: log_set_logfile( NULL, pargs.r.ret_int ); break;
|
case oLoggerFD: log_set_logfile( NULL, pargs.r.ret_int ); break;
|
||||||
|
case oWithFingerprint:
|
||||||
|
with_fpr=1; /*fall thru*/
|
||||||
case oFingerprint: opt.fingerprint++; break;
|
case oFingerprint: opt.fingerprint++; break;
|
||||||
case oSecretKeyring: append_to_strlist( &sec_nrings, pargs.r.ret_str); break;
|
case oSecretKeyring: append_to_strlist( &sec_nrings, pargs.r.ret_str); break;
|
||||||
case oOptions:
|
case oOptions:
|
||||||
@ -875,7 +880,7 @@ main( int argc, char **argv )
|
|||||||
if( log_get_errorcount(0) )
|
if( log_get_errorcount(0) )
|
||||||
g10_exit(2);
|
g10_exit(2);
|
||||||
|
|
||||||
if( !cmd && opt.fingerprint )
|
if( !cmd && opt.fingerprint && !with_fpr )
|
||||||
set_cmd( &cmd, aListKeys);
|
set_cmd( &cmd, aListKeys);
|
||||||
|
|
||||||
if( cmd == aKMode || cmd == aKModeC ) { /* kludge to be compatible to pgp */
|
if( cmd == aKMode || cmd == aKModeC ) { /* kludge to be compatible to pgp */
|
||||||
|
@ -124,6 +124,17 @@ add_subkey( CTX c, PACKET *pkt )
|
|||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static int
|
||||||
|
add_ring_trust( CTX c, PACKET *pkt )
|
||||||
|
{
|
||||||
|
if( !c->list ) {
|
||||||
|
log_error("ring trust w/o key\n" );
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
add_kbnode( c->list, new_kbnode( pkt ) );
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
static int
|
static int
|
||||||
add_signature( CTX c, PACKET *pkt )
|
add_signature( CTX c, PACKET *pkt )
|
||||||
@ -570,6 +581,13 @@ list_node( CTX c, KBNODE node )
|
|||||||
if( c->local_id )
|
if( c->local_id )
|
||||||
putchar( get_ownertrust_info( c->local_id ) );
|
putchar( get_ownertrust_info( c->local_id ) );
|
||||||
putchar(':');
|
putchar(':');
|
||||||
|
if( node->next && node->next->pkt->pkttype == PKT_RING_TRUST) {
|
||||||
|
putchar('\n'); any=1;
|
||||||
|
if( opt.fingerprint )
|
||||||
|
print_fingerprint( pk, NULL );
|
||||||
|
printf("rtv:1:%u:\n",
|
||||||
|
node->next->pkt->pkt.ring_trust->trustval );
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
printf("%s %4u%c/%08lX %s ",
|
printf("%s %4u%c/%08lX %s ",
|
||||||
@ -604,6 +622,11 @@ list_node( CTX c, KBNODE node )
|
|||||||
putchar('\n');
|
putchar('\n');
|
||||||
if( opt.fingerprint && !any )
|
if( opt.fingerprint && !any )
|
||||||
print_fingerprint( pk, NULL );
|
print_fingerprint( pk, NULL );
|
||||||
|
if( node->next
|
||||||
|
&& node->next->pkt->pkttype == PKT_RING_TRUST ) {
|
||||||
|
printf("rtv:2:%u:\n",
|
||||||
|
node->next->pkt->pkt.ring_trust->trustval );
|
||||||
|
}
|
||||||
any=1;
|
any=1;
|
||||||
}
|
}
|
||||||
else if( node->pkt->pkttype == PKT_PUBLIC_SUBKEY ) {
|
else if( node->pkt->pkttype == PKT_PUBLIC_SUBKEY ) {
|
||||||
@ -886,6 +909,7 @@ do_proc_packets( CTX c, IOBUF a )
|
|||||||
case PKT_PLAINTEXT: proc_plaintext( c, pkt ); break;
|
case PKT_PLAINTEXT: proc_plaintext( c, pkt ); break;
|
||||||
case PKT_COMPRESSED: proc_compressed( c, pkt ); break;
|
case PKT_COMPRESSED: proc_compressed( c, pkt ); break;
|
||||||
case PKT_ONEPASS_SIG: newpkt = add_onepass_sig( c, pkt ); break;
|
case PKT_ONEPASS_SIG: newpkt = add_onepass_sig( c, pkt ); break;
|
||||||
|
case PKT_RING_TRUST: newpkt = add_ring_trust( c, pkt ); break;
|
||||||
default: newpkt = 0; break;
|
default: newpkt = 0; break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -172,6 +172,10 @@ typedef struct {
|
|||||||
IOBUF buf; /* IOBUF reference */
|
IOBUF buf; /* IOBUF reference */
|
||||||
} PKT_encrypted;
|
} PKT_encrypted;
|
||||||
|
|
||||||
|
typedef struct {
|
||||||
|
unsigned int trustval;
|
||||||
|
} PKT_ring_trust;
|
||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
u32 len; /* length of encrypted data */
|
u32 len; /* length of encrypted data */
|
||||||
IOBUF buf; /* IOBUF reference */
|
IOBUF buf; /* IOBUF reference */
|
||||||
@ -198,6 +202,7 @@ struct packet_struct {
|
|||||||
PKT_user_id *user_id; /* PKT_USER_ID */
|
PKT_user_id *user_id; /* PKT_USER_ID */
|
||||||
PKT_compressed *compressed; /* PKT_COMPRESSED */
|
PKT_compressed *compressed; /* PKT_COMPRESSED */
|
||||||
PKT_encrypted *encrypted; /* PKT_ENCRYPTED[_MDC] */
|
PKT_encrypted *encrypted; /* PKT_ENCRYPTED[_MDC] */
|
||||||
|
PKT_ring_trust *ring_trust; /* PKT_RING_TRUST */
|
||||||
PKT_plaintext *plaintext; /* PKT_PLAINTEXT */
|
PKT_plaintext *plaintext; /* PKT_PLAINTEXT */
|
||||||
} pkt;
|
} pkt;
|
||||||
};
|
};
|
||||||
|
@ -63,7 +63,8 @@ static int parse_user_id( IOBUF inp, int pkttype, unsigned long pktlen,
|
|||||||
PACKET *packet );
|
PACKET *packet );
|
||||||
static int parse_comment( IOBUF inp, int pkttype, unsigned long pktlen,
|
static int parse_comment( IOBUF inp, int pkttype, unsigned long pktlen,
|
||||||
PACKET *packet );
|
PACKET *packet );
|
||||||
static void parse_trust( IOBUF inp, int pkttype, unsigned long pktlen );
|
static void parse_trust( IOBUF inp, int pkttype, unsigned long pktlen,
|
||||||
|
PACKET *packet );
|
||||||
static int parse_plaintext( IOBUF inp, int pkttype, unsigned long pktlen,
|
static int parse_plaintext( IOBUF inp, int pkttype, unsigned long pktlen,
|
||||||
PACKET *packet, int new_ctb);
|
PACKET *packet, int new_ctb);
|
||||||
static int parse_compressed( IOBUF inp, int pkttype, unsigned long pktlen,
|
static int parse_compressed( IOBUF inp, int pkttype, unsigned long pktlen,
|
||||||
@ -421,8 +422,8 @@ parse( IOBUF inp, PACKET *pkt, int reqtype, ulong *retpos,
|
|||||||
rc = parse_comment(inp, pkttype, pktlen, pkt);
|
rc = parse_comment(inp, pkttype, pktlen, pkt);
|
||||||
break;
|
break;
|
||||||
case PKT_RING_TRUST:
|
case PKT_RING_TRUST:
|
||||||
parse_trust(inp, pkttype, pktlen);
|
parse_trust(inp, pkttype, pktlen, pkt);
|
||||||
rc = G10ERR_UNKNOWN_PACKET;
|
rc = 0;
|
||||||
break;
|
break;
|
||||||
case PKT_PLAINTEXT:
|
case PKT_PLAINTEXT:
|
||||||
rc = parse_plaintext(inp, pkttype, pktlen, pkt, new_ctb );
|
rc = parse_plaintext(inp, pkttype, pktlen, pkt, new_ctb );
|
||||||
@ -1517,11 +1518,13 @@ parse_comment( IOBUF inp, int pkttype, unsigned long pktlen, PACKET *packet )
|
|||||||
|
|
||||||
|
|
||||||
static void
|
static void
|
||||||
parse_trust( IOBUF inp, int pkttype, unsigned long pktlen )
|
parse_trust( IOBUF inp, int pkttype, unsigned long pktlen, PACKET *pkt )
|
||||||
{
|
{
|
||||||
int c;
|
int c;
|
||||||
|
|
||||||
c = iobuf_get_noeof(inp);
|
c = iobuf_get_noeof(inp);
|
||||||
|
pkt->pkt.ring_trust = m_alloc( sizeof *pkt->pkt.ring_trust );
|
||||||
|
pkt->pkt.ring_trust->trustval = c;
|
||||||
if( list_mode )
|
if( list_mode )
|
||||||
printf(":trust packet: flag=%02x\n", c );
|
printf(":trust packet: flag=%02x\n", c );
|
||||||
}
|
}
|
||||||
|
@ -477,6 +477,8 @@ verify_own_keys(void)
|
|||||||
|
|
||||||
/* make sure that the pubkey is in the trustdb */
|
/* make sure that the pubkey is in the trustdb */
|
||||||
rc = query_trust_record( pk );
|
rc = query_trust_record( pk );
|
||||||
|
if( rc == -1 && opt.dry_run )
|
||||||
|
goto skip;
|
||||||
if( rc == -1 ) { /* put it into the trustdb */
|
if( rc == -1 ) { /* put it into the trustdb */
|
||||||
rc = insert_trust_record_by_pk( pk );
|
rc = insert_trust_record_by_pk( pk );
|
||||||
if( rc ) {
|
if( rc ) {
|
||||||
@ -2217,6 +2219,8 @@ check_trust( PKT_public_key *pk, unsigned *r_trustlevel,
|
|||||||
g10_errstr(rc));
|
g10_errstr(rc));
|
||||||
return rc;
|
return rc;
|
||||||
}
|
}
|
||||||
|
else if( rc == -1 && opt.dry_run )
|
||||||
|
return G10ERR_GENERAL;
|
||||||
else if( rc == -1 ) { /* not found - insert */
|
else if( rc == -1 ) { /* not found - insert */
|
||||||
rc = insert_trust_record_by_pk( pk );
|
rc = insert_trust_record_by_pk( pk );
|
||||||
if( rc ) {
|
if( rc ) {
|
||||||
|
@ -1,3 +1,8 @@
|
|||||||
|
Thu Jul 8 16:21:27 CEST 1999 Werner Koch <wk@isil.d.shuttle.de>
|
||||||
|
|
||||||
|
|
||||||
|
* lspgpot: New
|
||||||
|
|
||||||
Wed Jul 7 13:08:40 CEST 1999 Werner Koch <wk@isil.d.shuttle.de>
|
Wed Jul 7 13:08:40 CEST 1999 Werner Koch <wk@isil.d.shuttle.de>
|
||||||
|
|
||||||
|
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
## Process this file with automake to produce Makefile.in
|
## Process this file with automake to produce Makefile.in
|
||||||
|
|
||||||
|
EXTRA_DIST = lspgpot
|
||||||
INCLUDES = -I$(top_srcdir)/include -I$(top_srcdir)/intl
|
INCLUDES = -I$(top_srcdir)/include -I$(top_srcdir)/intl
|
||||||
needed_libs = ../cipher/libcipher.la \
|
needed_libs = ../cipher/libcipher.la \
|
||||||
../mpi/libmpi.la ../util/libutil.la @INTLLIBS@
|
../mpi/libmpi.la ../util/libutil.la @INTLLIBS@
|
||||||
|
15
tools/lspgpot
Executable file
15
tools/lspgpot
Executable file
@ -0,0 +1,15 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
# lspgpot - script to extract the ownertrust values
|
||||||
|
# from a PGP keyrings and list them in GnuPG ownertrust format.
|
||||||
|
|
||||||
|
../g10/gpg --dry-run --with-fingerprint --with-colons $* | awk '
|
||||||
|
BEGIN { FS=":"
|
||||||
|
printf "# Ownertrust listing generated by lspgpot\n"
|
||||||
|
printf "# This can be imported using the command:\n"
|
||||||
|
printf "# ggp --import-ownertrust\n\n" }
|
||||||
|
$1 == "fpr" { fpr = $10 }
|
||||||
|
$1 == "rtv" && $2 == 1 && $3 == 2 { printf "%s:3:\n", fpr; next }
|
||||||
|
$1 == "rtv" && $2 == 1 && $3 == 5 { printf "%s:4:\n", fpr; next }
|
||||||
|
$1 == "rtv" && $2 == 1 && $3 == 6 { printf "%s:5:\n", fpr; next }
|
||||||
|
'
|
||||||
|
|
Loading…
Reference in New Issue
Block a user