diff --git a/pom.xml b/pom.xml index 14fffe9..58dd4fd 100644 --- a/pom.xml +++ b/pom.xml @@ -4,7 +4,7 @@ 4.0.0 TLS-Docker-Library de.rub.nds.tlsdockerlib - 2.1-SNAPSHOT + 2.0.1 jar diff --git a/src/main/java/de/rub/nds/tls/subject/params/ParameterProfile.java b/src/main/java/de/rub/nds/tls/subject/params/ParameterProfile.java index 5002b9c..350c123 100644 --- a/src/main/java/de/rub/nds/tls/subject/params/ParameterProfile.java +++ b/src/main/java/de/rub/nds/tls/subject/params/ParameterProfile.java @@ -96,19 +96,22 @@ public String[] toParameters(String host, Integer targetPort, ImageProperties im StringBuilder finalParams = new StringBuilder(); for (Parameter param : parameterList) { if (supportsInsecure()) { - if (insecureConnection) { - // do not add CA param if we use insecure - if (param.getType() == ParameterType.CA_CERTIFICATE) - continue; - } else { - // do not add insecure if not wanted - if (param.getType() == ParameterType.INSECURE) - continue; + if ((insecureConnection && param.getType() == ParameterType.CA_CERTIFICATE) + || (!insecureConnection && param.getType() == ParameterType.INSECURE)) { + // do not add CA param if we use insecure, do not add insecure + // if not wanted + continue; } } - // do not add parallelize if not wanted - if (!parallelize && param.getType() == ParameterType.PARALLELIZE) + + if (!parallelize && param.getType() == ParameterType.PARALLELIZE) { + // do not add parallelize if not wanted + continue; + } + if (param.getCmdParameter().equals("")) { + // do not add empty commands that cause a blank space continue; + } finalParams.append(param.getCmdParameter()); finalParams.append(" "); }