Block explicit OpenSSL constructors.
(name)
| 985 | |
| 986 | |
| 987 | def _block_openssl_hash_constructor(name): |
| 988 | """Block explicit OpenSSL constructors.""" |
| 989 | def dummy(data=b'', *, usedforsecurity=True, string=None): |
| 990 | raise ValueError(f"blocked explicit OpenSSL hash name: {name}") |
| 991 | return _make_hash_constructor_blocker(name, dummy, 'openssl') |
| 992 | |
| 993 | |
| 994 | def _block_builtin_hash_constructor(name): |
no test coverage detected
searching dependent graphs…