Commit graph

4 commits

Author SHA1 Message Date
Sebastien Awwad
ec27630a48
minor: PR tweaks based on review: doc, casing, typos, updates
- two reversions to unnecessary changes
- some typo fixes
- capitalization of HTTP/S where reasonable
- commenting out code section with ''' rather than #

Signed-off-by: Sebastien Awwad <sebastien.awwad@gmail.com>
2018-10-02 15:01:38 -04:00
Sebastien Awwad
2b97c0e59c
Test: adjust proxy_server.py argument handling:
- if it is provided, don't require the certificate filename to be
  provided as an absolute path
- raise an error if the provided certificate filename does not
  point to an existing file, rather than just printing and
  ignoring (to avoid possible future diagnostic headaches)

Signed-off-by: Sebastien Awwad <sebastien.awwad@gmail.com>
2018-09-26 13:10:17 -04:00
Sebastien Awwad
d69f9a2160
Test: changed target server cert checking in test proxy script
Added Python version checking and changed behavior
in Python2.7.9+ to use custom certificate for target server
inherited from command line argument.

In Python versions < 2.7.9, proxy_server.py does not perform certificate
validation of the target server. As that is not part of what the current
tests using this script require, that is currently OK. In Python
versions > 2.7.9 (SSLContext was added in 2.7.9), the same code actually does
check the certificate, using the system's trusted CAs. As a result, since we
are using custom certificates, we need to either disable certificate
checking in 2.7.9 or load the specific CA for target test server, using the
SSLContext and create_default_context functionality also added in 2.7.9. It
is easier to do the latter, so the behavior in 2.7.9+ is to check the cert
and below 2.7.9 is not to. Note that we do not support Python < 2.7.
SSLContext is also available in all Python3 versions that we support.

Signed-off-by: Sebastien Awwad <sebastien.awwad@gmail.com>
2018-09-26 12:46:14 -04:00
Sebastien Awwad
e5a50a6831
Test: rename proxy2.py as proxy_server.py
(from the original name in the source repository to a more useful
name here).

Signed-off-by: Sebastien Awwad <sebastien.awwad@gmail.com>
2018-09-25 15:36:43 -04:00
Renamed from tests/proxy2.py (Browse further)