Skip to content

Commit 8afde43

Browse files
committed
TrustAnchorSet now returns empty set instead of null on construction failure
1 parent a496e64 commit 8afde43

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/main/java/de/rub/nds/tlsscanner/trust/TrustAnchorManager.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@
3030
import java.util.LinkedList;
3131
import java.util.List;
3232
import java.util.Set;
33+
import java.util.TreeSet;
3334
import javax.security.auth.x500.X500Principal;
3435
import org.apache.logging.log4j.LogManager;
3536
import org.apache.logging.log4j.Logger;
@@ -135,7 +136,7 @@ private Set<TrustAnchor> getFullTrustAnchorSet() {
135136
} catch (IOException | NoSuchAlgorithmException | CertificateException | KeyStoreException | InvalidAlgorithmParameterException ex) {
136137
LOGGER.error("Could not build TrustAnchorSet", ex);
137138
}
138-
return null;
139+
return new HashSet<>();
139140
}
140141

141142
public Set<TrustAnchor> getTrustAnchorSet() {

0 commit comments

Comments
 (0)