Skip to content

Commit c94e392

Browse files
committed
Document key_file, cert_file, context params.
1 parent c710f47 commit c94e392

File tree

2 files changed

+13
-6
lines changed

2 files changed

+13
-6
lines changed

splunklib/binding.py

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -484,6 +484,12 @@ class Context:
484484
:type verify: ``Boolean``
485485
:param self_signed_certificate: Specifies if self signed certificate is used
486486
:type self_signed_certificate: ``Boolean``
487+
:param `key_file`: Path to a PEM-encoded private key.
488+
:type key_file: ``string``
489+
:param `cert_file`: Path to a PEM-encoded X509 certificate chain.
490+
:type cert_file: ``string``
491+
:param `context`: Custom SSLContext used with the HTTPSConnection, requires verify=True.
492+
:type context: ``SSLContext``
487493
:param sharing: The sharing mode for the namespace (the default is "user").
488494
:type sharing: "global", "system", "app", or "user"
489495
:param owner: The owner context of the namespace (optional, the default is "None").
@@ -1505,16 +1511,16 @@ def handler(key_file=None, cert_file=None, timeout=None, verify=False, context=N
15051511
"""This class returns an instance of the default HTTP request handler using
15061512
the values you provide.
15071513
1508-
:param `key_file`: A path to a PEM (Privacy Enhanced Mail) formatted file containing your private key (optional).
1514+
:param `verify`: Set to False to disable SSL verification on https connections.
1515+
:type verify: ``Boolean``
1516+
:param `key_file`: Path to a PEM-encoded private key.
15091517
:type key_file: ``string``
1510-
:param `cert_file`: A path to a PEM (Privacy Enhanced Mail) formatted file containing a certificate chain file (optional).
1518+
:param `cert_file`: Path to a PEM-encoded X509 certificate chain.
15111519
:type cert_file: ``string``
1520+
:param `context`: Custom SSLContext used with the HTTPSConnection, requires verify=True.
1521+
:type context: ``SSLContext``
15121522
:param `timeout`: The request time-out period, in seconds (optional).
15131523
:type timeout: ``integer`` or "None"
1514-
:param `verify`: Set to False to disable SSL verification on https connections.
1515-
:type verify: ``Boolean``
1516-
:param `context`: The SSLContext that can is used with the HTTPSConnection when verify=True is enabled and context is specified
1517-
:type context: ``SSLContext`
15181524
"""
15191525

15201526
def connect(scheme, host, port):

tests/integration/test_binding.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -882,6 +882,7 @@ def test_connect_with_preexisting_token_sans_user_and_pass(self):
882882
self.assertEqual(response.status, 200)
883883

884884
socket = newContext.connect()
885+
885886
socket.write(
886887
(
887888
f"POST {self.context._abspath('some/path/to/post/to')} HTTP/1.1\r\n"

0 commit comments

Comments
 (0)