Skip to content

Commit 5099175

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

File tree

2 files changed

+40
-10
lines changed

2 files changed

+40
-10
lines changed

splunklib/binding.py

Lines changed: 22 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").
@@ -1093,6 +1099,16 @@ def connect(**kwargs):
10931099
:type scheme: "https" or "http"
10941100
:param owner: The owner context of the namespace (the default is "None").
10951101
:type owner: ``string``
1102+
:param verify: Enable (True) or disable (False) SSL verification for https connections.
1103+
:type verify: ``Boolean``
1104+
:param self_signed_certificate: Specifies if self signed certificate is used
1105+
:type self_signed_certificate: ``Boolean``
1106+
:param `key_file`: Path to a PEM-encoded private key.
1107+
:type key_file: ``string``
1108+
:param `cert_file`: Path to a PEM-encoded X509 certificate chain.
1109+
:type cert_file: ``string``
1110+
:param `context`: Custom SSLContext used with the HTTPSConnection, requires verify=True.
1111+
:type context: ``SSLContext``
10961112
:param app: The app context of the namespace (the default is "None").
10971113
:type app: ``string``
10981114
:param sharing: The sharing mode for the namespace (the default is "user").
@@ -1505,16 +1521,16 @@ def handler(key_file=None, cert_file=None, timeout=None, verify=False, context=N
15051521
"""This class returns an instance of the default HTTP request handler using
15061522
the values you provide.
15071523
1508-
:param `key_file`: A path to a PEM (Privacy Enhanced Mail) formatted file containing your private key (optional).
1524+
:param `verify`: Enable (True) or disable (False) SSL verification for https connections.
1525+
:type verify: ``Boolean``
1526+
:param `key_file`: Path to a PEM-encoded private key.
15091527
:type key_file: ``string``
1510-
:param `cert_file`: A path to a PEM (Privacy Enhanced Mail) formatted file containing a certificate chain file (optional).
1528+
:param `cert_file`: Path to a PEM-encoded X509 certificate chain.
15111529
:type cert_file: ``string``
1530+
:param `context`: Custom SSLContext used with the HTTPSConnection, requires verify=True.
1531+
:type context: ``SSLContext``
15121532
:param `timeout`: The request time-out period, in seconds (optional).
15131533
: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`
15181534
"""
15191535

15201536
def connect(scheme, host, port):

splunklib/client.py

Lines changed: 18 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -314,9 +314,16 @@ def connect(**kwargs):
314314
:type port: ``integer``
315315
:param scheme: The scheme for accessing the service (the default is "https").
316316
:type scheme: "https" or "http"
317-
:param verify: Enable (True) or disable (False) SSL verification for
318-
https connections. (optional, the default is True)
317+
:param verify: Enable (True) or disable (False) SSL verification for https connections.
319318
:type verify: ``Boolean``
319+
:param self_signed_certificate: Specifies if self signed certificate is used
320+
:type self_signed_certificate: ``Boolean``
321+
:param `key_file`: Path to a PEM-encoded private key.
322+
:type key_file: ``string``
323+
:param `cert_file`: Path to a PEM-encoded X509 certificate chain.
324+
:type cert_file: ``string``
325+
:param `context`: Custom SSLContext used with the HTTPSConnection, requires verify=True.
326+
:type context: ``SSLContext``
320327
:param `owner`: The owner context of the namespace (optional).
321328
:type owner: ``string``
322329
:param `app`: The app context of the namespace (optional).
@@ -391,9 +398,16 @@ class Service(_BaseService):
391398
:type port: ``integer``
392399
:param scheme: The scheme for accessing the service (the default is "https").
393400
:type scheme: "https" or "http"
394-
:param verify: Enable (True) or disable (False) SSL verification for
395-
https connections. (optional, the default is True)
401+
:param verify: Enable (True) or disable (False) SSL verification for https connections.
396402
:type verify: ``Boolean``
403+
:param self_signed_certificate: Specifies if self signed certificate is used
404+
:type self_signed_certificate: ``Boolean``
405+
:param `key_file`: Path to a PEM-encoded private key.
406+
:type key_file: ``string``
407+
:param `cert_file`: Path to a PEM-encoded X509 certificate chain.
408+
:type cert_file: ``string``
409+
:param `context`: Custom SSLContext used with the HTTPSConnection, requires verify=True.
410+
:type context: ``SSLContext``
397411
:param `owner`: The owner context of the namespace (optional; use "-" for wildcard).
398412
:type owner: ``string``
399413
:param `app`: The app context of the namespace (optional; use "-" for wildcard).

0 commit comments

Comments
 (0)