Skip to content

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

Merged
dragon3 merged 1 commit into
mainfrom
drop-direct-pkcs8-dep
Jun 3, 2026
Merged

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

Conversation

@dragon3

@dragon3 dragon3 commented May 9, 2026

Copy link
Copy Markdown
Contributor

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.

Test plan

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

The rsa 0.9 crate is pinned to pkcs8 0.10 internally, so a direct pkcs8
dependency invites renovate to keep proposing pkcs8 0.11 bumps that
break the build. Source EncodePrivateKey/EncodePublicKey/LineEnding
from rsa::pkcs8 instead, and enable rsa's pem feature so the PEM
encoding methods stay available.
@dragon3 dragon3 self-assigned this May 9, 2026
@dragon3
dragon3 marked this pull request as ready for review May 9, 2026 03:02
@dragon3
dragon3 requested a review from a team as a code owner May 9, 2026 03:02

@k1LoW k1LoW left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

LGTM!

@dragon3

dragon3 commented Jun 3, 2026

Copy link
Copy Markdown
Contributor Author

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

@dragon3
dragon3 merged commit 63c6d33 into main Jun 3, 2026
4 checks passed
@dragon3
dragon3 deleted the drop-direct-pkcs8-dep branch June 3, 2026 04:48
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