pk: Enable RSASSA-PSS key parsing #154
Open
+8
−2
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
mbedtls_pk_parse_key() and mbedtls_pk_parse_public_key() would not load RSASSA-PSS keys generated by OpenSSL (PEM or DER).
This patch adds the OID needed for asn1 matching and a few other tweaks to let the key get loaded.
I've confirmed that this produces correct signature in LibJWT by doing:
Generate RSASSA-PSS sig in OpenSSL
Generate RSASSA-PSS sig in GnuTLS
Generate RSASSA-PSS sig in MbedTLS
Note, you obviously have to use:
To get the correct RSASSA-PSS signatures and verification done.
PR checklist
Please remove the segment/s on either side of the | symbol as appropriate, and add any relevant link/s to the end of the line.
If the provided content is part of the present PR remove the # symbol.