Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
O
opcua-asyncio
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Nikola Balog
opcua-asyncio
Commits
33dd4565
Commit
33dd4565
authored
Apr 18, 2016
by
olivier R-D
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update tests to renaming
parent
c7f980ba
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
11 deletions
+11
-11
tests/tests_crypto_connect.py
tests/tests_crypto_connect.py
+11
-11
No files found.
tests/tests_crypto_connect.py
View file @
33dd4565
...
...
@@ -23,8 +23,8 @@ class TestCryptoConnect(unittest.TestCase):
self
.
srv_crypto
.
set_endpoint
(
self
.
uri_crypto
)
# load server certificate and private key. This enables endpoints
# with signing and encryption.
self
.
srv_crypto
.
load_certificate
(
"examples/
example-certificat
e.der"
)
self
.
srv_crypto
.
load_private_key
(
"examples/
example-private-key
.pem"
)
self
.
srv_crypto
.
load_certificate
(
"examples/
certificate-exampl
e.der"
)
self
.
srv_crypto
.
load_private_key
(
"examples/
private-key-example
.pem"
)
self
.
srv_crypto
.
start
()
# start a server without crypto
...
...
@@ -50,12 +50,12 @@ class TestCryptoConnect(unittest.TestCase):
def
test_nocrypto_feil
(
self
):
clt
=
Client
(
self
.
uri_no_crypto
)
with
self
.
assertRaises
(
ua
.
UaError
):
clt
.
set_security_string
(
"Basic256,Sign,examples/
example-certificate.der,examples/example-private-key
.pem"
)
clt
.
set_security_string
(
"Basic256,Sign,examples/
certificate-example.der,examples/private-key-example
.pem"
)
def
test_basic256
(
self
):
clt
=
Client
(
self
.
uri_crypto
)
try
:
clt
.
set_security_string
(
"Basic256,Sign,examples/
example-certificate.der,examples/example-private-key
.pem"
)
clt
.
set_security_string
(
"Basic256,Sign,examples/
certificate-example.der,examples/private-key-example
.pem"
)
clt
.
connect
()
self
.
assertTrue
(
clt
.
get_objects_node
().
get_children
())
finally
:
...
...
@@ -64,7 +64,7 @@ class TestCryptoConnect(unittest.TestCase):
def
test_basic256_encrypt
(
self
):
clt
=
Client
(
self
.
uri_crypto
)
try
:
clt
.
set_security_string
(
"Basic256,SignAndEncrypt,examples/
example-certificate.der,examples/example-private-key
.pem"
)
clt
.
set_security_string
(
"Basic256,SignAndEncrypt,examples/
certificate-example.der,examples/private-key-example
.pem"
)
clt
.
connect
()
self
.
assertTrue
(
clt
.
get_objects_node
().
get_children
())
finally
:
...
...
@@ -73,7 +73,7 @@ class TestCryptoConnect(unittest.TestCase):
def
test_basic128Rsa15
(
self
):
clt
=
Client
(
self
.
uri_crypto
)
try
:
clt
.
set_security_string
(
"Basic128Rsa15,Sign,examples/
example-certificate.der,examples/example-private-key
.pem"
)
clt
.
set_security_string
(
"Basic128Rsa15,Sign,examples/
certificate-example.der,examples/private-key-example
.pem"
)
clt
.
connect
()
self
.
assertTrue
(
clt
.
get_objects_node
().
get_children
())
finally
:
...
...
@@ -82,7 +82,7 @@ class TestCryptoConnect(unittest.TestCase):
def
test_basic128Rsa15_encrypt
(
self
):
clt
=
Client
(
self
.
uri_crypto
)
try
:
clt
.
set_security_string
(
"Basic128Rsa15,SignAndEncrypt,examples/
example-certificate.der,examples/example-private-key
.pem"
)
clt
.
set_security_string
(
"Basic128Rsa15,SignAndEncrypt,examples/
certificate-example.der,examples/private-key-example
.pem"
)
clt
.
connect
()
self
.
assertTrue
(
clt
.
get_objects_node
().
get_children
())
finally
:
...
...
@@ -92,8 +92,8 @@ class TestCryptoConnect(unittest.TestCase):
clt
=
Client
(
self
.
uri_crypto
)
try
:
clt
.
set_security
(
security_policies
.
SecurityPolicyBasic256
,
'examples/
example-certificat
e.der'
,
'examples/
example-private-key
.pem'
,
'examples/
certificate-exampl
e.der'
,
'examples/
private-key-example
.pem'
,
None
,
ua
.
MessageSecurityMode
.
SignAndEncrypt
)
...
...
@@ -107,8 +107,8 @@ class TestCryptoConnect(unittest.TestCase):
clt
=
Client
(
self
.
uri_crypto
)
with
self
.
assertRaises
(
ua
.
UaError
):
clt
.
set_security
(
security_policies
.
SecurityPolicyBasic256
,
'examples/
example-certificat
e.der'
,
'examples/
example-private-key
.pem'
,
'examples/
certificate-exampl
e.der'
,
'examples/
private-key-example
.pem'
,
None
,
ua
.
MessageSecurityMode
.
None_
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment