Repository navigation
fix: enable TLS certificate verification for SDK requests - #42
Merged
Merged
Conversation
makeRequst() and CurlHttpClient disabled peer and host verification, so an on-path attacker with any certificate could read the api_key from the request URL. Turn both checks on, surface the curl error on connection failures, and call the telematics vendors endpoint over HTTPS. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
h2rd
force-pushed
the
issue/tls-verification
branch
from
October 12, 2026 17:53
5a6b076 to
f163532
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
api_keyfrom the request URL.Technical details
Route4Me::makeRequst():CURLOPT_SSL_VERIFYPEER => trueandCURLOPT_SSL_VERIFYHOST => 2. Both werefalsebefore. These match curl's defaults, so systems with a working CA bundle see no change.CurlHttpClient::init(): the same two options. It setCURLOPT_SSL_VERIFYPEERto0before.makeRequst(): when curl fails with no response,ApiErrornow carriescurl_error(). It was an empty message before, so a rejected certificate shows its reason, for example "self-signed certificate".Endpoint::TELEMATICS_VENDORS:http://changed tohttps://. The host currently answers with a 301, whichCURLOPT_FOLLOWLOCATIONfollows.ApiErrorinstead of an unverified connection. They need to setcurl.cainfoinphp.ini.🤖 Generated with Claude Code