@@ -2598,13 +2598,13 @@ outidx--; continue; } -#ifdef HAVE_LIBZ if (curr_id->certificate_len > 4) { if (memcmp(curr_id->certificate, "\x1f\x8b\x08\x00", 4) == 0) { +#ifdef HAVE_LIBZ tmpbuflen = curr_id->certificate_len * 2; tmpbuf = malloc(tmpbuflen); CACKEY_DEBUG_PRINTBUF("Attempting to decompress:", curr_id->certificate, curr_id->certificate_len); @@ -2653,13 +2653,15 @@ } else { CACKEY_DEBUG_PRINTF("Decompressing failed! uncompress() returned %i", uncompress_ret); free(tmpbuf); } - } - } +#else + CACKEY_DEBUG_PRINTF("Error. We got a compressed certificate but we do not have zlib. Hoping for the best."); #endif + } + } } } else { /* Read all the applets from the CCC's TLV */ ccc_tlv = cackey_read_tlv(slot);