|
46 | 46 | import de.rub.nds.tlsattacker.tls.config.GeneralConfig; |
47 | 47 | import de.rub.nds.tlsattacker.tls.config.WorkflowTraceSerializer; |
48 | 48 | import de.rub.nds.tlsattacker.tls.exceptions.ConfigurationException; |
| 49 | +import de.rub.nds.tlsattacker.tls.exceptions.WorkflowExecutionException; |
| 50 | +import de.rub.nds.tlsattacker.tls.util.LogLevel; |
49 | 51 | import de.rub.nds.tlsattacker.tls.workflow.TlsContext; |
50 | 52 | import de.rub.nds.tlsattacker.tls.workflow.WorkflowExecutor; |
51 | 53 | import de.rub.nds.tlsattacker.transport.TransportHandler; |
|
54 | 56 | import java.io.IOException; |
55 | 57 | import java.util.List; |
56 | 58 | import javax.xml.bind.JAXBException; |
| 59 | +import org.apache.logging.log4j.LogManager; |
| 60 | +import org.apache.logging.log4j.Logger; |
57 | 61 |
|
58 | 62 | /** |
59 | 63 | * |
60 | 64 | * @author Juraj Somorovsky <juraj.somorovsky@rub.de> |
61 | 65 | */ |
62 | 66 | public class Main { |
63 | 67 |
|
| 68 | + private static final Logger LOGGER = LogManager.getLogger(Main.class); |
| 69 | + |
64 | 70 | public static void main(String[] args) throws Exception { |
65 | 71 |
|
66 | 72 | GeneralConfig generalConfig = new GeneralConfig(); |
@@ -172,7 +178,13 @@ private static void startSimpleTls(GeneralConfig generalConfig, CommandConfig co |
172 | 178 | TlsContext tlsContext = configHandler.initializeTlsContext(config); |
173 | 179 | WorkflowExecutor workflowExecutor = configHandler.initializeWorkflowExecutor(transportHandler, tlsContext); |
174 | 180 |
|
175 | | - workflowExecutor.executeWorkflow(); |
| 181 | + try { |
| 182 | + workflowExecutor.executeWorkflow(); |
| 183 | + } catch (WorkflowExecutionException ex) { |
| 184 | + LOGGER.info(ex.getLocalizedMessage(), ex); |
| 185 | + LOGGER.log(LogLevel.CONSOLE_OUTPUT, |
| 186 | + "The TLS protocol flow was not executed completely, follow the debug messages for more information."); |
| 187 | + } |
176 | 188 |
|
177 | 189 | transportHandler.closeConnection(); |
178 | 190 |
|
|
0 commit comments