Skip to content

feat: added custom client PEM cert support#15

Merged
petruki merged 1 commit into
masterfrom
staging
Jun 20, 2026
Merged

feat: added custom client PEM cert support#15
petruki merged 1 commit into
masterfrom
staging

Conversation

@petruki

@petruki petruki commented Jun 20, 2026

Copy link
Copy Markdown
Member

This pull request updates the way client certificates are handled for secure remote API connections. The main change is to support loading a PEM bundle containing both the client certificate and private key, with improved error handling and new tests to ensure correct behavior. Documentation has also been updated to clarify the new expectations for certificate handling.

Certificate handling improvements:

  • The CertPath option now expects a PEM bundle that includes both the client certificate and private key, and the code loads this bundle using tls.LoadX509KeyPair. Errors encountered during loading are now surfaced to the caller. (remote.go, [1] [2]
  • The httpClient() method now returns an error if the certificate bundle cannot be loaded, and this error is propagated through remote requests. (remote.go, remote.goL290-R343)

Testing enhancements:

  • Added comprehensive tests in remote_transport_test.go to verify that the client correctly loads the certificate bundle, handles errors when the bundle is missing or invalid, and caches the HTTP client instance.

Documentation updates:

  • Updated the documentation in README.md to clarify that CertPath should point to a PEM bundle containing both the client certificate and private key, and revised the feature description to reflect this. [1] [2]

@petruki petruki self-assigned this Jun 20, 2026
@petruki petruki added enhancement New feature or request ai-generated Indicates that AI tools were used to generate this change labels Jun 20, 2026
@sonarqubecloud

Copy link
Copy Markdown

@petruki petruki merged commit 45ef29e into master Jun 20, 2026
7 checks passed
@petruki petruki deleted the staging branch June 20, 2026 22:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ai-generated Indicates that AI tools were used to generate this change enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant