From e5079464d0c7c3b2c2d7b8b7fe10dbc0aee31e30 Mon Sep 17 00:00:00 2001 From: Simon Rettberg Date: Thu, 2 Mar 2017 19:05:14 +0100 Subject: [LighttpdHttps] fix NPE when importing certificate d4ccf048ac965360c4d8cda1541cc924eee72570 broke it by reordering lines in a nonsensical way. --- src/main/java/org/openslx/taskmanager/tasks/LighttpdHttps.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/java/org/openslx/taskmanager/tasks/LighttpdHttps.java b/src/main/java/org/openslx/taskmanager/tasks/LighttpdHttps.java index 2829baf..59f3027 100644 --- a/src/main/java/org/openslx/taskmanager/tasks/LighttpdHttps.java +++ b/src/main/java/org/openslx/taskmanager/tasks/LighttpdHttps.java @@ -62,16 +62,16 @@ public class LighttpdHttps extends AbstractTask File tmpChain = null; try { try { + tmpCert = File.createTempFile( "bwlp-", ".pem" ); tmpKey = File.createTempFile( "bwlp-", ".pem" ); Util.writeStringToFile( tmpCert, this.importcert ); - tmpCert = File.createTempFile( "bwlp-", ".pem" ); Util.writeStringToFile( tmpKey, this.importkey ); if ( this.importchain != null && !this.importchain.isEmpty() ) { tmpChain = File.createTempFile( "bwlp-", ".pem" ); Util.writeStringToFile( tmpChain, this.importchain ); } } catch ( Exception e ) { - status.error = "Could not create temporary files!"; + status.error = "Could not create temporary files: " + e.getMessage(); return false; } int ret; -- cgit v1.2.3-55-g7522