If you pass a string verify
path to create_client
, you will get a ClientConnectorCertificateError
#850
Closed
6 tasks done
Describe the bug
Currently, the
verify
parameter does not work like the equivalent parameter inrequests
orbotocore
whereverify
can either be abool
or astr
False
=> do not use SSLTrue
=> use default SSL certstr
=> use SSL cert found at the pathverify
Often the latter is needed to access internal endpoints.
aiobotocore
also seems to make this assumption since we passverify
throughbotocore.EndPointCreator._get_verify_value
which can return astr
. However we passverify
to theverify_ssl
method ofaiohttp.TCPConnector
, which simply treats that value as abool
.This means that passing a certificate file path as a string does not work as expected and throws the following exception:
What we should be doing, and I have tested this, is creating an
SSLContext(cafile=verify)
object if verify is astr
(orpathlib.Path
perhaps). This then works as expected.Checklist
pip check
passes without errorspip freeze
resultspip freeze results (really
conda env export
but same thing)Environment:
The text was updated successfully, but these errors were encountered: