Skip to content

fix(crypto): verify x509 certificates with public keys#4300

Draft
andrewtdiz wants to merge 1 commit into
PerryTS:mainfrom
andrewtdiz:codex/node-x509-verify-method
Draft

fix(crypto): verify x509 certificates with public keys#4300
andrewtdiz wants to merge 1 commit into
PerryTS:mainfrom
andrewtdiz:codex/node-x509-verify-method

Conversation

@andrewtdiz
Copy link
Copy Markdown
Contributor

Summary

  • adds bound X509Certificate#verify(publicKey) dispatch and property exposure
  • verifies RSA-signed certificates against public asymmetric KeyObject surrogates
  • returns false for mismatched public keys and unsupported/non-RSA verification paths
  • matches Node-shaped pkey validation for missing and non-KeyObject arguments

Non-goals

  • checkIssued()
  • checkPrivateKey()
  • issuerCertificate
  • infoAccess
  • non-RSA certificate verification
  • legacy metadata compatibility

Validation

  • cargo fmt --all --check
  • npm exec --package=node@26 -- node --experimental-strip-types test-parity/node-suite/crypto/x509/verify-method.ts
  • CARGO_TARGET_DIR=/root/perry-worktrees/.build-targets/perry-x509-verify-check cargo check -p perry-stdlib --no-default-features --features crypto
  • git diff --check
  • ./scripts/check_file_size.sh
  • CARGO_TARGET_DIR=/root/perry-worktrees/.build-targets/perry-x509-verify-build cargo build -p perry --release
  • CARGO_TARGET_DIR=/root/perry-worktrees/.build-targets/perry-x509-verify-build cargo build -p perry-runtime -p perry-stdlib --release
  • direct Perry run of test-parity/node-suite/crypto/x509/verify-method.ts
  • PATH=<node26-bin>:$PATH CARGO_TARGET_DIR=/root/perry-worktrees/.build-targets/perry-x509-verify-build PERRY_RUNTIME_DIR=/root/perry-worktrees/.build-targets/perry-x509-verify-build/release PERRY_NO_AUTO_OPTIMIZE=1 PERRY_GEN_GC=0 ./run_parity_tests.sh --suite node-suite --module crypto --filter x509/verify-method

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.

1 participant