MCPcopy
hub / github.com/urllib3/urllib3 / _is_key_file_encrypted

Function _is_key_file_encrypted

src/urllib3/util/ssl_.py:450–458  ·  view source on GitHub ↗

Detects if a key file is encrypted or not.

(key_file: str)

Source from the content-addressed store, hash-verified

448
449
450def _is_key_file_encrypted(key_file: str) -> bool:
451 """Detects if a key file is encrypted or not."""
452 with open(key_file) as f:
453 for line in f:
454 # Look for Proc-Type: 4,ENCRYPTED
455 if "ENCRYPTED" in line:
456 return True
457
458 return False
459
460
461def _ssl_wrap_socket_impl(

Callers 1

ssl_wrap_socketFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected