Skip to content

fix: enforce explicit SSL verification in embedding API requests (closes #80)#158

Merged
s2x merged 1 commit into
mainfrom
feat/issue-80-ssl-verify
Jul 7, 2026
Merged

fix: enforce explicit SSL verification in embedding API requests (closes #80)#158
s2x merged 1 commit into
mainfrom
feat/issue-80-ssl-verify

Conversation

@s2x

@s2x s2x commented Jul 7, 2026

Copy link
Copy Markdown
Contributor

Description

Closes #80

Changes

  • src/embeddings/EmbeddingInterfaces.php: Replaced 5 individual curl_setopt() calls with a single curl_setopt_array() call that includes CURLOPT_SSL_VERIFYPEER => true and CURLOPT_SSL_VERIFYHOST => 2. Proxy configuration remains a separate curl_setopt() call (unchanged).

Testing

  • php tests/test_embedding_ssl_verify.php — PASS
  • php run-tests.php tests/test_embedding_ssl_verify.phpt — PASS
  • All existing tests unaffected (no FFI changes)

Code Review

  • Passed subagent code review
  • All review comments addressed (fixed SKIPIF, removed dead code, fixed expected output format)

 #80)

Add CURLOPT_SSL_VERIFYPEER and CURLOPT_SSL_VERIFYHOST to the
curl_setopt_array() call in ApiEmbeddingFunction::post(), ensuring
SSL verification is always explicit regardless of global PHP curl
settings (e.g. curl.cainfo="").

Changes:
- src/embeddings/EmbeddingInterfaces.php: replaced 5 individual
  curl_setopt() calls with curl_setopt_array() including SSL options
- tests/test_embedding_ssl_verify.phpt: static analysis test for
  SSL constant presence and correct values
- tests/test_embedding_ssl_verify.php: legacy test with detailed
  checks (post() scope, ordering, proxy separation)
@s2x s2x self-assigned this Jul 7, 2026
@s2x
s2x merged commit 5083f97 into main Jul 7, 2026
3 checks passed
@s2x
s2x deleted the feat/issue-80-ssl-verify branch July 7, 2026 07:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

SEC-012: No Explicit SSL Verification in Embedding API Requests

1 participant