Skip to content

Conversation

@cconlon
Copy link
Member

@cconlon cconlon commented Nov 14, 2025

This PR adds RSASSA-PSS parameter encoding support to WolfCryptPssParameters.

Encoding logic follows RFC 4055 default value semantics, fields matching ASN.1 defaults are omitted from DER encoding.

Fixes SunJCE test: security/cert/X509Certificate/GetSigAlgParams.java

@cconlon cconlon self-assigned this Nov 14, 2025
@cconlon cconlon requested a review from Copilot November 14, 2025 19:33
Copilot finished reviewing on behalf of cconlon November 14, 2025 19:37
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR adds comprehensive RSASSA-PSS parameter encoding and decoding support to WolfCryptPssParameters, implementing RFC 4055 specification with proper default value semantics. The implementation correctly omits fields that match ASN.1 defaults from DER encoding.

Key Changes:

  • Implements DER encoding/decoding for PSS parameters following RFC 4055 standards
  • Adds ASN.1 utility methods for integer, OID, and NULL encoding/decoding
  • Provides extensive test coverage with 20 new test cases covering various hash algorithms, salt lengths, and error conditions

Reviewed Changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 8 comments.

File Description
src/main/java/com/wolfssl/provider/jce/WolfCryptPssParameters.java Implements PSS parameter encoding/decoding logic with RFC 4055 compliant default value omission
src/main/java/com/wolfssl/provider/jce/WolfCryptASN1Util.java Adds ASN.1 utility methods for DER encoding/decoding of integers, OIDs, NULL values, and hash algorithm mappings
src/test/java/com/wolfssl/provider/jce/test/WolfCryptAlgorithmParametersTest.java Adds comprehensive test coverage for PSS parameters including initialization, encoding, decoding, round-trip tests, and error cases

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@cconlon cconlon assigned rlm2002 and unassigned cconlon Nov 14, 2025
@rlm2002 rlm2002 merged commit fd03d2c into wolfSSL:master Nov 14, 2025
46 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