Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Do not reuse KeyFactory instance after a failure.
Fixes #4509 This took a while to find the root cause: The internal SPI fallback logic inside `KeyFactory.generatePrivate()` has the weird side effect of latching onto the LAST registered provider (which in our case was Cavium) after `InvalidKeySpecException` is thrown. This choice is sticky for a single instance of KeyFactory and the fix for our issue is to get fresh `KeyFactory` instance when retrying.
- Loading branch information