Skip to content

Commit

Permalink
Fix security hotspot
Browse files Browse the repository at this point in the history
  • Loading branch information
RetGal committed Feb 1, 2024
1 parent cf2eccd commit 1e644b5
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/main/java/mpo/dayon/common/Runner.java
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,8 @@ static void prepareKeystore(File appHomeDir) {
Path keystore = Paths.get(format("%s%skeystore.jks", appHomeDir.getAbsolutePath(), File.separator));
if (!Files.exists(keystore)) {
Log.info(format("Creating new keystore [%s]", keystore));
ProcessBuilder builder = new ProcessBuilder("keytool", "-genkeypair", "-dname", "cn=Dayon!, ou=Dayon!, o=Dayon!, c=Dayon!, l=Dayon!", "-keyalg", "RSA", "-keysize", "4096", "-alias", "genkey", "-validity", "3210", "-keystore", keystore.toString(), "-storepass", "spasspass");
String keytool = Paths.get(format("%s%sbin%skeytool", System.getProperty("java.home"), File.separator, File.separator)).toString();
ProcessBuilder builder = new ProcessBuilder(keytool, "-genkeypair", "-dname", "cn=Dayon!, ou=Dayon!, o=Dayon!, c=Dayon!, l=Dayon!", "-keyalg", "RSA", "-keysize", "4096", "-alias", "genkey", "-validity", "3210", "-keystore", keystore.toString(), "-storepass", "spasspass");
try {
builder.directory(appHomeDir).start();
} catch (IOException e) {
Expand Down

0 comments on commit 1e644b5

Please sign in to comment.