aboutsummaryrefslogtreecommitdiffstats
path: root/tests/aes128_user
diff options
context:
space:
mode:
authorThomas Vanbesien <tvanbesi@proton.me>2026-02-17 19:06:22 +0100
committerThomas Vanbesien <tvanbesi@proton.me>2026-02-17 19:06:22 +0100
commit827e90e0daabe32e058e08dd2a253425898a7e7a (patch)
treeecd3f31da63890ac029b7929eade88f38e078b3d /tests/aes128_user
parente4ba24b3d24fdce36bc9dbd3c2c8f00b0ec23335 (diff)
downloadBobinkCOpcUa-827e90e0daabe32e058e08dd2a253425898a7e7a.tar.gz
BobinkCOpcUa-827e90e0daabe32e058e08dd2a253425898a7e7a.zip
Replace ClientFindServers with unified Client, use trust store directories
Replace the single-purpose ClientFindServers program with a unified Client that supports three operations via CLI: find-servers, get-endpoints, and read-time. This simplifies the architecture by using one client binary with a single config file instead of a monolithic program that did everything in one run. Split the ServerRegister config into separate server and client config files so the LDS-registration credentials are isolated from the server's own settings. The discovery URL moves from config to a CLI argument. Replace repeated trustList config entries with a single trustStore directory path. Each program now points to a directory under certs/trust/ containing .der files, so adding or removing trust is a file-copy operation rather than editing every config file. Add loadTrustStore()/freeTrustStore() to common.c and remove the now-unused configGetAll() from the config parser. Simplify the test matrix from 6 to 4 cases (security and auth are orthogonal, so the full 3x2 matrix is unnecessary). Update run_test.sh to invoke the new Client three times and use port-polling instead of sleep.
Diffstat (limited to 'tests/aes128_user')
-rw-r--r--tests/aes128_user/client.conf11
-rw-r--r--tests/aes128_user/client_find_servers.conf24
-rw-r--r--tests/aes128_user/server_lds.conf3
-rw-r--r--tests/aes128_user/server_register.conf25
-rw-r--r--tests/aes128_user/server_register_client.conf14
5 files changed, 33 insertions, 44 deletions
diff --git a/tests/aes128_user/client.conf b/tests/aes128_user/client.conf
new file mode 100644
index 0000000..026cd99
--- /dev/null
+++ b/tests/aes128_user/client.conf
@@ -0,0 +1,11 @@
+# Client — test: aes128_user
+
+applicationUri = urn:bobink.ClientFindServers
+certificate = certs/ClientFindServers_cert.der
+privateKey = certs/ClientFindServers_key.der
+securityMode = SignAndEncrypt
+securityPolicy = Aes128_Sha256_RsaOaep
+authMode = user
+username = user
+password = password
+trustStore = certs/trust/client
diff --git a/tests/aes128_user/client_find_servers.conf b/tests/aes128_user/client_find_servers.conf
deleted file mode 100644
index 4ecff56..0000000
--- a/tests/aes128_user/client_find_servers.conf
+++ /dev/null
@@ -1,24 +0,0 @@
-# ClientFindServers — test: aes128_user
-
-discoveryEndpoint = opc.tcp://localhost:14840
-applicationUri = urn:bobink.ClientFindServers
-
-# Discovery (LDS) side
-discoveryCertificate = certs/ClientFindServers_cert.der
-discoveryPrivateKey = certs/ClientFindServers_key.der
-discoverySecurityMode = SignAndEncrypt
-discoverySecurityPolicy = Aes128_Sha256_RsaOaep
-discoveryAuthMode = user
-discoveryUsername = user
-discoveryPassword = password
-discoveryTrustList = certs/ServerLDS_cert.der
-
-# Server side
-serverCertificate = certs/ClientFindServers_cert.der
-serverPrivateKey = certs/ClientFindServers_key.der
-serverSecurityMode = SignAndEncrypt
-serverSecurityPolicy = Aes128_Sha256_RsaOaep
-serverAuthMode = user
-serverUsername = user
-serverPassword = password
-serverTrustList = certs/ServerRegister_cert.der
diff --git a/tests/aes128_user/server_lds.conf b/tests/aes128_user/server_lds.conf
index 484512a..c440ea4 100644
--- a/tests/aes128_user/server_lds.conf
+++ b/tests/aes128_user/server_lds.conf
@@ -10,5 +10,4 @@ authMode = user
username = user
password = password
-trustList = certs/ServerRegisterClient_cert.der
-trustList = certs/ClientFindServers_cert.der
+trustStore = certs/trust/server_lds
diff --git a/tests/aes128_user/server_register.conf b/tests/aes128_user/server_register.conf
index e100129..b0ce271 100644
--- a/tests/aes128_user/server_register.conf
+++ b/tests/aes128_user/server_register.conf
@@ -1,25 +1,14 @@
-# ServerRegister — test: aes128_user
+# ServerRegister server config — test: aes128_user
port = 14841
applicationUri = urn:bobink.ServerRegister
-serverCertificate = certs/ServerRegister_cert.der
-serverPrivateKey = certs/ServerRegister_key.der
-clientCertificate = certs/ServerRegisterClient_cert.der
-clientPrivateKey = certs/ServerRegisterClient_key.der
+certificate = certs/ServerRegister_cert.der
+privateKey = certs/ServerRegister_key.der
-discoveryEndpoint = opc.tcp://localhost:14840
registerInterval = 10
-securityMode = SignAndEncrypt
-securityPolicy = Aes128_Sha256_RsaOaep
+authMode = user
+username = user
+password = password
-serverAuthMode = user
-serverUsername = user
-serverPassword = password
-
-clientAuthMode = user
-clientUsername = user
-clientPassword = password
-
-trustList = certs/ServerLDS_cert.der
-trustList = certs/ClientFindServers_cert.der
+trustStore = certs/trust/server_register
diff --git a/tests/aes128_user/server_register_client.conf b/tests/aes128_user/server_register_client.conf
new file mode 100644
index 0000000..c919f7e
--- /dev/null
+++ b/tests/aes128_user/server_register_client.conf
@@ -0,0 +1,14 @@
+# ServerRegister client config — test: aes128_user
+
+applicationUri = urn:bobink.ServerRegister
+certificate = certs/ServerRegisterClient_cert.der
+privateKey = certs/ServerRegisterClient_key.der
+
+securityMode = SignAndEncrypt
+securityPolicy = Aes128_Sha256_RsaOaep
+
+authMode = user
+username = user
+password = password
+
+trustStore = certs/trust/server_register_client