Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
None
-
None
-
None
-
Unknown
Description
Hi!
JwkUtils::fromECPublicKey returns key coordinates without leading zeroes because it's using BigInteger.toByteArray(), which returns only necessary bytes to encode a big integer value, here: https://github.com/apache/cxf/blob/master/rt/rs/security/jose-parent/jose/src/main/java/org/apache/cxf/rs/security/jose/jwk/JwkUtils.java#L378
This causes issues in different libraries, almost everywhere leading zeroes are expected to be present so that coordinate length is not changed depending on data.
Attachments
Attachments
Issue Links
- links to