From: Remi Gacogne Date: Mon, 18 May 2026 10:57:25 +0000 (+0200) Subject: libssl: Fix the position of OCSP files on errors X-Git-Tag: auth-5.1.0~51^2~1 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=05759b9bada492ff25fbffbd78733700fcdbcd03;p=thirdparty%2Fpdns.git libssl: Fix the position of OCSP files on errors Signed-off-by: Remi Gacogne --- diff --git a/pdns/libssl.cc b/pdns/libssl.cc index f8c6e2e636..f9b70a40ab 100644 --- a/pdns/libssl.cc +++ b/pdns/libssl.cc @@ -452,29 +452,29 @@ static std::map libssl_load_ocsp_responses(const std::vector buffer{}; + file.read(buffer.data(), buffer.size()); if (file.bad()) { file.close(); warnings.push_back("Unable to load OCSP response from " + filename); continue; } - content.append(buffer, file.gcount()); + content.append(buffer.data(), file.gcount()); } file.close(); try { libssl_validate_ocsp_response(content); - ocspResponses.insert({keyTypes.at(count), std::move(content)}); + ocspResponses.insert({keyTypes.at(idx), std::move(content)}); } catch (const std::exception& e) { warnings.push_back("Error checking the validity of OCSP response from '" + filename + "': " + e.what()); continue; } - ++count; } return ocspResponses;