I'm hoping someone might be able to help me. I have a client that has a website running Python 2.7.5+ (according to python -V). It's an ecommerce site that also uses the eWay payment gateway. They recently made some changes to only support TLS1.2 https://www.eway.com.au/tls-updates.
However, when a customer goes through the checkout it shows a denied message from the eWay payment gateway. eWay say that this is because the transaction is still not coming through as TLS1.2.
I have upgraded the Amazon EC2 instance and modified the apache .conf file so that it only supports TLS1.2 and i have verified this by checking the site through an SSL test with https://www.ssllabs.com/ssltest/.
Therefore, I believe the issue may be due to the pyOpenSSL package being on a version that doesn't support TLS1.2. It's apparently on version 0.13: pyOpenSSL==0.13.
I was wondering if someone might be able to help confirm or disprove my theory (I know this may be difficult with not having access to the server) and perhaps provide some pointers.
I have tried upgrading pyOpenSSL using the command pip install –upgrade pyopenssl==0.15.1
but I got the following error;
Exception:
Traceback (most recent call last):
File "/usr/local/lib/python2.7/dist-packages/pip-1.5.2-py2.7.egg/pip/basecommand.py", line 122, in main
status = self.run(options, args)
File "/usr/local/lib/python2.7/dist-packages/pip-1.5.2-py2.7.egg/pip/commands/install.py", line 253, in run
InstallRequirement.from_line(name, None))
File "/usr/local/lib/python2.7/dist-packages/pip-1.5.2-py2.7.egg/pip/req.py", line 172, in from_line
return cls(req, comes_from, url=url, prereleases=prereleases)
File "/usr/local/lib/python2.7/dist-packages/pip-1.5.2-py2.7.egg/pip/req.py", line 70, in __init__
req = pkg_resources.Requirement.parse(req)
File "/usr/local/lib/python2.7/dist-packages/pip-1.5.2-py2.7.egg/pip/_vendor/pkg_resources.py", line 2606, in parse
reqs = list(parse_requirements(s))
File "/usr/local/lib/python2.7/dist-packages/pip-1.5.2-py2.7.egg/pip/_vendor/pkg_resources.py", line 2532, in parse_requirements
raise ValueError("Missing distribution spec", line)
ValueError: ('Missing distribution spec', '\xe2\x80\x93upgrade')
Storing debug log for failure in /tmp/tmpYIkpzp
Again, i'm really not familiar with python at all so I would be really grateful for any support. I can't find anything in the website code itself that's specifically trying to force an earlier version of TLS.
There's a settings.py that contains the eway api credentials (removed but to show where these values come from) https://gist.github.com/neilbradley/7b08d1bf6ac0cb9643343c7c1d362f2a.
There's a payment.py for the payment gateway https://gist.github.com/neilbradley/b5b7d0621065f08a2abf7703bced9ee0.
There's a forms.py that handles all forms on the site https://gist.github.com/neilbradley/e9e7c61fb39f6b8d55b2bc17822f3935 and you can see a class PaymentForm
Thank you.