Skip to content

Commit

Permalink
Security update.
Browse files Browse the repository at this point in the history
  • Loading branch information
xmamo committed Nov 9, 2015
1 parent b2ba4b8 commit d71bfe1
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<modelVersion>4.0.0</modelVersion>
<groupId>co.virtualdragon</groupId>
<artifactId>VanillaVotifier</artifactId>
<version>2.4.2</version>
<version>2.4.3</version>
<name>VanillaVotifier</name>
<packaging>jar</packaging>
<dependencies>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ public void load() throws IOException, InvalidKeySpecException {
publicKeyFile = new File(config.getJSONObject("key-pair-files").getString("public"));
privateKeyFile = new File(config.getJSONObject("key-pair-files").getString("private"));
if (!publicKeyFile.exists() || !privateKeyFile.exists()) {
KeyPair keyPair = RsaUtils.genKeyPair(2024);
KeyPair keyPair = RsaUtils.genKeyPair(2048);
PemWriter publicPemWriter = new PemWriter(new BufferedWriter(new FileWriter(publicKeyFile)));
publicPemWriter.writeObject(new PemObject("PUBLIC KEY", keyPair.getPublic().getEncoded()));
publicPemWriter.flush();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ public void run() {
notifyListeners(new ConnectionEstablishedEvent(socket));
socket.setSoTimeout(SocketOptions.SO_TIMEOUT); // SocketException: handled by try/catch.
BufferedInputStream in = new BufferedInputStream(socket.getInputStream()); // IOException: handled by try/catch.
byte[] request = new byte[253];
byte[] request = new byte[256];
in.read(request); // IOException: handled by try/catch.
notifyListeners(new EncryptedInputReceivedEvent(socket, new String(request, StandardCharsets.UTF_8))); // UnsupportedEncodingException: can't happen.
request = cipher.doFinal(request); // IllegalBlockSizeException: can't happen.
Expand Down

0 comments on commit d71bfe1

Please sign in to comment.