Diff

Differences From Artifact [486977c92e]:

To Artifact [7fc12e8cff]:


  2615   2615   					gzip_stream.next_in  = curr_id->certificate;
  2616   2616   					gzip_stream.avail_in = curr_id->certificate_len;
  2617   2617   					gzip_stream.next_out = tmpbuf;
  2618   2618   					gzip_stream.avail_out = tmpbuflen;
  2619   2619   
  2620   2620   					uncompress_ret = inflateInit(&gzip_stream);
  2621   2621   					if (uncompress_ret == Z_OK) {
  2622         -						uncompress_ret = inflateReset2(&gzip_stream, 31);
         2622  +						/* Try again as a gzip buffer */
         2623  +						uncompress_ret = inflateEnd(&gzip_stream);
         2624  +						if (uncompress_ret == Z_OK) {
         2625  +							gzip_stream.zalloc = NULL;
         2626  +							gzip_stream.zfree = NULL;
         2627  +							gzip_stream.opaque = NULL;
         2628  +
         2629  +							gzip_stream.next_in  = curr_id->certificate;
         2630  +							gzip_stream.avail_in = curr_id->certificate_len;
         2631  +							gzip_stream.next_out = tmpbuf;
         2632  +							gzip_stream.avail_out = tmpbuflen;
         2633  +							uncompress_ret = inflateInit2(&gzip_stream, 31);
         2634  +						}
  2623   2635   					}
  2624   2636   					if (uncompress_ret == Z_OK) {
  2625   2637   						uncompress_ret = inflate(&gzip_stream, 0);
  2626   2638   					}
  2627   2639   					if (uncompress_ret == Z_STREAM_END) {
  2628   2640   						uncompress_ret = inflateEnd(&gzip_stream);
  2629   2641   					} else {