Check-in [ecd7178afb]
Overview
SHA1:ecd7178afb50372af790fcb5ef7b379884a3ecb7
Date: 2016-02-15 08:31:06
User: rkeene
Comment:Updated to print an error in debug mode if we run across compressed certificates without zlib support available
Timelines: family | ancestors | descendants | both | trunk
Downloads: Tarball | ZIP archive
Other Links: files | file ages | folders | manifest
Tags And Properties
Context
2016-02-15
08:36
[3b8c1a6846] Updated to create better Debian package (untested) (user: rkeene, tags: trunk)
08:31
[ecd7178afb] Updated to print an error in debug mode if we run across compressed certificates without zlib support available (user: rkeene, tags: trunk)
08:30
[925edeaa39] ChromeOS: Minor cleanup in the test case (user: rkeene, tags: trunk)
Changes

Modified cackey.c from [788bc7d9fe] to [6bf4e65a64].

  2596   2596   				curr_id->certificate = NULL;
  2597   2597   
  2598   2598   				outidx--;
  2599   2599   
  2600   2600   				continue;
  2601   2601   			}
  2602   2602   
  2603         -#ifdef HAVE_LIBZ
  2604   2603   			if (curr_id->certificate_len > 4) {
  2605   2604   				if (memcmp(curr_id->certificate, "\x1f\x8b\x08\x00", 4) == 0) {
         2605  +#ifdef HAVE_LIBZ
  2606   2606   					tmpbuflen = curr_id->certificate_len * 2;
  2607   2607   					tmpbuf = malloc(tmpbuflen);
  2608   2608   
  2609   2609   					CACKEY_DEBUG_PRINTBUF("Attempting to decompress:", curr_id->certificate, curr_id->certificate_len);
  2610   2610   
  2611   2611   					gzip_stream.zalloc = NULL;
  2612   2612   					gzip_stream.zfree = NULL;
................................................................................
  2651   2651   						curr_id->certificate = tmpbuf;
  2652   2652   						curr_id->certificate_len = tmpbuflen;
  2653   2653   					} else {
  2654   2654   						CACKEY_DEBUG_PRINTF("Decompressing failed! uncompress() returned %i", uncompress_ret);
  2655   2655   
  2656   2656   						free(tmpbuf);
  2657   2657   					}
         2658  +#else
         2659  +					CACKEY_DEBUG_PRINTF("Error.  We got a compressed certificate but we do not have zlib.  Hoping for the best.");
         2660  +#endif
  2658   2661   				}
  2659   2662   			}
  2660         -#endif
  2661   2663   		}
  2662   2664   	} else {
  2663   2665   		/* Read all the applets from the CCC's TLV */
  2664   2666   		ccc_tlv = cackey_read_tlv(slot);
  2665   2667   
  2666   2668   		/* Look for CARDURLs that coorespond to PKI applets */
  2667   2669   		for (ccc_curr = ccc_tlv; ccc_curr; ccc_curr = ccc_curr->_next) {