MCPcopy Index your code
hub / github.com/mitmproxy/mitmproxy / _warn_unsupported_version

Method _warn_unsupported_version

mitmproxy/addons/tlsconfig.py:541–558  ·  view source on GitHub ↗
(self, attribute: str, warn_unbound: bool)

Source from the content-addressed store, hash-verified

539 self._warn_seclevel_missing("server")
540
541 def _warn_unsupported_version(self, attribute: str, warn_unbound: bool):
542 val = net_tls.Version[getattr(ctx.options, attribute)]
543 supported_versions = [
544 v for v in net_tls.Version if net_tls.is_supported_version(v)
545 ]
546 supported_versions_str = ", ".join(v.name for v in supported_versions)
547
548 if val is net_tls.Version.UNBOUNDED:
549 if warn_unbound:
550 logger.info(
551 f"{attribute} has been set to {val.name}. Note that your "
552 f"OpenSSL build only supports the following TLS versions: {supported_versions_str}"
553 )
554 elif val not in supported_versions:
555 logger.warning(
556 f"{attribute} has been set to {val.name}, which is not supported by the current OpenSSL build. "
557 f"The current build only supports the following versions: {supported_versions_str}"
558 )
559
560 def _warn_seclevel_missing(self, side: Literal["client", "server"]) -> None:
561 """

Callers 1

configureMethod · 0.95

Calls 2

infoMethod · 0.80
joinMethod · 0.45

Tested by

no test coverage detected