Skip to content

Conversation

@wenjing
Copy link
Contributor

@wenjing wenjing commented Dec 19, 2025

Summary

  • Migrate from rustls-pemfile to rustls-pki-types for PEM parsing
  • Remove rustls-pemfile from workspace and tsp_sdk dependencies
  • Add TLSCertificate error variant for certificate parsing errors

Problem

The rustls-pemfile crate is unmaintained (RUSTSEC-2025-0134), causing cargo-deny CI failures.

Solution

The functionality has been incorporated into rustls-pki-types since v1.9.0 via the PemObject trait. This PR migrates to use that API directly.

The project already depends on rustls-pki-types = "1.12", so this is a straightforward migration with no new dependencies.

Impact

  • TLS transport: load_certificate() function used for TLS server setup
  • Test code: Test CA certificate loading in create_tls_config()

Test plan

  • cargo build -p tsp_sdk succeeds
  • cargo test -p tsp_sdk - all 55 tests pass including test_tls_transport
  • CI cargo-deny check should pass

🤖 Generated with Claude Code

Migrate from rustls-pemfile to rustls-pki-types for PEM parsing.
The rustls-pemfile crate is unmaintained (RUSTSEC-2025-0134) and its
functionality has been incorporated into rustls-pki-types since v1.9.0.

Changes:
- Use PemObject trait from rustls-pki-types for certificate/key loading
- Remove rustls-pemfile from workspace and tsp_sdk dependencies
- Add TLSCertificate error variant for certificate parsing errors

Signed-off-by: Wenjing Chu <[email protected]>

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <[email protected]>
@wenjing wenjing merged commit ef6c83d into main Dec 19, 2025
12 checks passed
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.

2 participants