Skip to content
Snippets Groups Projects
Commit f6caf699 authored by Robert Habermann's avatar Robert Habermann
Browse files

Merge branch 'tls-client-auth' into 'master'

add client_auth_cert to Client

See merge request rhab/PyOTRS!19
parents 8f243e34 25283acd
No related branches found
No related tags found
No related merge requests found
......@@ -14,12 +14,6 @@ py27:
script:
- tox -e py27
py34:
stage: test
image: python:3.4
script:
- tox -e py34
py35:
stage: test
image: python:3.5
......@@ -38,14 +32,20 @@ py37:
script:
- tox -e py37
py38:
stage: test
image: python:3.8
script:
- tox -e py38
pep8:
image: python:3.5
image: python:3.6
stage: style
script:
- tox -e pep8
wheel:
image: python:3.5
image: python:3.6
stage: package
script:
tox -e wheel
......@@ -54,7 +54,7 @@ wheel:
- dist/
sdist:
image: python:3.5
image: python:3.6
stage: package
script:
tox -e sdist
......
......@@ -17,6 +17,11 @@ This project adheres to [Semantic Versioning](http://semver.org/).
--------------------------------
- fix #18: Attachment.create_from_file did not decode "Content"
0.4.2 - 2020-03-12
------------------
- add: client_auth_cert to Client
- remove: Python3.4 checks (colorama no longer works on py34)
0.4.1 - 2019-03-09 - Beta
-------------------------
- This has been in "alpha" way too long now marked as Beta
......
......@@ -866,6 +866,8 @@ class Client(object):
https_verify (bool): Should HTTPS certificates be verified (defaults to True)
ca_cert_bundle (str): file path - if specified overrides python/system default for
Root CA bundle that will be used.
client_auth_cert (str): file path containing both certificate and key (unencrypted) in
PEM format to use for TLS client authentication (passed to requests as "cert")
user_agent (str): optional HTTP UserAgent string
webservice_path (str): OTRS REST Web Service Path part - defaults to
"/otrs/nph-genericinterface.pl/Webservice/"
......@@ -884,6 +886,7 @@ class Client(object):
proxies=None,
https_verify=True,
ca_cert_bundle=None,
client_auth_cert=None,
user_agent=None,
webservice_path="/otrs/nph-genericinterface.pl/Webservice/"):
......@@ -949,6 +952,8 @@ class Client(object):
else:
self.https_verify = False
self.client_auth_cert = client_auth_cert
self.user_agent = user_agent
# credentials
......@@ -1884,6 +1889,7 @@ class Client(object):
headers=headers,
data=json_payload,
proxies=self.proxies,
cert=self.client_auth_cert,
verify=self.https_verify)
# store a copy of the request
......
......@@ -4,5 +4,5 @@
# 3) we can import it into your module module
"""
__version_info__ = ('0', '4', '1')
__version_info__ = ('0', '4', '2')
__version__ = '.'.join(__version_info__)
......@@ -60,10 +60,10 @@ setup(
'Programming Language :: Python :: 2.7',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.4',
'Programming Language :: Python :: 3.5',
'Programming Language :: Python :: 3.6',
'Programming Language :: Python :: 3.7',
'Programming Language :: Python :: 3.8',
'Topic :: Documentation :: Sphinx',
],
......
......@@ -6,10 +6,10 @@
envlist =
cov_clean,
py27,
py34,
py35,
py36,
py37,
py38,
cov_combine,
py3kwarn,
pep8,
......@@ -70,7 +70,7 @@ commands =
[testenv:pep8]
basepython =
python3.5
python3.6
deps =
flake8
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment