0

I am working on migration from php to Java, while doing so , I encountered a JWK that is being generated with spomky-jose/JWKFactory (let's call that JWK-P) while for generating JWK in Java , I am using nimbus-jose-jwt library (let's call that JWK-J). Both of these JWKs are identical except that x5c parameter of JWK-P has some new line characters ("\n") , does this make a difference ? If yes, how should I deal with same?

excerpt from JWK-P : MIID4DCCAsigAwIBAgIJAOYsgV+iL1VXMA0GCSqGSIb3DQEBCwUAMIGEMQswCQYD \nVQQGEwJJTjELMAkGA1UECAwCVVAxDjAMBgNVBAcMBU5vaWRhMQ8wDQYDVQQKDAZu \nYXV

excerpt from JWK-J : MIID4DCCAsigAwIBAgIJAOYsgV+iL1VXMA0GCSqGSIb3DQEBCwUAMIGEMQswCQYDVQQGEwJJTjELMAkGA1UECAwCVVAxDjAMBgNVBAcMBU5vaWRhMQ8wDQYDVQQKDAZuYXV

PS : both JWKs are generated using same PEM certificate.

Prakhar
  • 41
  • 6

1 Answers1

0

Not sure if it makes a difference but there ought to be no whitespace, such as new line characters, in the x5c members' representation. JWK-P is incorrect in its implementation.