Skip to content

refactor(deps): drop direct pkcs8 dep, use rsa re-exports#9

Merged
dragon3 merged 1 commit into
mainfrom
refactor/drop-pkcs8-dep
May 22, 2026
Merged

refactor(deps): drop direct pkcs8 dep, use rsa re-exports#9
dragon3 merged 1 commit into
mainfrom
refactor/drop-pkcs8-dep

Conversation

@dragon3
Copy link
Copy Markdown
Contributor

@dragon3 dragon3 commented May 9, 2026

Summary

  • Drop the direct pkcs8 dependency and import EncodePrivateKey / EncodePublicKey / LineEnding from rsa::pkcs8 instead.
  • Enable the pem feature on rsa so to_public_key_pem / to_pkcs8_der stay available.

Why

The rsa = "0.9" crate is pinned to pkcs8 0.10 internally. Carrying our own direct pkcs8 dep means renovate keeps trying to bump it to 0.11 (see #8), but the new traits are incompatible with RsaPrivateKey / RsaPublicKey until rsa itself moves to pkcs8 0.11. Sourcing the traits from rsa::pkcs8 removes the foot-gun — version drift can only happen when we bump rsa.

Closes #8.

Mirrors tailor-platform/alloydb-connector-rs#9.

Test plan

  • cargo check
  • cargo clippy --all-targets -- -D warnings
  • cargo test --lib (26 passed)

@dragon3 dragon3 self-assigned this May 9, 2026
The rsa = "0.9" crate is pinned to pkcs8 0.10 internally. Carrying our
own direct pkcs8 dep means renovate keeps trying to bump it to 0.11,
but the new traits are incompatible with RsaPrivateKey / RsaPublicKey
until rsa itself moves to pkcs8 0.11. Sourcing the traits from
rsa::pkcs8 removes the foot-gun -- version drift can only happen when
we bump rsa.
@dragon3 dragon3 force-pushed the refactor/drop-pkcs8-dep branch from 1e053ed to 0b5308a Compare May 9, 2026 03:06
@dragon3 dragon3 marked this pull request as ready for review May 9, 2026 03:08
@dragon3 dragon3 requested a review from a team as a code owner May 9, 2026 03:08
Copy link
Copy Markdown

@k1LoW k1LoW left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@dragon3
Copy link
Copy Markdown
Contributor Author

dragon3 commented May 22, 2026

Thank you for reviewing 🙇‍♂️ I'm going to merge it 💪

@dragon3 dragon3 merged commit e4c3d27 into main May 22, 2026
4 checks passed
@dragon3 dragon3 deleted the refactor/drop-pkcs8-dep branch May 22, 2026 09:05
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