Skip to content

Commit

Permalink
chore: Add information about BadPaddingException to README.md
Browse files Browse the repository at this point in the history
Closes: SDK-3574
  • Loading branch information
lukaszsocha2 committed Dec 20, 2023
1 parent 170e835 commit d7fe8a1
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -325,6 +325,16 @@ Maven example:
</dependencies>
```

### Bouncycastle BadPaddingException for JWT auth

As of October 2023, RSA keypairs generated on the Developer Console (refer to the [Generate a keypair guide](https://developer.box.com/guides/authentication/jwt/jwt-setup/#generate-a-keypair-recommended))
are no longer compatible with Bouncy Castle version 1.57, which is utilized in the Box Java SDK.
Attempting to use a JWT configuration downloaded from the Developer Console results in a
`javax.crypto.BadPaddingException: pad block corrupted` error.
While we continue our efforts to address this issue, two possible workarounds are available:
1. Override the Bouncy Castle library version with a newer one, following the steps described above.
2. Manually generate a keypair using OpenSSL version 1.0.x and add the Public Key to the Developer Console.
The [manually add keypair guide](https://developer.box.com/guides/authentication/jwt/jwt-setup/#manually-add-keypair) provides assistance in this process.

## Copyright and License

Expand Down

0 comments on commit d7fe8a1

Please sign in to comment.