Relative Content

Tag Archive for javabouncycastle

Unexpected content JWS with bouncy castle JWT

I’m trying to generate a JWT with base64 encoded json string.
When the json string is not encoded as base64 everything works but when it does I get an error about Unexpected JWS content.
This is the code that creates the JWT:

The type org.bouncycastle.cms.cmsutils is not visible

I want to subclass some BC classes, in my Java project, but I faced issue with import of CMSUtils class. In order to reproduce issue in a simple project, I created quick-start Maven project (Eclipse 2024-06 IDE). Here are some details: