From b6b015fe1f5b4ed62bb0f09c03cafda3efe82ac0 Mon Sep 17 00:00:00 2001 From: Thinkofname Date: Thu, 31 Mar 2016 16:12:07 +0100 Subject: [PATCH] Ensure we get a 1024 bit RSA key (Fixes #1814) --- proxy/src/main/java/net/md_5/bungee/EncryptionUtil.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/proxy/src/main/java/net/md_5/bungee/EncryptionUtil.java b/proxy/src/main/java/net/md_5/bungee/EncryptionUtil.java index d464e926..871e4ad0 100644 --- a/proxy/src/main/java/net/md_5/bungee/EncryptionUtil.java +++ b/proxy/src/main/java/net/md_5/bungee/EncryptionUtil.java @@ -37,7 +37,9 @@ public class EncryptionUtil { try { - keys = KeyPairGenerator.getInstance( "RSA" ).generateKeyPair(); + KeyPairGenerator generator = KeyPairGenerator.getInstance( "RSA" ); + generator.initialize( 1024 ); + keys = generator.generateKeyPair(); } catch ( NoSuchAlgorithmException ex ) { throw new ExceptionInInitializerError( ex );