(cls)
| 27 | ''' |
| 28 | @classmethod |
| 29 | def setUpClass(cls): |
| 30 | # start our own server |
| 31 | cls.srv_crypto = Server() |
| 32 | cls.uri_crypto = 'opc.tcp://127.0.0.1:{0:d}'.format(port_num1) |
| 33 | cls.srv_crypto.set_endpoint(cls.uri_crypto) |
| 34 | # load server certificate and private key. This enables endpoints |
| 35 | # with signing and encryption. |
| 36 | cls.srv_crypto.load_certificate("examples/certificate-example.der") |
| 37 | cls.srv_crypto.load_private_key("examples/private-key-example.pem") |
| 38 | cls.srv_crypto.start() |
| 39 | |
| 40 | # start a server without crypto |
| 41 | cls.srv_no_crypto = Server() |
| 42 | cls.uri_no_crypto = 'opc.tcp://127.0.0.1:{0:d}'.format(port_num2) |
| 43 | cls.srv_no_crypto.set_endpoint(cls.uri_no_crypto) |
| 44 | cls.srv_no_crypto.start() |
| 45 | |
| 46 | # start server with long key |
| 47 | cls.srv_crypto2 = Server() |
| 48 | cls.uri_crypto2 = 'opc.tcp://127.0.0.1:{0:d}'.format(port_num3) |
| 49 | cls.srv_crypto2.set_endpoint(cls.uri_crypto2) |
| 50 | cls.srv_crypto2.load_certificate("examples/certificate-3072-example.der") |
| 51 | cls.srv_crypto2.load_private_key("examples/private-key-3072-example.pem") |
| 52 | cls.srv_crypto2.start() |
| 53 | |
| 54 | @classmethod |
| 55 | def tearDownClass(cls): |
nothing calls this directly
no test coverage detected