(out: OutputBuffer, algs: Algorithms, client_audit: bool, for_server: bool = True)
| 243 | |
| 244 | |
| 245 | def output_compatibility(out: OutputBuffer, algs: Algorithms, client_audit: bool, for_server: bool = True) -> None: |
| 246 | |
| 247 | # Don't output any compatibility info if we're doing a client audit. |
| 248 | if client_audit: |
| 249 | return |
| 250 | |
| 251 | ssh_timeframe = algs.get_ssh_timeframe(for_server) |
| 252 | comp_text = [] |
| 253 | for ssh_prod in [Product.OpenSSH, Product.DropbearSSH]: |
| 254 | if ssh_prod not in ssh_timeframe: |
| 255 | continue |
| 256 | v_from = ssh_timeframe.get_from(ssh_prod, for_server) |
| 257 | v_till = ssh_timeframe.get_till(ssh_prod, for_server) |
| 258 | if v_from is None: |
| 259 | continue |
| 260 | if v_till is None: |
| 261 | comp_text.append('{} {}+'.format(ssh_prod, v_from)) |
| 262 | elif v_from == v_till: |
| 263 | comp_text.append('{} {}'.format(ssh_prod, v_from)) |
| 264 | else: |
| 265 | software = Software(None, ssh_prod, v_from, None, None) |
| 266 | if software.compare_version(v_till) > 0: |
| 267 | tfmt = '{0} {1}+ (some functionality from {2})' |
| 268 | else: |
| 269 | tfmt = '{0} {1}-{2}' |
| 270 | comp_text.append(tfmt.format(ssh_prod, v_from, v_till)) |
| 271 | if len(comp_text) > 0: |
| 272 | out.good('(gen) compatibility: ' + ', '.join(comp_text)) |
| 273 | |
| 274 | |
| 275 | def output_security(out: OutputBuffer, banner: Optional[Banner], padlen: int, is_json_output: bool) -> None: |
no test coverage detected