chore: Switched key factory for RSA to BC as well (#33605)

This commit is contained in:
Nidhi 2024-05-22 15:12:34 +05:30 committed by GitHub
parent 03f45ec81d
commit 424de98236
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -87,7 +87,7 @@ public class SshTransportConfigCallback implements TransportConfigCallback {
PublicKey generatedPublicKey; PublicKey generatedPublicKey;
if (publicKey.startsWith(RSA_TYPE)) { if (publicKey.startsWith(RSA_TYPE)) {
keyFactory = KeyFactory.getInstance(RSA_KEY_FACTORY_IDENTIFIER); keyFactory = KeyFactory.getInstance(RSA_KEY_FACTORY_IDENTIFIER, new BouncyCastleProvider());
generatedPublicKey = keyFactory.generatePublic(CryptoUtil.decodeOpenSSHRSA(publicKey.getBytes())); generatedPublicKey = keyFactory.generatePublic(CryptoUtil.decodeOpenSSHRSA(publicKey.getBytes()));