Skip to content

Commit 699f2d5

Browse files
committed
Updating certificates documentation
1 parent adf29ae commit 699f2d5

File tree

2 files changed

+22
-6
lines changed

2 files changed

+22
-6
lines changed

arango/client.py

+6-4
Original file line numberDiff line numberDiff line change
@@ -79,10 +79,12 @@ class ArangoClient:
7979
:type deserializer: callable
8080
:param verify_override: Override TLS certificate verification. This will
8181
override the verify method of the underlying HTTP client.
82-
None: Do not change the verification behavior of the underlying HTTP client.
83-
True: Verify TLS certificate using the system CA certificates.
84-
False: Do not verify TLS certificate.
85-
str: Path to a custom CA bundle file or directory.
82+
83+
- `None`: Do not change the verification behavior of the
84+
underlying HTTP client.
85+
- `True`: Verify TLS certificate using the system CA certificates.
86+
- `False`: Do not verify TLS certificate.
87+
- `str`: Path to a custom CA bundle file or directory.
8688
:type verify_override: Union[bool, str, None]
8789
:param request_timeout: This is the default request timeout (in seconds)
8890
for http requests issued by the client if the parameter http_client is

docs/certificates.rst

+16-2
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,7 @@ your HTTP client as described in the :ref:`HTTPClients` section.
1717

1818
The ``ArangoClient`` class provides an option to override the verification behavior,
1919
no matter what has been defined in the underlying HTTP session.
20-
You can use this option to disable verification or provide a custom CA bundle without
21-
defining a custom HTTP Client.
20+
You can use this option to disable verification.
2221

2322
.. code-block:: python
2423
@@ -34,3 +33,18 @@ application:
3433
3534
import requests
3635
requests.packages.urllib3.disable_warnings()
36+
37+
You can also provide a custom CA bundle without defining a custom HTTP Client:
38+
39+
.. code-block:: python
40+
41+
client = ArangoClient(hosts="https://localhost:8529", verify_override="path/to/certfile")
42+
43+
If `verify_override` is set to a path to a directory, the directory must have been processed using the `c_rehash` utility
44+
supplied with OpenSSL. For more information, see the `requests documentation <https://requests.readthedocs.io/en/master/user/advanced/#ssl-cert-verification>`_.
45+
46+
Setting `verify_override` to `True` will use the system's default CA bundle.
47+
48+
.. code-block:: python
49+
50+
client = ArangoClient(hosts="https://localhost:8529", verify_override=True)

0 commit comments

Comments
 (0)