aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWerner Koch <[email protected]>1999-06-08 11:41:46 +0000
committerWerner Koch <[email protected]>1999-06-08 11:41:46 +0000
commit40238d4b63b409d716d1e105c999725e8a7beedc (patch)
tree55ddfe3d43fa2704761ee3c5a54138101002d591
parentSee ChangeLog: Sat Jun 5 15:30:33 CEST 1999 Werner Koch (diff)
downloadgnupg-40238d4b63b409d716d1e105c999725e8a7beedc.tar.gz
gnupg-40238d4b63b409d716d1e105c999725e8a7beedc.zip
See ChangeLog: Tue Jun 8 13:36:25 CEST 1999 Werner Koch
-rw-r--r--cipher/dsa.c1
-rw-r--r--doc/DETAILS8
-rw-r--r--doc/gpg.1pod27
-rw-r--r--g10/ChangeLog5
-rw-r--r--g10/g10.c3
-rw-r--r--g10/keylist.c18
-rw-r--r--g10/options.h1
-rw-r--r--tools/ChangeLog5
-rw-r--r--tools/mpicalc.c19
9 files changed, 72 insertions, 15 deletions
diff --git a/cipher/dsa.c b/cipher/dsa.c
index c8fcd66ef..14854635c 100644
--- a/cipher/dsa.c
+++ b/cipher/dsa.c
@@ -293,7 +293,6 @@ verify(MPI r, MPI s, MPI hash, DSA_public_key *pkey )
/* u2 = r * w mod q */
mpi_mulm( u2, r, w, pkey->q );
-
/* v = g^u1 * y^u2 mod p mod q */
base[0] = pkey->g; exp[0] = u1;
base[1] = pkey->y; exp[1] = u2;
diff --git a/doc/DETAILS b/doc/DETAILS
index 136447bfb..d680a88d9 100644
--- a/doc/DETAILS
+++ b/doc/DETAILS
@@ -12,6 +12,7 @@ ssb::1536:20:5CE086B5B5A18FF4:1998-07-07:0:::
ssb = secret subkey (secondary key)
uid = user id (only field 10 is used).
fpr = fingerprint: (fingerprint is in field 10)
+ pkd = public key data (special field format, see below)
2. Field: A letter describing the calculated trust, see doc/FAQ
This is a single letter, but be prepared that additional
@@ -39,6 +40,13 @@ ssb::1536:20:5CE086B5B5A18FF4:1998-07-07:0:::
More fields may be added later.
+If field 1 has the tag "pkd", a listing looks like this:
+pkd:0:1024:B665B1435F4C2 .... FF26ABB:
+ ! ! !-- the value
+ ! !------ for infomation number of bits in the value
+ !--------- index (eg. DSA goes from 0 to 3: p,q,g,y)
+
+
Format of the "--status-fd" output
==================================
diff --git a/doc/gpg.1pod b/doc/gpg.1pod
index 55f0143aa..4a50e898f 100644
--- a/doc/gpg.1pod
+++ b/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.
@@ -535,6 +535,9 @@ B<--version>
B<--with-colons>
Print key listings delimited by colons.
+B<--with-key-data>
+ Print key listings delimited by colons and print the public key data.
+
B<--warranty>
Print warranty information.
@@ -549,11 +552,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
@@ -571,7 +574,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
diff --git a/g10/ChangeLog b/g10/ChangeLog
index a66b8af38..53870b45f 100644
--- a/g10/ChangeLog
+++ b/g10/ChangeLog
@@ -1,3 +1,8 @@
+Tue Jun 8 13:36:25 CEST 1999 Werner Koch <[email protected]>
+
+ * keylist.c (print_key_data): New and called elsewhere.
+ * g10.c: New option --with-key-data
+
Wed Jun 2 14:17:19 CEST 1999 Werner Koch <[email protected]>
* mainproc.c (proc_tree): Yet another bad hack to cope with
diff --git a/g10/g10.c b/g10/g10.c
index acc3f3098..d4580f7ae 100644
--- a/g10/g10.c
+++ b/g10/g10.c
@@ -136,6 +136,7 @@ enum cmd_and_opt_values { aNull = 0,
oNoBatch,
oHomedir,
oWithColons,
+ oWithKeyData,
oSkipVerify,
oCompressKeys,
oCompressSigs,
@@ -285,6 +286,7 @@ static ARGPARSE_OPTS opts[] = {
{ oHomedir, "homedir", 2, "@" }, /* defaults to "~/.gnupg" */
{ oNoBatch, "no-batch", 0, "@" },
{ oWithColons, "with-colons", 0, "@"},
+ { oWithKeyData,"with-key-data", 0, "@"},
{ aListKeys, "list-key", 0, "@" }, /* alias */
{ aListSigs, "list-sig", 0, "@" }, /* alias */
{ aCheckKeys, "check-sig",0, "@" }, /* alias */
@@ -693,6 +695,7 @@ main( int argc, char **argv )
case oNoOptions: break; /* no-options */
case oHomedir: opt.homedir = pargs.r.ret_str; break;
case oNoBatch: opt.batch = 0; break;
+ case oWithKeyData: opt.with_key_data=1; /* fall thru */
case oWithColons: opt.with_colons=':'; break;
case oSkipVerify: opt.skip_verify=1; break;
diff --git a/g10/keylist.c b/g10/keylist.c
index cfd6772c0..02a265394 100644
--- a/g10/keylist.c
+++ b/g10/keylist.c
@@ -152,6 +152,20 @@ list_one( STRLIST names, int secret )
}
}
+static void
+print_key_data( PKT_public_key *pk, u32 *keyid )
+{
+ int n = pubkey_get_npkey( pk->pubkey_algo );
+ int i;
+
+ for(i=0; i < n; i++ ) {
+ printf("pkd:%d:%u:", i, mpi_get_nbits( pk->pkey[i] ) );
+ mpi_print(stdout, pk->pkey[i], 1 );
+ putchar(':');
+ putchar('\n');
+ }
+}
+
static void
list_keyblock( KBNODE keyblock, int secret )
@@ -249,6 +263,8 @@ list_keyblock( KBNODE keyblock, int secret )
if( !any ) {
if( opt.fingerprint )
fingerprint( pk, sk );
+ if( opt.with_key_data )
+ print_key_data( pk, keyid );
any = 1;
}
}
@@ -289,6 +305,8 @@ list_keyblock( KBNODE keyblock, int secret )
datestr_from_pk( pk2 ) );
if( opt.fingerprint > 1 )
fingerprint( pk2, NULL );
+ if( opt.with_key_data )
+ print_key_data( pk2, keyid2 );
}
else if( node->pkt->pkttype == PKT_SECRET_SUBKEY ) {
u32 keyid2[2];
diff --git a/g10/options.h b/g10/options.h
index 57265f9e4..ff477dfcf 100644
--- a/g10/options.h
+++ b/g10/options.h
@@ -39,6 +39,7 @@ struct {
int answer_no; /* answer no on most questions */
int check_sigs; /* check key signatures */
int with_colons;
+ int with_key_data;
int fingerprint; /* list fingerprints */
int list_sigs; /* list signatures */
int no_armor;
diff --git a/tools/ChangeLog b/tools/ChangeLog
index 0f956055b..8555c72ce 100644
--- a/tools/ChangeLog
+++ b/tools/ChangeLog
@@ -1,3 +1,8 @@
+Tue Jun 8 13:36:25 CEST 1999 Werner Koch <[email protected]>
+
+ * mpicalc.c (main): hex digits may now be lowercase
+ (do_mulm): new.
+
Thu Dec 10 20:15:36 CET 1998 Werner Koch <[email protected]>
* mpicalc.c (main): Moved initialization out of definition.
diff --git a/tools/mpicalc.c b/tools/mpicalc.c
index 22af505ac..95ab47c29 100644
--- a/tools/mpicalc.c
+++ b/tools/mpicalc.c
@@ -131,6 +131,18 @@ do_mul(void)
}
static void
+do_mulm(void)
+{
+ if( stackidx < 3 ) {
+ fputs("stack underflow\n", stderr);
+ return;
+ }
+ mpi_mulm( stack[stackidx-3], stack[stackidx-3],
+ stack[stackidx-2], stack[stackidx-1] );
+ stackidx -= 2;
+}
+
+static void
do_div(void)
{
if( stackidx < 2 ) {
@@ -237,7 +249,7 @@ main(int argc, char **argv)
while( (c=getc(stdin)) != EOF ) {
if( !state ) { /* waiting */
- if( isdigit(c) || (c >='A' && c <= 'F') ) {
+ if( isdigit(c) ) {
state = 1;
ungetc(c, stdin);
strbuf[0] = '0';
@@ -275,6 +287,9 @@ main(int argc, char **argv)
case '*':
do_mul();
break;
+ case 'm':
+ do_mulm();
+ break;
case '/':
do_div();
break;
@@ -338,7 +353,7 @@ main(int argc, char **argv)
}
}
else if( state == 1 ) { /* in a number */
- if( !(isdigit(c) || (c >='A' && c <= 'F')) ) { /* store the number */
+ if( !isxdigit(c) ) { /* store the number */
state = 0;
ungetc(c, stdin);
if( stridx < 1000 )