Problem
An OCSP responder can send headers or part of the body, then stop responding. After 30 seconds, response.buffer() rejects, but the underlying request is not aborted and its socket can stay open.
SignedDataVerifier.checkOCSPStatus uses node-fetch's timeout: 30000. That option aborts a request waiting for headers, but does not abort the request when reading the body times out. The body read also sits outside the network-error handler, so the public verification methods return VERIFICATION_FAILURE instead of RETRYABLE_VERIFICATION_FAILURE.
This affects version 3.1.0 and main at bb0c0f874494321ea2d005329c3dc2188e893d41.
Expected behavior
Apply one 30-second deadline to the request and the complete response body. When it expires, abort the request, close the connection and return RETRYABLE_VERIFICATION_FAILURE.
Non-timeout response-body and OCSP validation errors should keep their current classification.
Related work
#345 introduced the OCSP timeout and retryable network-error status. #424 and #425 concern the App Store Server API client; they do not cover the OCSP request in SignedDataVerifier.
Problem
An OCSP responder can send headers or part of the body, then stop responding. After 30 seconds,
response.buffer()rejects, but the underlying request is not aborted and its socket can stay open.SignedDataVerifier.checkOCSPStatususes node-fetch'stimeout: 30000. That option aborts a request waiting for headers, but does not abort the request when reading the body times out. The body read also sits outside the network-error handler, so the public verification methods returnVERIFICATION_FAILUREinstead ofRETRYABLE_VERIFICATION_FAILURE.This affects version 3.1.0 and
mainatbb0c0f874494321ea2d005329c3dc2188e893d41.Expected behavior
Apply one 30-second deadline to the request and the complete response body. When it expires, abort the request, close the connection and return
RETRYABLE_VERIFICATION_FAILURE.Non-timeout response-body and OCSP validation errors should keep their current classification.
Related work
#345 introduced the OCSP timeout and retryable network-error status. #424 and #425 concern the App Store Server API client; they do not cover the OCSP request in
SignedDataVerifier.