CXF-8177 CXF-8178 ECDH Algorithm Fixes #612
Merged
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.
Fixed:
I added a testsuite I used myself in another project where I compare JWS and JWE of multiple libraries to see whether or not they are compatible with each other using algorithms as defined in RFC 7518 (JWA).
Quite some tests returned errors before my changes. Now they all pass. Some of the tests could be fixed from the clientside perspective using other classes to set key and content encryptionprovider. Others could not be fixed at all.
I prefer anyway to use one setup for all which makes it a lot easier from the client's perspective. See the testclasses for this.
I updated operations in JweUtils for this purpose as some assumptions were made in that class that are only compatible with a subset of the algorithms that are actually supported by the codebase.
I also added better support for the case that the given JWK object does not define an algorithm (which is optional, according to the spec).