svn commit: lorikeet r753 - in trunk/heimdal/lib: hcrypto hx509 roken

lha at samba.org lha at samba.org
Mon Jun 18 22:12:25 GMT 2007


Author: lha
Date: 2007-06-18 22:12:24 +0000 (Mon, 18 Jun 2007)
New Revision: 753

WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=lorikeet&rev=753

Log:
Merged with Heimdal svn revision 21159
Modified:
   trunk/heimdal/lib/hcrypto/pkcs12.c
   trunk/heimdal/lib/hcrypto/rand-egd.c
   trunk/heimdal/lib/hcrypto/rsa-imath.c
   trunk/heimdal/lib/hx509/ChangeLog
   trunk/heimdal/lib/hx509/revoke.c
   trunk/heimdal/lib/roken/ChangeLog
   trunk/heimdal/lib/roken/roken_gethostby.c


Changeset:
Modified: trunk/heimdal/lib/hcrypto/pkcs12.c
===================================================================
--- trunk/heimdal/lib/hcrypto/pkcs12.c	2007-06-18 22:00:20 UTC (rev 752)
+++ trunk/heimdal/lib/hcrypto/pkcs12.c	2007-06-18 22:12:24 UTC (rev 753)
@@ -35,7 +35,7 @@
 #include <config.h>
 #endif
 
-RCSID("$Id: pkcs12.c 20661 2007-05-10 21:57:58Z lha $");
+RCSID("$Id: pkcs12.c 21155 2007-06-18 21:59:44Z lha $");
 
 #include <stdio.h>
 #include <stdlib.h>
@@ -93,8 +93,11 @@
     while (1) {
 	BIGNUM *bnB, *bnOne;
 
-	if (!EVP_DigestInit_ex(&ctx, md, NULL))
+	if (!EVP_DigestInit_ex(&ctx, md, NULL)) {
+	    free(I);
+	    free(v);
 	    return 0;
+	}
 	for (i = 0; i < vlen; i++)
 	    EVP_DigestUpdate(&ctx, &idc, 1);
 	EVP_DigestUpdate(&ctx, I, size_I);

Modified: trunk/heimdal/lib/hcrypto/rand-egd.c
===================================================================
--- trunk/heimdal/lib/hcrypto/rand-egd.c	2007-06-18 22:00:20 UTC (rev 752)
+++ trunk/heimdal/lib/hcrypto/rand-egd.c	2007-06-18 22:12:24 UTC (rev 753)
@@ -35,7 +35,7 @@
 #include <config.h>
 #endif
 
-RCSID("$Id: rand-egd.c 20093 2007-01-31 12:44:28Z lha $");
+RCSID("$Id: rand-egd.c 21156 2007-06-18 22:00:59Z lha $");
 
 #include <sys/types.h>
 #ifdef HAVE_SYS_UN_H
@@ -255,7 +255,7 @@
 
     RAND_seed(data, size);
 
-    memset(data, 0, sizeof(data));
+    memset(data, 0, size);
     free(data);
 
     return 1;

Modified: trunk/heimdal/lib/hcrypto/rsa-imath.c
===================================================================
--- trunk/heimdal/lib/hcrypto/rsa-imath.c	2007-06-18 22:00:20 UTC (rev 752)
+++ trunk/heimdal/lib/hcrypto/rsa-imath.c	2007-06-18 22:12:24 UTC (rev 753)
@@ -35,7 +35,7 @@
 #include <config.h>
 #endif
 
-RCSID("$Id: rsa-imath.c 19750 2007-01-06 13:45:25Z lha $");
+RCSID("$Id: rsa-imath.c 21154 2007-06-18 21:58:12Z lha $");
 
 #include <stdio.h>
 #include <stdlib.h>
@@ -180,7 +180,6 @@
     }
 
     padlen = size - flen - 3;
-    assert(padlen >= 8);
 
     *p++ = 2;
     if (RAND_bytes(p, padlen) != 1) {

Modified: trunk/heimdal/lib/hx509/ChangeLog
===================================================================
--- trunk/heimdal/lib/hx509/ChangeLog	2007-06-18 22:00:20 UTC (rev 752)
+++ trunk/heimdal/lib/hx509/ChangeLog	2007-06-18 22:12:24 UTC (rev 753)
@@ -1,5 +1,11 @@
 2007-06-18  Love Hörnquist Åstrand  <lha at it.su.se>
 
+	* revoke.c: Avoid stomping on NULL.
+
+	* revoke.c: Avoid reusing i.
+
+	* cert.c: Provide __attribute__ for _hx509_abort.
+
 	* ks_file.c: Fail if not finding iv.
 
 	* keyset.c: Avoid useing freed memory.

Modified: trunk/heimdal/lib/hx509/revoke.c
===================================================================
--- trunk/heimdal/lib/hx509/revoke.c	2007-06-18 22:00:20 UTC (rev 752)
+++ trunk/heimdal/lib/hx509/revoke.c	2007-06-18 22:12:24 UTC (rev 753)
@@ -32,7 +32,7 @@
  */
 
 #include "hx_locl.h"
-RCSID("$Id: revoke.c 20871 2007-06-03 21:22:51Z lha $");
+RCSID("$Id: revoke.c 21153 2007-06-18 21:55:46Z lha $");
 
 struct revoke_crl {
     char *path;
@@ -572,10 +572,10 @@
 		continue;
 	}
 
-	for (i = 0; i < ocsp->ocsp.tbsResponseData.responses.len; i++) {
+	for (j = 0; j < ocsp->ocsp.tbsResponseData.responses.len; j++) {
 	    heim_octet_string os;
 
-	    ret = der_heim_integer_cmp(&ocsp->ocsp.tbsResponseData.responses.val[i].certID.serialNumber,
+	    ret = der_heim_integer_cmp(&ocsp->ocsp.tbsResponseData.responses.val[j].certID.serialNumber,
 				   &c->tbsCertificate.serialNumber);
 	    if (ret != 0)
 		continue;
@@ -594,13 +594,13 @@
 
 	    ret = _hx509_verify_signature(context,
 					  NULL,
-					  &ocsp->ocsp.tbsResponseData.responses.val[i].certID.hashAlgorithm,
+					  &ocsp->ocsp.tbsResponseData.responses.val[j].certID.hashAlgorithm,
 					  &os,
-					  &ocsp->ocsp.tbsResponseData.responses.val[i].certID.issuerKeyHash);
+					  &ocsp->ocsp.tbsResponseData.responses.val[j].certID.issuerKeyHash);
 	    if (ret != 0)
 		continue;
 
-	    switch (ocsp->ocsp.tbsResponseData.responses.val[i].certStatus.element) {
+	    switch (ocsp->ocsp.tbsResponseData.responses.val[j].certStatus.element) {
 	    case choice_OCSPCertStatus_good:
 		break;
 	    case choice_OCSPCertStatus_revoked:
@@ -609,13 +609,13 @@
 	    }
 
 	    /* don't allow the update to be in the future */
-	    if (ocsp->ocsp.tbsResponseData.responses.val[i].thisUpdate > 
+	    if (ocsp->ocsp.tbsResponseData.responses.val[j].thisUpdate > 
 		now + context->ocsp_time_diff)
 		continue;
 
 	    /* don't allow the next updte to be in the past */
-	    if (ocsp->ocsp.tbsResponseData.responses.val[i].nextUpdate) {
-		if (*ocsp->ocsp.tbsResponseData.responses.val[i].nextUpdate < now)
+	    if (ocsp->ocsp.tbsResponseData.responses.val[j].nextUpdate) {
+		if (*ocsp->ocsp.tbsResponseData.responses.val[j].nextUpdate < now)
 		    continue;
 	    } else
 		/* Should force a refetch, but can we ? */;
@@ -1077,6 +1077,7 @@
     if (ret) {
 	free(*crl);
 	*crl = NULL;
+	return ret;
     }
     (*crl)->expire = 0;
     return ret;

Modified: trunk/heimdal/lib/roken/ChangeLog
===================================================================
--- trunk/heimdal/lib/roken/ChangeLog	2007-06-18 22:00:20 UTC (rev 752)
+++ trunk/heimdal/lib/roken/ChangeLog	2007-06-18 22:12:24 UTC (rev 753)
@@ -1,3 +1,7 @@
+2007-06-19  Love Hörnquist Åstrand  <lha at it.su.se>
+
+	* roken_gethostby.c: set proxy_port to 0 to pacify BEAM.
+
 2007-06-07  Love Hörnquist Åstrand  <lha at it.su.se>
 
 	* use "roken.h" consitantly

Modified: trunk/heimdal/lib/roken/roken_gethostby.c
===================================================================
--- trunk/heimdal/lib/roken/roken_gethostby.c	2007-06-18 22:00:20 UTC (rev 752)
+++ trunk/heimdal/lib/roken/roken_gethostby.c	2007-06-18 22:12:24 UTC (rev 753)
@@ -33,7 +33,7 @@
 
 #ifdef HAVE_CONFIG_H
 #include <config.h>
-RCSID("$Id: roken_gethostby.c 21005 2007-06-08 01:54:35Z lha $");
+RCSID("$Id: roken_gethostby.c 21157 2007-06-18 22:03:13Z lha $");
 #endif
 
 #include <roken.h>
@@ -111,7 +111,7 @@
 roken_gethostby_setup(const char *proxy_spec, const char *dns_spec)
 {
     char *proxy_host = NULL;
-    int proxy_port;
+    int proxy_port = 0;
     char *dns_host, *dns_path;
     int dns_port;
     



More information about the samba-cvs mailing list