(self)
| 266 | return "DTLS" if self.is_dtls else "TLS" |
| 267 | |
| 268 | def start_tls(self) -> layer.CommandGenerator[None]: |
| 269 | assert not self.tls |
| 270 | |
| 271 | tls_start = TlsData(self.conn, self.context, is_dtls=self.is_dtls) |
| 272 | if self.conn == self.context.client: |
| 273 | yield TlsStartClientHook(tls_start) |
| 274 | else: |
| 275 | yield TlsStartServerHook(tls_start) |
| 276 | if not tls_start.ssl_conn: |
| 277 | yield commands.Log( |
| 278 | f"No {self.proto_name} context was provided, failing connection.", ERROR |
| 279 | ) |
| 280 | yield commands.CloseConnection(self.conn) |
| 281 | return |
| 282 | assert tls_start.ssl_conn |
| 283 | self.tls = tls_start.ssl_conn |
| 284 | |
| 285 | def tls_interact(self) -> layer.CommandGenerator[None]: |
| 286 | while True: |
no test coverage detected