home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Amiga MA Magazine 1998 #6
/
amigamamagazinepolishissue1998.iso
/
varia
/
pgp
/
pgpamiga
/
source
/
todo
< prev
next >
Wrap
Internet Message Format
|
1993-12-23
|
28KB
From dino.dinoco.de!teralon.GUN.de!wnet.edex.edu.au!simons Thu, 9 Dec 93 23:26:04 +0100
Received: by peti.GUN.de (V1.16/Amiga)
id AA00000; Thu, 9 Dec 93 23:26:04 +0100
Received: by dino.dinoco.de (V1.16/Amiga)
id <8u8l@dino.dinoco.de>; Thu, 9 Dec 93 14:54:43 +0100
Received: by teralon.GUN.de (Smail3.1.28.1)
from rs1.rrz.Uni-Koeln.DE with smtp
id <m0p7io2-0004PEA>; Thu, 9 Dec 93 09:41 CET
Received: from alsvid.une.edu.au by rs1.rrz.Uni-Koeln.DE with SMTP id AA41689
(5.65c/IDA-1.4.4 for <simons@peti.gun.de>); Thu, 9 Dec 1993 09:36:35 +0100
Received: by alsvid.une.edu.au id AA23375
(5.65c8+/IDA-1.4.4 for peti.gun.de!simons); Thu, 9 Dec 1993 19:34:00 +1100
Received: by wnet.edex.edu.au (\/<>\/ SmailAmiga 1.02j21)
id <m0p7nZ6-0000XAT>; Thu, 9 Dec 1993 15:46:04 +1100
In-Reply-To: <9312050323.AA00fe3@aargh.adsp.sub.org>
X-Mailer: //\\miga Electronic Mail (AmiElm 2.253)
Errors-To: pgpmip-owner@wnet.edex.edu.au
Message-Id: <9312090338.0k4u@peti.GUN.de>
Date: Thu, 9 Dec 1993 15:46:04 +1100
Reply-To: pgpmip@wnet.edex.edu.au
From: simons@peti.GUN.de (Peter Simons)
To: simons@peti.gun.de
Subject: (133) PGPMIP still alive?
List: PGPMIP - PGP Mail Intergration Project - Mail List
From: Peter Simons <simons@peti.GUN.de>
Date: Wed, 8 Dec 93 21:38:03 +0100
Subj: Re: (131) PGPMIP still alive?
Hi Marc, in <9312050323.AA00fe3@aargh.adsp.sub.org> on Dec 5 you
wrote:
> Three things:
>
> a) Is this mailinglist still alive?
Yes, it is. I'm stuck with my job, LharcUUCP and the pgp.library, but
I'll finish the PGPMIP stuff before Xmas, definetly.
> b) Is PGPMIP still under development? Is the Amiga version (that I have in
> beta) now finished or already released?
It isn't really announced anywhere, but since the archive is available
via BMS from peti, it'd call it pretty official. Although it still
needs some work.
> c) Is it possible to add a new variable to the Amiga version? I need an
> option for 'your user id'. PGP uses the first entry in the secret key ring
> if it is not supplied. Sometimes this can be very annoying if you forget
> to extract - remove - re-add your preffered secret key. I think of
> something like uulib:config entry 'PGPPrefferedUID' and a env variable of
> the same name (overriding the config entry). This should be optional, ie
> not specifying it should force same behaviour as it is now.
Good idea! I'll add this into PGP, too.
bye, Peter
--
**** **** ***** ***
* * * * * ACCEPTING: PGP, MIME and BMS
**** *** * *
* * * * PHONE: +49 228 746061
* **** * ***
From dino.dinoco.de!teralon.GUN.de!extropia.wimsey.com!pgp-dev-request Mon, 13 Dec 93 19:59:21 +0100
Received: by peti.GUN.de (V1.16/Amiga)
id AA00000; Mon, 13 Dec 93 19:59:21 +0100
Received: by dino.dinoco.de (V1.16/Amiga)
id <8w4z@dino.dinoco.de>; Mon, 13 Dec 93 18:50:27 +0100
Received: by teralon.GUN.de (Smail3.1.28.1)
from rs1.rrz.Uni-Koeln.DE with smtp
id <m0p8pEP-0004P3A>; Sun, 12 Dec 93 10:44 CET
Received: from vanbc.wimsey.com by rs1.rrz.Uni-Koeln.DE with SMTP id AA76953
(5.65c/IDA-1.4.4 for <SIMONS@PETI.GUN.DE>); Sun, 12 Dec 1993 10:40:37 +0100
Received: by vanbc.wimsey.com (Smail3.1.28.1)
id m0p8n2r-0000SaC; Sun, 12 Dec 93 01:24 PST
Received: by xtropia id AA06551
(5.65c/IDA-1.4.4 for pgp-dev-dist@extropia.wimsey.com); Sun, 12 Dec 1993 01:05:59 -0800
Resent-Message-Id: <m0p8n2r-0000SaC@vanbc.wimsey.com>
Resent-Sender: pgp-dev-request@extropia.wimsey.com
Message-Id: <9312120859.AA15337@binkley.MIT.EDU>
Date: Sun, 12 Dec 93 03:59:36 EST
Resent-From: pgp-dev@extropia.wimsey.com
X-Mailing-List: <pgp-dev@extropia.wimsey.com> archive/latest/169
Comment: Contact miron@extropia.wimsey.com for information about this service.
X-Loop: pgp-dev@extropia.wimsey.com
Precedence: list
Resent-Sender: pgp-dev-request@extropia.wimsey.com
From: Derek Atkins <warlord@MIT.EDU>
To: pgp-dev@extropia.wimsey.com
Subject: PGP bugs (fwd)
X-Status: OR
I was sent this message. I thought I'd forward it, even though
no one seems to be working on fixing bugs. It would be a good
idea to make sure these don't get repeated. I haven't looked at
the code myself to create a fix.
-derek
------- Forwarded Message
Date: Sun, 12 Dec 93 02:40:52 EST
From: Calvin Clark <ckclark@MIT.EDU>
To: warlord@MIT.EDU
Subject: PGP bugs
Content-Length: 7883
- -----BEGIN PGP SIGNED MESSAGE-----
[ Derek:
Please read this report and forward it the appropriate people.
-Calvin ]
This message is a report of three bugs in PGP 2.3A:
fileio.c: buildfilename()
- silent truncation of PGPPATH
- possible overflow problem in some situations
random.c: getstring()
- infinite loop
No fixes are included, as there seem to be arbritary choices
in the present code that I do not understand, and I'd
rather not take chances mucking with it.
- - ----------------------------------------------------------------------
I'm not sure if this was the case in earlier versions of PGP, but 2.3A
silently ignores your PGPPATH enviornment variable if it is longer than
50 characters. Look at fileio.c:
char *buildfilename(char *result, char *fname)
/* Builds a filename with a complete path specifier from the environmental
variable PGPPATH.
*/
{ char *s = getenv(PGPPATH);
if ( s==NULL || strlen(s) > 50) /* undefined, or too long to use */
s="";
strcpy(result,s);
The string passed to this routine as "result" is usually a static
character array of dimension MAX_PATH, which is set (in pgp.h) to 64 on
MSDOS systems and 256 on other systems.
Now I can understand why, with a program like pgp, one might not want to
trust the system header file or POSIX pathconf() definitions for the
maximum path length. It is acceptable to choose an internal limit that
is almost certainly lower than the system limit. However, it is a bug
that it treats a long PGPPATH envionment variable the same as if it is
not set at all. It should, at the very least, print a message like:
warning: PGPPATH too long; maximum is <whatever>
Also, the in-lined 50 is bad coding style. The limit is really imposed
by the value of MAX_PATH, so something like MAX_PATH - strlen (fname) -
2 or something should be used instead.
This brings up another bug: the length of fname is not checked in the
routine buildfilename(), so if the combined length of the PGPPATH and
the filename is longer than MAX_PATH, the strcat() may overflow,
producing unpredictable side-effects. Looking at the rest of the code,
it seems that it is possible for this to happen on MSDOS systems, since
it is possible to enter a filename of up to 59 characters in length (see
line 766 in keymgmt.c, where getstring() is called with an explicit
length argument of 59. I have no idea where the `59' comes from.)
This brings me to yet another bug, which I haven't had time to examine
yet. It may be a problem with getstring(), or with something else.
However, it does not deal correctly when I try to type a long filename.
[ Everything that follows refers to pgp23A on Solaris 2.1. ]
Example:
; PGPPATH=/oeuentg
# 204 <ckclark@w20-575-19>:/tmp
; !pgp
pgp -sta +clearsig=on motd
Cannot open configuration file /oeuentg/config.txt
Pretty Good Privacy 2.3a - Public-key encryption for the masses.
(c) 1990-1993 Philip Zimmermann, Phil's Pretty Good Software. 1 Jul 93
Date: 1993/12/12 06:20 GMT
A secret key is required to make a signature.
You specified no user ID to select your secret key,
so the default user ID and key will be the most recently
added key on your secret keyring.
Keyring file '/oeuentg/secring.pgp' does not exist. Enter public key filename: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx*
As I said, I have not looked at the problem in detail. Here is a gdb
stack trace of where it is when the hanging occurs. I think (though it
is not demonstrated here) that there is an infinite loop in lines
764,765 of random.c, which read:
764 while (keypress())
765 getkey(); /* clean up any typeahead */
It think keypress() is always returning a true value in this loop. The
whole section is rather fishy anyway, since stepping through it reveals
that pgp is generating random numbers and setting timers and stuff when
it reads the filename, which strikes me as being somewhat gratuitious.
I've always found fgets() adequate for reading strings from the standard
input if they're going to be echoed; maybe I'm just weird, but I think
that calling getstring() to read a filename as if it were a password is
overkill.
; gdb ./pgp
GDB is free software and you are welcome to distribute copies of it
under certain conditions; type "show copying" to see the conditions.
There is absolutely no warranty for GDB; type "show warranty" for details.
GDB 4.11 (sparc-sun-solaris2.1),
Copyright 1993 Free Software Foundation, Inc...
(gdb) run -sta +clearsig=on motd
Starting program: /tmp/pgp23A/src/./pgp -sta +clearsig=on motd
Cannot open configuration file /oeuentg/config.txt
Pretty Good Privacy 2.3a - Public-key encryption for the masses.
(c) 1990-1993 Philip Zimmermann, Phil's Pretty Good Software. 1 Jul 93
Date: 1993/12/12 07:09 GMT
A secret key is required to make a signature.
You specified no user ID to select your secret key,
so the default user ID and key will be the most recently
added key on your secret keyring.
Keyring file '/oeuentg/secring.pgp' does not exist. Enter public key filename: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx*
Program received signal SIGINT (2), Interrupt
0xef7a6d60 in read ()
(gdb) where
#0 0xef7a6d60 in read ()
#1 0x39b5c in getch () at system.c:272
#2 0x3669c in keypress () at random.c:576
#3 0x36f80 in getstring (strbuf=0xefffe970 'x' <repeats 59 times>, maxlen=59,
echo=1 '\001') at random.c:764
#4 0x22cc0 in getpublickey (flags=0,
keyfile=0xefffe970 'x' <repeats 59 times>, _file_position=0xefffe96c,
_pktlen=0x0, keyID=0x0, timestamp=0xeffff170 "", userid=0xeffff068 "",
n=0xefffee58, e=0xefffedb0) at keymgmt.c:766
#5 0x23170 in getsecretkey (flags=0,
keyfile=0xefffe970 'x' <repeats 59 times>, keyID=0x0,
timestamp=0xeffff170 "", hpass=0x0, hkey=0x0, userid=0xeffff068 "",
n=0xefffee58, e=0xefffedb0, d=0xefffed08, p=0xefffec60, q=0xefffebb8,
u=0xefffeb10) at keymgmt.c:903
#6 0x1b1c8 in signfile (nested=0 '\000', separate_signature=1 '\001',
mcguffin=0x60fc8 "", infile=0x670d8 "motd.$16",
outfile=0x671e0 "motd.$17", lit_mode=116 't',
literalfile=0xeffff5e0 "motd") at crypto.c:908
#7 0x15a58 in main (argc=4, argv=0xeffff784) at pgp.c:817
(gdb) up 1
#1 0x39b5c in getch () at system.c:272
272 read(ttyfd, &c, 1);
(gdb) list
267 #ifdef USE_NBIO
268 while (!kbhit()); /* kbhit() does the reading */
269 c = kbuf;
270 kbuf = -1;
271 #else
272 read(ttyfd, &c, 1);
273 #endif
274 return(c);
275 }
276
(gdb) up 2
#3 0x36f80 in getstring (strbuf=0xefffe970 'x' <repeats 59 times>, maxlen=59,
echo=1 '\001') at random.c:764
764 while (keypress())
(gdb) list
759 if (c=='\n')
760 break;
761 strbuf[i++] = c;
762 if (i>=maxlen)
763 { fprintf(stderr,"\007*\n"); /* -Enough! */
764 while (keypress())
765 getkey(); /* clean up any typeahead */
766 break;
767 }
768 }
(gdb)
Calvin Clark <ckclark@MIT.EDU>
(Key 6E9CF1, available from servers or upon request.)
- -----BEGIN PGP SIGNATURE-----
Version: 2.3a
iQCVAgUBLQrKPH1TfRQIbpzxAQE+eAP/Q2uLWhDS3mvKp8fReCeZzpvDtHKAJdEk
4BEEeVNhWaN9C1U2hEa25JSbtiMrcRj1ZVlREeYM/kz6Tez/s98rWHTfhQM4kwAy
/FV7xnNSrQsBE+vH4s45Y1yUfuKTjDG1jQm+l5d8RXH0EKpaD96kMESvPTOgE8Ve
rvLnMoJhg1o=
=1AoT
- -----END PGP SIGNATURE-----
------- End of Forwarded Message
*** .bk/keyadd.c Wed Jun 23 16:53:10 1993
--- ./keyadd.c Fri May 20 01:03:22 1994
***************
*** 29,34 ****
--- 29,35 ----
#include "fileio.h"
#include "keymgmt.h"
#include "charset.h"
+ #include "mpiio.h"
#include "language.h"
#include "pgp.h"
#include "exitpgp.h"
***************
*** 48,55 ****
static int newkeys, newsigs, newids, newrvks;
static byte mykeyID[KEYFRAGSIZE];
static int mergesigs (FILE *fkey, char *keyfile, long keypos, FILE *fring,
! char *ringfile, long *pringpos, FILE *out)
/* Merge signatures from userid in fkey (which is keyfile) at keypos with
* userid from fring (which is ringfile) at ringpos, appending result to out.
*/
--- 49,95 ----
static int newkeys, newsigs, newids, newrvks;
static byte mykeyID[KEYFRAGSIZE];
+
+ static struct sig_list {
+ struct sig_list *next;
+ long pos;
+ } *siglist;
+
+ static void
+ sig_list_add(long pos)
+ {
+ struct sig_list *p;
+ p = xmalloc(sizeof *p);
+ p->pos = pos;
+ p->next = siglist;
+ siglist = p;
+ }
+
+ static int
+ sig_list_find(long pos)
+ {
+ struct sig_list *p;
+ for (p = siglist; p; p = p->next)
+ if (p->pos == pos)
+ return 1;
+ return 0;
+ }
+
+ static void
+ sig_list_clear(void)
+ {
+ struct sig_list *p, *n;
+ for (p = siglist; p; p = n) {
+ n = p->next;
+ free(p);
+ }
+ siglist = NULL;
+ }
+
+
static int mergesigs (FILE *fkey, char *keyfile, long keypos, FILE *fring,
! char *ringfile, long *pringpos, long ringkeypos,
! long ringkeypktlen, FILE *out)
/* Merge signatures from userid in fkey (which is keyfile) at keypos with
* userid from fring (which is ringfile) at ringpos, appending result to out.
*/
***************
*** 59,66 ****
--- 99,108 ----
int status;
byte ctb;
int copying;
+ word32 rstamp, kstamp;
byte keyID[KEYFRAGSIZE];
char userid[256];
+ char sigid[256];
/* First, copy the userid packet itself, plus any comments or ctrls */
ringuseridpos = ringpos = *pringpos;
***************
*** 100,111 ****
copying = FALSE;
for ( ; ; )
{ /* Read next sig from keyfile; see if it is in ringfile;
! * set copying true/false accordingly. If copying is true
! * and it is a signature, copy it. Loop till hit
! * a new key or userid in keyfile, or EOF.
*/
keypos = ftell(fkey);
! status = readkeypacket(fkey,FALSE,&ctb,NULL,NULL,NULL,NULL,
NULL,NULL,NULL,NULL,keyID,NULL);
if (status == -3) /* unrecoverable error: bad packet length etc. */
return(status);
--- 142,155 ----
copying = FALSE;
for ( ; ; )
{ /* Read next sig from keyfile; see if it is in ringfile;
! * if it is not a signature, ignore it,
! * if it is absent from ringfile, copy it,
! * if it is present, and the timestamp is not newer, ignore it,
! * if present and newer, replace old with new.
! * Loop till hit a new key or userid in keyfile, or EOF.
*/
keypos = ftell(fkey);
! status = readkeypacket(fkey,FALSE,&ctb,(byte *)&kstamp,NULL,NULL,NULL,
NULL,NULL,NULL,NULL,keyID,NULL);
if (status == -3) /* unrecoverable error: bad packet length etc. */
return(status);
***************
*** 118,126 ****
{ long sig_pos;
int sig_len;
/* Set copying true if signature is not in the ringfile */
! copying = (getpubusersig (ringfile, ringuseridpos, keyID, &sig_pos,
! &sig_len) < 0);
! if (copying)
{ char *signator;
if ((signator = user_from_keyID(keyID)) == NULL)
fprintf(pgpout, PSTR("New signature from keyID %s on userid \"%s\"\n"),
--- 162,225 ----
{ long sig_pos;
int sig_len;
/* Set copying true if signature is not in the ringfile */
! copying = (getpubusersig (ringfile, ringuseridpos, keyID,
! (byte *)&rstamp, &sig_pos, &sig_len) < 0);
! if (!copying) {
! long save_pos = ftell(fkey);
! fseek(fkey, keypos+6, SEEK_SET);
! fread(&kstamp,1,SIZEOF_TIMESTAMP,fkey);
! convert_byteorder((byte *)&kstamp,SIZEOF_TIMESTAMP);
! if (verbose)
! fprintf(pgpout, "ring: %lx key: %lx\n", rstamp, kstamp);
! if (kstamp > rstamp) { /* Update */
! byte sig_class = 0xff;
! if (verbose)
! fprintf(pgpout, "checking new signature\n");
! CToPascal(userid);
! status = check_key_sig(fring, ringkeypos, ringkeypktlen,
! userid, fkey, keypos, ringfile, sigid,
! (byte *)&kstamp, &sig_class);
! PascalToC(userid);
! PascalToC(sigid);
! switch (status) {
! case 0: /* signature OK */
! switch (sig_class) {
! case K0_SIGNATURE_BYTE:
! case K1_SIGNATURE_BYTE:
! case K2_SIGNATURE_BYTE:
! case K3_SIGNATURE_BYTE:
! copying = 1;
! fprintf(pgpout, PSTR("Replacing signature from %s\n"),
! LOCAL_CHARSET(sigid));
! break;
! #ifdef notyet
! case KR_SIGNATURE_BYTE:
! copying = 1;
! fprintf(pgpout, PSTR("Signature revocation from %s\n"),
! LOCAL_CHARSET(sigid));
! break;
! #endif
! default:
! fprintf(pgpout, PSTR("Unknown signature class %#x from %s\n"),
! sig_class, LOCAL_CHARSET(sigid));
! }
! if (copying)
! sig_list_add(sig_pos);
! break;
! case -2:
! fprintf(pgpout, PSTR("\007*** BAD NEW SIGNATURE, class %#x from %s\n"),
! sig_class, LOCAL_CHARSET(sigid));
! break;
! default:
! /* don't replace if we can't check the new signature */
! fprintf(pgpout, PSTR("Can't check new signature from keyID %s\n"),
! keyIDstring(keyID));
! }
! fprintf(pgpout, PSTR("on userid \"%s\"\n"), LOCAL_CHARSET(userid));
! }
! fseek(fkey, save_pos, SEEK_SET);
! }
! else
{ char *signator;
if ((signator = user_from_keyID(keyID)) == NULL)
fprintf(pgpout, PSTR("New signature from keyID %s on userid \"%s\"\n"),
***************
*** 130,136 ****
fprintf(pgpout, PSTR("New signature from %s\n"), LOCAL_CHARSET(signator));
fprintf(pgpout, PSTR("on userid \"%s\"\n"), LOCAL_CHARSET(userid));
}
! ++newsigs;
if (batchmode)
show_update(keyIDstring(mykeyID));
}
--- 229,237 ----
fprintf(pgpout, PSTR("New signature from %s\n"), LOCAL_CHARSET(signator));
fprintf(pgpout, PSTR("on userid \"%s\"\n"), LOCAL_CHARSET(userid));
}
! }
! if (copying)
! { ++newsigs;
if (batchmode)
show_update(keyIDstring(mykeyID));
}
***************
*** 142,151 ****
}
}
! /* Third, for all ring sig's, copy to output */
fseek (fring, ringpos, SEEK_SET);
for ( ; ; )
{ ringpos = ftell(fring);
status = nextkeypacket (fring, &ctb);
ringpktlen = ftell(fring) - ringpos;
if (status < 0 || is_key_ctb (ctb) || ctb==CTB_USERID)
--- 243,261 ----
}
}
! /* Third, for all ring sig's which are not replaced, copy to output */
fseek (fring, ringpos, SEEK_SET);
for ( ; ; )
{ ringpos = ftell(fring);
+ if (sig_list_find(ringpos)) {
+ /* skip signature packet */
+ nextkeypacket (fring, &ctb);
+ ringpos = ftell(fring);
+ /* skip trust packet, if present */
+ if (nextkeypacket (fring, &ctb) < 0 || ctb != CTB_KEYCTRL)
+ fseek(fring, ringpos, SEEK_SET);
+ continue;
+ }
status = nextkeypacket (fring, &ctb);
ringpktlen = ftell(fring) - ringpos;
if (status < 0 || is_key_ctb (ctb) || ctb==CTB_USERID)
***************
*** 152,157 ****
--- 262,268 ----
break;
copyfilepos (fring, out, ringpktlen, ringpos);
} /* End of loop for each sig in ringfile */
+ sig_list_clear();
fseek (fring, ringpos, SEEK_SET);
*pringpos = ringpos;
return(0);
***************
*** 165,171 ****
*/
{
long ringkeypos, keykeypos, ringpos;
! int ringpktlen, keypktlen;
int status;
byte ctb;
int copying;
--- 276,282 ----
*/
{
long ringkeypos, keykeypos, ringpos;
! int ringpktlen, keypktlen, ringkeypktlen;
int status;
byte ctb;
int copying;
***************
*** 176,182 ****
ringkeypos = ringpos = *pringpos;
fseek (fring, ringpos, SEEK_SET);
(void) nextkeypacket(fring, &ctb);
! ringpktlen = ftell(fring) - ringpos;
copyfilepos (fring, out, ringpktlen, ringpos);
for ( ; ; )
{ ringpos = ftell(fring);
--- 287,293 ----
ringkeypos = ringpos = *pringpos;
fseek (fring, ringpos, SEEK_SET);
(void) nextkeypacket(fring, &ctb);
! ringkeypktlen = ringpktlen = ftell(fring) - ringpos;
copyfilepos (fring, out, ringpktlen, ringpos);
for ( ; ; )
{ ringpos = ftell(fring);
***************
*** 312,318 ****
/* don't use substring match (exact_match = TRUE) */
if (getpubuserid (keyfile, keykeypos, userid, &userid_pos,
&userid_len, TRUE) >= 0)
! { if ((status = mergesigs (fkey,keyfile,userid_pos,fring,ringfile,&ringpos,out)) < 0)
return(status);
copying = FALSE;
}
--- 423,429 ----
/* don't use substring match (exact_match = TRUE) */
if (getpubuserid (keyfile, keykeypos, userid, &userid_pos,
&userid_len, TRUE) >= 0)
! { if ((status = mergesigs (fkey,keyfile,userid_pos,fring,ringfile,&ringpos,ringkeypos,ringkeypktlen,out)) < 0)
return(status);
copying = FALSE;
}
diff -c .bk/keymgmt.c ./keymgmt.c
*** .bk/keymgmt.c Wed Jun 23 16:53:54 1993
--- ./keymgmt.c Thu May 19 00:20:47 1994
***************
*** 824,830 ****
int getpubusersig(char *keyfile, long user_position, byte *sigkeyID,
! long *sig_position, int *sig_len)
/* Start at user_position in keyfile, and scan for the signature packet
that matches sigkeyID. Return sig_position and sig_len.
Return 0 if OK, -1 on error.
--- 824,830 ----
int getpubusersig(char *keyfile, long user_position, byte *sigkeyID,
! byte *timestamp, long *sig_position, int *sig_len)
/* Start at user_position in keyfile, and scan for the signature packet
that matches sigkeyID. Return sig_position and sig_len.
Return 0 if OK, -1 on error.
***************
*** 857,862 ****
--- 857,865 ----
{ if (equal_buffers(sigkeyID,keyID0,KEYFRAGSIZE))
{ *sig_position = fpos;
*sig_len = ( int ) ( ftell(f) - fpos );
+ fseek(f, fpos+6, SEEK_SET);
+ fread(timestamp,1,SIZEOF_TIMESTAMP,f); /* read certificate timestamp */
+ convert_byteorder(timestamp,SIZEOF_TIMESTAMP); /* convert from external form */
fclose(f);
return(0); /* normal return */
}
diff -c .bk/keymgmt.h ./keymgmt.h
*** .bk/keymgmt.h Fri Jun 11 09:57:56 1993
--- ./keymgmt.h Wed May 18 18:23:46 1994
***************
*** 80,86 ****
long *userid_position, int *userid_len, boolean exact_match);
int getpubusersig(char *keyfile, long user_position, byte *sigkeyID,
! long *sig_position, int *sig_len);
void getKeyHash( byte *hash, unitptr n, unitptr e );
void printKeyHash( byteptr hash, boolean indent );
--- 80,86 ----
long *userid_position, int *userid_len, boolean exact_match);
int getpubusersig(char *keyfile, long user_position, byte *sigkeyID,
! byte *timestamp, long *sig_position, int *sig_len);
void getKeyHash( byte *hash, unitptr n, unitptr e );
void printKeyHash( byteptr hash, boolean indent );