Reviewed-by: Dmitry Belyavskiy <beldmit@gmail.com>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/25541)
}
switch (rctx->state) {
+ case OHS_ERROR:
+ default:
+ return 0;
+
case OHS_ADD_HEADERS:
/* Last operation was adding headers: need a final \r\n */
if (BIO_write(rctx->mem, "\r\n", 2) != 2) {
rctx->state = OHS_ERROR;
return 0;
- case OHS_ERROR:
- return 0;
-
/* State machine could be broken up at this point and bulky code sections factorized out. */
case OHS_FIRSTLINE:
/* Fall thru */
case OHS_ASN1_CONTENT:
- default:
n = BIO_get_mem_data(rctx->mem, NULL);
if (n < 0 || (size_t)n < rctx->resp_len)
goto next_io;