Skip to content

Commit 4e31abb

Browse files
authored
chore: Add information about BadPaddingException to README.md (#1219)
Closes: SDK-3574
1 parent 170e835 commit 4e31abb

1 file changed

Lines changed: 10 additions & 0 deletions

File tree

README.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -325,6 +325,16 @@ Maven example:
325325
</dependencies>
326326
```
327327

328+
### Bouncycastle BadPaddingException for JWT auth
329+
330+
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))
331+
are no longer compatible with Bouncy Castle version 1.57, which is utilized in the Box Java SDK.
332+
Attempting to use a JWT configuration downloaded from the Developer Console results in a
333+
`javax.crypto.BadPaddingException: pad block corrupted` error.
334+
While we continue our efforts to address this issue, two possible workarounds are available:
335+
1. Override the Bouncy Castle library version with a newer one, following the steps described above.
336+
2. Manually generate a keypair using OpenSSL version 1.0.x and add the Public Key to the Developer Console.
337+
The [manually add keypair guide](https://developer.box.com/guides/authentication/jwt/jwt-setup/#manually-add-keypair) provides assistance in this process.
328338

329339
## Copyright and License
330340

0 commit comments

Comments
 (0)