Skip to content

Check the OSSL_PARAM type before reading the RSA-PSS salt length - #668

Merged
mtrojnar merged 1 commit into
OpenSC:masterfrom
olszomal:pss_saltlen
Aug 4, 2026
Merged

Check the OSSL_PARAM type before reading the RSA-PSS salt length#668
mtrojnar merged 1 commit into
OpenSC:masterfrom
olszomal:pss_saltlen

Conversation

@olszomal

@olszomal olszomal commented Aug 4, 2026

Copy link
Copy Markdown
Collaborator

Pull Request Type

  • Bug fix
  • New feature
  • Code style / formatting / renaming
  • Refactoring (no functional or API changes)
  • Build / CI related changes
  • Documentation
  • Other (please describe):

Related Issue

Issue number: N/A

Current Behavior

RSA-PSS salt length parameters are parsed by trying integer and string conversions without first validating the parameter type.

New Behavior

Unsupported or malformed parameter types are rejected explicitly.

Scope of Changes

Validate the OSSL_SIGNATURE_PARAM_PSS_SALTLEN data type before parsing integer and UTF-8 string values.

Testing

  • Existing tests
  • New tests added
  • Manual testing

Additional Notes

License Declaration

  • I hereby agree to license my contribution under the project's license.

Previously, string parameters were passed to OSSL_PARAM_get_int()
first, leaving a spurious "incompatible type" error in the OpenSSL
error queue even when string parsing succeeded.
@mtrojnar
mtrojnar merged commit 8f8f9c4 into OpenSC:master Aug 4, 2026
12 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