Нигде не могу найти описание ошибки для такого кода:
r = requests.get('https://portal.rosreestr.ru:4433/cxf/External?wsdl', cert='/etc/ssl/certs/portal.rosreestr.ru.pem', verify=True)
ошибка:
Traceback (most recent call last): File "/usr/lib/python3/dist-packages/urllib3/connectionpool.py", line 560, in urlopen body=body, headers=headers) File "/usr/lib/python3/dist-packages/urllib3/connectionpool.py", line 346, in _make_request self._validate_conn(conn) File "/usr/lib/python3/dist-packages/urllib3/connectionpool.py", line 787, in _validate_conn conn.connect() File "/usr/lib/python3/dist-packages/urllib3/connection.py", line 252, in connect ssl_version=resolved_ssl_version) File "/usr/lib/python3/dist-packages/urllib3/util/ssl_.py", line 303, in ssl_wrap_socket context.load_cert_chain(certfile, keyfile) ssl.SSLError: [SSL] PEM lib (_ssl.c:2844) During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/usr/lib/python3/dist-packages/requests/adapters.py", line 376, in send timeout=timeout File "/usr/lib/python3/dist-packages/urllib3/connectionpool.py", line 589, in urlopen raise SSLError(e) requests.packages.urllib3.exceptions.SSLError: [SSL] PEM lib (_ssl.c:2844) During handling of the above exception, another exception occurred: Traceback (most recent call last): File "rosreestr_requests.py", line 48, in <module> r = requests.get('https://portal.rosreestr.ru:4433/cxf/External?wsdl', cert='/etc/ssl/certs/portal.rosreestr.ru.pem', verify=True) File "/usr/lib/python3/dist-packages/requests/api.py", line 67, in get return request('get', url, params=params, **kwargs) File "/usr/lib/python3/dist-packages/requests/api.py", line 53, in request return session.request(method=method, url=url, **kwargs) File "/usr/lib/python3/dist-packages/requests/sessions.py", line 468, in request resp = self.send(prep, **send_kwargs) File "/usr/lib/python3/dist-packages/requests/sessions.py", line 576, in send r = adapter.send(request, **kwargs) File "/usr/lib/python3/dist-packages/requests/adapters.py", line 447, in send raise SSLError(e, request=request) requests.exceptions.SSLError: [SSL] PEM lib (_ssl.c:2844)
Можно попробовать вручну создать контекст ssl, но всё запарывается на ззагрузке сертификата:
context.load_cert_chain(certfile, keyfile) ssl.SSLError: [SSL] PEM lib (_ssl.c:2844)
Что имеется в виду?