Skip to content

Commit 196a4e9

Browse files
committed
updated tls-scanner to comply with newest jcommander version
1 parent 5a687c0 commit 196a4e9

File tree

3 files changed

+18
-17
lines changed

3 files changed

+18
-17
lines changed

TLS-Server-Scanner/src/main/java/de/rub/nds/tlsscanner/serverscanner/config/ScannerConfig.java

Lines changed: 5 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,6 @@ public class ScannerConfig extends TLSDelegateConfig {
3434
@Parameter(names = "-noColor", required = false, description = "If you use Windows or don't want colored text.")
3535
private boolean noColor = false;
3636

37-
@ParametersDelegate
38-
private GeneralDelegate generalDelegate;
3937

4038
@Parameter(names = "-scanDetail", required = false, description = "How detailed do you want to scan?")
4139
private ScannerDetail scanDetail = ScannerDetail.NORMAL;
@@ -57,24 +55,20 @@ public class ScannerConfig extends TLSDelegateConfig {
5755

5856
public ScannerConfig(GeneralDelegate delegate) {
5957
super(delegate);
60-
this.generalDelegate = delegate;
61-
clientDelegate = new ClientDelegate();
62-
starttlsDelegate = new StarttlsDelegate();
63-
ccaDelegate = new CcaDelegate();
58+
this.clientDelegate = new ClientDelegate();
59+
this.starttlsDelegate = new StarttlsDelegate();
60+
this.ccaDelegate = new CcaDelegate();
6461
addDelegate(clientDelegate);
65-
addDelegate(generalDelegate);
6662
addDelegate(starttlsDelegate);
6763
addDelegate(ccaDelegate);
6864
}
6965

7066
public ScannerConfig(GeneralDelegate delegate, ClientDelegate clientDelegate) {
7167
super(delegate);
72-
this.generalDelegate = delegate;
7368
this.clientDelegate = clientDelegate;
74-
starttlsDelegate = new StarttlsDelegate();
75-
ccaDelegate = new CcaDelegate();
69+
this.starttlsDelegate = new StarttlsDelegate();
70+
this.ccaDelegate = new CcaDelegate();
7671
addDelegate(clientDelegate);
77-
addDelegate(generalDelegate);
7872
addDelegate(starttlsDelegate);
7973
addDelegate(ccaDelegate);
8074
}

TLS-Server-Scanner/src/main/java/de/rub/nds/tlsscanner/serverscanner/rating/RatingIO.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,8 @@ public static void writeRecommendations(Recommendations r, OutputStream os) {
3939
JAXB.marshal(r, tempStream);
4040
try {
4141
os.write(XMLPrettyPrinter.prettyPrintXML(new String(tempStream.toByteArray())).getBytes());
42-
} catch (IOException | TransformerException | XPathExpressionException | XPathFactoryConfigurationException
43-
| ParserConfigurationException | SAXException ex) {
42+
} catch (IOException | TransformerException | XPathExpressionException | ParserConfigurationException
43+
| SAXException ex) {
4444
throw new RuntimeException("Could not format XML");
4545
}
4646
}
@@ -67,8 +67,8 @@ public static void writeRatingInfluencers(RatingInfluencers ri, OutputStream os)
6767
JAXB.marshal(ri, tempStream);
6868
try {
6969
os.write(XMLPrettyPrinter.prettyPrintXML(new String(tempStream.toByteArray())).getBytes());
70-
} catch (IOException | TransformerException | XPathExpressionException | XPathFactoryConfigurationException
71-
| ParserConfigurationException | SAXException ex) {
70+
} catch (IOException | TransformerException | XPathExpressionException | ParserConfigurationException
71+
| SAXException ex) {
7272
throw new RuntimeException("Could not format XML");
7373
}
7474
}

pom.xml

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,7 @@
155155
<plugin>
156156
<groupId>org.apache.maven.plugins</groupId>
157157
<artifactId>maven-failsafe-plugin</artifactId>
158-
<version>2.20.1</version>
158+
<version>3.0.0-M5</version>
159159
<configuration>
160160
<!-- By default, the Failsafe plugin excludes various files. We have to override that. -->
161161
<includes>
@@ -176,10 +176,17 @@
176176
<plugin>
177177
<groupId>org.apache.maven.plugins</groupId>
178178
<artifactId>maven-surefire-plugin</artifactId>
179-
<version>2.19.1</version>
179+
<version>3.0.0-M5</version>
180180
<configuration>
181181
<argLine>-Dfile.encoding=${project.build.sourceEncoding}</argLine>
182182
</configuration>
183+
<dependencies>
184+
<dependency>
185+
<groupId>org.apache.maven.surefire</groupId>
186+
<artifactId>surefire-junit47</artifactId>
187+
<version>3.0.0-M5</version>
188+
</dependency>
189+
</dependencies>
183190
</plugin>
184191
<!-- Format the Code -->
185192
<plugin>

0 commit comments

Comments
 (0)