Skip to content

feat(xmldsig): expose signing public key info - #85

Merged
polaz merged 2 commits into
mainfrom
feat/#84-signing-key-info
Jul 13, 2026
Merged

polaz merged 2 commits into
mainfrom
feat/#84-signing-key-info

Conversation

@polaz

@polaz polaz commented Jul 12, 2026

Copy link
Copy Markdown
Member

Summary

  • Add structured SigningPublicKeyInfo for RSA and ECDSA signing keys.
  • Wire X.509 KeyInfo output through the structured public-key API instead of raw SPKI-only extraction.
  • Add regression coverage for RSA, P-256, P-384, unsupported algorithms, KeyInfo public-key extraction failures, and existing signing round-trips.
  • Harden release automation after dependency PR base updates by disabling release-on-every-push and making Dependabot rebase behavior explicit.

Release Automation Note

The release PR got stale after a dependency PR was updated by merging main into the Dependabot branch. That created a synthetic merge commit in the dependency PR branch; release-plz updated the open release PR metadata, but left a release commit/body that still showed the previous changelog section. This PR reduces that failure mode by:

  • Running release-plz release only after the release PR is merged, not on every push to main.
  • Requiring meaningful commit types before release-plz opens or updates a release PR.
  • Making Dependabot's rebase strategy explicit so dependency branches are expected to stay linear.

Validation

  • cargo fmt -- --check
  • cargo check --all-features
  • cargo clippy --all-targets --all-features -- -D warnings
  • cargo nextest run --all-features (540 passed)
  • cargo test --doc --all-features (3 passed)

Closes #84

- Add structured signing public-key metadata for RSA and ECDSA signing keys
- Wire X509 KeyInfo output through the structured public-key API
- Cover RSA, P-256, P-384, unsupported algorithms, and KeyInfo extraction failures
- Harden release-plz/dependabot behavior after dependency PR base updates

Closes #84
@coderabbitai

coderabbitai Bot commented Jul 12, 2026 •

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: 9139bdc6-942e-434b-b72f-98e3214a942a

📥 Commits

Reviewing files that changed from the base of the PR and between c6cff7d and 2a076f7.

📒 Files selected for processing (1)
  • .release-plz.toml

📝 Walkthrough

Summary by CodeRabbit

  • New Features
    • Added structured public-key information for RSA and ECDSA signing keys (SPKI DER plus algorithm-specific details).
    • Updated certificate public-key validation to use the signing key’s structured public-key info.
  • Bug Fixes
    • Improved error handling for unsupported algorithms and surfaced clear failures when public-key info encoding is not possible.
  • Chores
    • Updated automated dependency update behavior to rebase automatically.
    • Refined release detection rules and disabled always-on automated releases.
  • Tests
    • Added unit tests covering RSA/ECDSA key metadata and certificate key-info serialization behavior.

Walkthrough

The signing-key abstraction now returns structured RSA and EC public-key metadata. X.509 KeyInfo validation consumes that metadata, tests cover the new behavior, and repository automation settings are updated.

Changes

Structured signing-key metadata

Layer / File(s) Summary
Public-key metadata contract and implementations
src/xmldsig/sign.rs, src/xmldsig/mod.rs
Adds SigningPublicKeyInfo, replaces the raw SPKI trait method, and implements structured RSA, P-256, and P-384 metadata extraction.
Certificate validation and behavior coverage
src/xmldsig/sign.rs, tests/signing_digest.rs
Updates X.509 KeyInfo validation to use structured SPKI data and adds coverage for metadata extraction, unsupported algorithms, and encoding failures.

Repository automation settings

Layer / File(s) Summary
Dependency and release automation configuration
.github/dependabot.yml, .release-plz.toml
Enables automatic Dependabot rebasing and configures release-plz commit matching and release behavior.

Estimated code review effort: 3 (Moderate) | ~20 minutes

Sequence Diagram(s)

sequenceDiagram
  participant X509CertificateKeyInfoWriter
  participant SigningKey
  participant Certificate
  X509CertificateKeyInfoWriter->>SigningKey: public_key_info()
  SigningKey-->>X509CertificateKeyInfoWriter: SigningPublicKeyInfo
  X509CertificateKeyInfoWriter->>Certificate: compare certificate public key with spki_der
  Certificate-->>X509CertificateKeyInfoWriter: validation result
Loading

Possibly related PRs

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Out of Scope Changes check ⚠️ Warning The Dependabot and release-plz updates are unrelated to linked issue #84 and add extra scope beyond the signing abstraction work. Split the release automation and Dependabot changes into a separate PR or link them to their own issue.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly summarizes the main signing public key info change.
Description check ✅ Passed The description matches the signing, testing, and release automation changes in the diff.
Linked Issues check ✅ Passed The PR implements structured SigningPublicKeyInfo, updates X509 KeyInfo usage, and adds the requested RSA/P-256/P-384 tests.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/#84-signing-key-info

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@greptile-apps

greptile-apps Bot commented Jul 12, 2026 •

Copy link
Copy Markdown

Greptile Summary

This PR exposes structured public key details for XMLDSig signing keys. The main changes are:

  • Adds SigningPublicKeyInfo for RSA and ECDSA keys.
  • Updates X.509 KeyInfo matching to use the structured signing-key API.
  • Adds tests for public-key info, unsupported algorithms, and KeyInfo error propagation.
  • Adjusts Dependabot and release-plz automation settings.

Confidence Score: 5/5

This looks safe to merge.

No blocking issues found in the changed code.

No files need attention.

T-Rex T-Rex Logs

What T-Rex did

  • Ran the signing_digest tests with cargo test --all-features --test signing_digest; all 20 tests passed and the process exited with code 0.
  • Ran cargo check --all-features; the build finished with the dev profile indicating success.
  • Attempted the optional cargo fmt check, but cargo-fmt was missing for the stable toolchain, so the check could not be completed.

View all artifacts

T-Rex Ran code and verified through T-Rex

Important Files Changed

Filename Overview
src/xmldsig/sign.rs Adds structured signing public-key output and wires X.509 KeyInfo matching through it.
src/xmldsig/mod.rs Re-exports the new signing public-key info type.
tests/signing_digest.rs Adds tests for RSA and ECDSA public-key info plus signing error paths.
.release-plz.toml Adds explicit release-plz commit filtering and release-trigger settings.
.github/dependabot.yml Makes Dependabot rebase behavior explicit for Cargo and GitHub Actions updates.

Reviews (2): Last reviewed commit: "fix(ci): accept breaking release commits" | Re-trigger Greptile

@coderabbitai coderabbitai Bot 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.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In @.release-plz.toml:
- Around line 7-8: Update the release_commits pattern in the release-plz
configuration to accept the optional Conventional Commits breaking-change marker
`!` both without a scope and after a scope, while preserving the existing type
and scope validation.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: 21dd5341-649e-4a92-b7ee-3b4caf4ccb40

📥 Commits

Reviewing files that changed from the base of the PR and between dab0b3d and c6cff7d.

📒 Files selected for processing (5)
  • .github/dependabot.yml
  • .release-plz.toml
  • src/xmldsig/mod.rs
  • src/xmldsig/sign.rs
  • tests/signing_digest.rs

Comment thread .release-plz.toml Resolved
@polaz
polaz merged commit b80bb23 into main Jul 13, 2026
9 checks passed
@polaz
polaz deleted the feat/#84-signing-key-info branch July 13, 2026 08:09
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.

feat: complete SigningKey public key abstraction

1 participant