Commit b1f4f67b authored by olivier R-D's avatar olivier R-D

fix dependencies on travis

parent 5b15afd3
...@@ -5,6 +5,7 @@ python: ...@@ -5,6 +5,7 @@ python:
- "pypy" - "pypy"
# command to install dependencies # command to install dependencies
install: install:
- pip install cryptography
- if [[ $TRAVIS_PYTHON_VERSION == '2.7' ]]; then pip install futures ; fi - if [[ $TRAVIS_PYTHON_VERSION == '2.7' ]]; then pip install futures ; fi
- if [[ $TRAVIS_PYTHON_VERSION == '2.7' ]]; then pip install trollius ; fi - if [[ $TRAVIS_PYTHON_VERSION == '2.7' ]]; then pip install trollius ; fi
- if [[ $TRAVIS_PYTHON_VERSION == '2.7' ]]; then pip install enum34 ; fi - if [[ $TRAVIS_PYTHON_VERSION == '2.7' ]]; then pip install enum34 ; fi
......
...@@ -14,7 +14,7 @@ use_crypto = True ...@@ -14,7 +14,7 @@ use_crypto = True
try: try:
from opcua import uacrypto from opcua import uacrypto
except: except:
print("pycrypto is not installed, use of crypto disabled") print("cryptography is not installed, use of crypto disabled")
use_crypto = False use_crypto = False
...@@ -254,7 +254,6 @@ class Client(object): ...@@ -254,7 +254,6 @@ class Client(object):
params.SessionName = self.description + " Session" + str(self._session_counter) params.SessionName = self.description + " Session" + str(self._session_counter)
params.RequestedSessionTimeout = 3600000 params.RequestedSessionTimeout = 3600000
params.MaxResponseMessageSize = 0 # means no max size params.MaxResponseMessageSize = 0 # means no max size
params.ClientCertificate = uacrypto.der_from_x509(self.client_certificate)
response = self.bclient.create_session(params) response = self.bclient.create_session(params)
self.security_policy.asymmetric_cryptography.verify(self.security_policy.client_certificate + nonce, response.ServerSignature.Signature) self.security_policy.asymmetric_cryptography.verify(self.security_policy.client_certificate + nonce, response.ServerSignature.Signature)
self._server_nonce = response.ServerNonce self._server_nonce = response.ServerNonce
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment