* Otherwise, we must rebuild the certificate's certid in order to
* look for the current OCSP response in the tree. */
if (from_transaction && ckchs->ckch->ocsp_response) {
- ssl_ocsp_response_print(ckchs->ckch->ocsp_response, out);
+ if (ssl_ocsp_response_print(ckchs->ckch->ocsp_response, out))
+ goto end_no_putchk;
}
else {
unsigned char key[OCSP_MAX_CERTID_ASN1_LENGTH] = {};
if (ckch_store_build_certid(ckchs, (unsigned char*)key, &key_length) < 0)
goto end_no_putchk;
- ssl_get_ocspresponse_detail(key, out);
+ if (ssl_get_ocspresponse_detail(key, out))
+ goto end_no_putchk;
}
if (ci_putchk(si_ic(si), out) == -1) {
int write = -1;
OCSP_RESPONSE *resp;
const unsigned char *p;
+ int retval = -1;
if (!ocsp_response)
return -1;
ist_double_lf = istist(ist_block, double_lf);
}
- b_istput(out, ist_block);
+ retval = (b_istput(out, ist_block) <= 0);
}
if (bio)
BIO_free(bio);
- return 0;
+ return retval;
}
/*
if (trash == NULL)
return 1;
- ssl_ocsp_response_print(&ocsp->response, trash);
+ if (ssl_ocsp_response_print(&ocsp->response, trash)) {
+ free_trash_chunk(trash);
+ return 1;
+ }
if (ci_putchk(si_ic(si), trash) == -1) {
si_rx_room_blk(si);