The REST login never verified the switch in practice: with ssl_verify off nothing was checked, and with it on a self-signed certificate (the one every ProCurve ships) failed the CA check and the login was retried with verification off. Either way the password went to whatever answered on port 443. The certificate is now checked by its SHA-256 fingerprint, trust on first use (napalm-device-types tls_certificates): the caller passes the fingerprint to expect in optional_args["tls_fingerprints"] and receives every one seen through optional_args["tls_certificate_observer"]. A different certificate ends open() with TlsCertificateMismatch before the password is sent, without trying SSH or Telnet, which would reach the same host with the same password. The session is pinned to the checked certificate for every later connection. ssl_verify no longer has an effect, and the unverified retry is gone. Closes #17
36 lines
1.4 KiB
JSON
36 lines
1.4 KiB
JSON
{
|
|
"coverage_floor": 54.0,
|
|
"function_complexity": {
|
|
"napalm_procurve/api_client.py::ProcurveApiClient.get_interfaces": 15,
|
|
"napalm_procurve/api_client.py::ProcurveApiClient.get_vlans": 15,
|
|
"napalm_procurve/parsers.py::_parse_procurve_uptime": 11,
|
|
"napalm_procurve/parsers.py::parse_ip_interfaces": 14,
|
|
"napalm_procurve/parsers.py::parse_lldp_neighbors_detail": 16,
|
|
"napalm_procurve/parsers.py::parse_system_info": 18,
|
|
"napalm_procurve/parsers.py::parse_vlans_from_running_config": 11,
|
|
"napalm_procurve/procurve.py::ProcurveDriver._cli_set_interface": 13,
|
|
"napalm_procurve/procurve.py::ProcurveDriver.open": 13,
|
|
"napalm_procurve/procurve.py::ProcurveDriver.set_lag_members": 12
|
|
},
|
|
"function_lines": {
|
|
"napalm_procurve/api_client.py::ProcurveApiClient.get_interfaces": 65,
|
|
"napalm_procurve/api_client.py::ProcurveApiClient.get_vlans": 101,
|
|
"napalm_procurve/parsers.py::parse_ip_interfaces": 58,
|
|
"napalm_procurve/parsers.py::parse_lldp_neighbors_detail": 59,
|
|
"napalm_procurve/parsers.py::parse_system_info": 80,
|
|
"napalm_procurve/parsers.py::parse_vlans_from_running_config": 79,
|
|
"napalm_procurve/procurve.py::_parse_ping_output": 58
|
|
},
|
|
"mypy_relaxed": [
|
|
"napalm_procurve.api_client",
|
|
"napalm_procurve.parsers",
|
|
"napalm_procurve.procurve"
|
|
],
|
|
"python_file_lines": {
|
|
"napalm_procurve/procurve.py": 1387
|
|
},
|
|
"untyped_public": [
|
|
"napalm_procurve/procurve.py::ProcurveDriver.get_snmp_config"
|
|
]
|
|
}
|