chore: Kill genCert on error

- Because apparently it can run into an infinite loop when there are pKey issues
This commit is contained in:
Magnus Leßmann (@MarkL4YG) 2024-11-23 13:20:14 +01:00
parent 8d00a60d87
commit 022e5497d1
Signed by: Mark.TwoFive
GPG key ID: 5B5EBCBE331F1E6F

View file

@ -393,8 +393,9 @@ public class OpenSSLCertificateCreator {
throw new RuntimeException(e);
}
StartedProcess certGenProc = null;
try {
StartedProcess certGenProc = new ProcessExecutor()
certGenProc = new ProcessExecutor()
.command(
resolveOpenSSL(),
"x509",
@ -421,6 +422,8 @@ public class OpenSSLCertificateCreator {
throw new CommandLineOperationException("Failure running OpenSSL x509 command.", e);
} catch (ExecutionException e) {
throw new RuntimeException(e);
} finally {
killIfActive(certGenProc);
}
return outFile;
}