head	1.2;
access;
symbols
	RELEASE_6_0_0:1.1
	RELEASE_5_4_0:1.1
	RELEASE_4_11_0:1.1
	RELEASE_5_3_0:1.1
	RELEASE_4_10_0:1.1
	RELEASE_5_2_1:1.1
	RELEASE_5_2_0:1.1
	RELEASE_4_9_0:1.1
	RELEASE_5_1_0:1.1
	RELEASE_4_8_0:1.1
	RELEASE_5_0_0:1.1
	RELEASE_4_7_0:1.1
	RELEASE_4_6_2:1.1
	RELEASE_4_6_1:1.1
	RELEASE_4_6_0:1.1;
locks; strict;
comment	@# @;


1.2
date	2005.09.09.14.00.10;	author lawrance;	state dead;
branches;
next	1.1;

1.1
date	2002.04.19.22.23.32;	author kris;	state Exp;
branches;
next	;


desc
@@


1.2
log
@Update to 0.9.6
- Add rcng startup
- No longer touch pksd.conf, only pksd.conf.sample
- Ensure the port builds against db2 from ports by deleting the included
  version.  Add post-patch bits to help this happen.
- Submitter takes maintainership

PR:		ports/85802
Submitted by:	Graham Todd <gtodd@@bellanet.org> (new maintainer)
Approved by:	Jason Harris <jharris@@widomaker.com> (maintainer)
@
text
@===================================================================
RCS file: kd_index.c,v
retrieving revision 1.16
diff -u -r1.16 kd_index.c
--- kd_index.c	1999/09/23 03:19:36	1.16
+++ kd_index.c	2001/09/02 04:00:23
@@@@ -122,6 +122,7 @@@@
 
 int keys_elem_genindex(void *e, void *c)
 {
+
    keys_elem *ke = (keys_elem *) e;
    keg_state *s = (keg_state *) c;
    gi_state gis;
@@@@ -131,6 +132,8 @@@@
    SHS_CTX sha;
    unsigned char hash[20];
    int i;
+   unsigned int pos = 0;
+
 
    /* pgp does gmtime, so we do, too */
    c_tm = gmtime(&(ke->create_time));
@@@@ -163,24 +166,33 @@@@
          MD5Final(hash, &md5ctx);
       }
 
-      for (i=0; i<8; i++)
-         sprintf(buf+i*3, "%02X ", hash[i]);
-      buf[24] = ' ';
-      for (i=8; i<16; i++)
-	 sprintf(buf+1+i*3, "%02X ", hash[i]);
+      pos = 0;
+      // print longer SHA-1 hashes differently
       if (ke->keytype == 16 || ke->keytype == 17) {
-         buf[49] = ' ';
-         for (i=16; i<20; i++)
-	    sprintf(buf+2+i*3, "%02X ", hash[i]);
-         buf[62] = '\n';
-      } else {
-         buf[48] = '\n';
-      }
+	for (i = 0; i < 20; i += 2) {
+	  sprintf (&buf[pos], "%02X%02X ", hash[i], hash[i+1]);
+	  pos += 5; // just added n chars...
+	  // add another space halfway through...
+	  if (i == 8) {
+	    buf[pos] = ' ';
+	    pos++;
+	  }
+	} // for i
+	pos--; // remove last space
+	buf[pos] = '\n';
+      } else { // if keytype != 16 or 17
+	for (i=0; i<8; i++)
+	  sprintf(buf+i*3, "%02X ", hash[i]);
+	buf[24] = ' ';
+	for (i=8; i<16; i++)
+	  sprintf(buf+1+i*3, "%02X ", hash[i]);
+	buf[48] = '\n';
+      } // if else on keytype
 
-      if (!xbuffer_append_str(s->xb, "          Key fingerprint =  "))
+      if (!xbuffer_append_str(s->xb, "     Key fingerprint = "))
 	 return(0);
       if (ke->keytype == 16 || ke->keytype == 17) {
-         if (!xbuffer_append(s->xb, (unsigned char *) buf, 63))
+         if (!xbuffer_append(s->xb, (unsigned char *) buf, 51))
 	    return(0);
       } else {
          if (!xbuffer_append(s->xb, (unsigned char *) buf, 49))
@


1.1
log
@Patches from maintainer:

* HKP (WWW) key submissions disabled by default, enabled via
  configuration file
* nicer formatting of long (SHA-1) fingerprints
* pksdctl usage() shows available commands/arguments
* manual page fixes

Bump PORTREVISION.

PR:		ports/34970
Submitted by:	Jason Harris <jharris@@widomaker.com>
@
text
@@

