aboutsummaryrefslogtreecommitdiffstats
path: root/config/server_register.conf
diff options
context:
space:
mode:
authorThomas Vanbesien <tvanbesi@proton.me>2026-02-17 11:07:37 +0100
committerThomas Vanbesien <tvanbesi@proton.me>2026-02-17 11:07:37 +0100
commita54421dd976fd8081e96c11c2621076876c9986b (patch)
treea7614934364bc692dd94ee13a3ec6d242521194b /config/server_register.conf
parentd1e229c80a6e51ccc5b21d001271c41d6cda30bf (diff)
downloadBobinkCOpcUa-a54421dd976fd8081e96c11c2621076876c9986b.tar.gz
BobinkCOpcUa-a54421dd976fd8081e96c11c2621076876c9986b.zip
Replace CLI arguments with config-file parser and add integration tests
Introduce a reusable key=value config parser (config.h/c) and convert all three programs to read their settings from config files instead of positional command-line arguments. Add example config files in config/ and 6 CTest integration tests covering None/Basic256Sha256/Aes128 with anonymous and user authentication. Remove the now-obsolete launch.sh.
Diffstat (limited to 'config/server_register.conf')
-rw-r--r--config/server_register.conf47
1 files changed, 47 insertions, 0 deletions
diff --git a/config/server_register.conf b/config/server_register.conf
new file mode 100644
index 0000000..3c905a5
--- /dev/null
+++ b/config/server_register.conf
@@ -0,0 +1,47 @@
+# ServerRegister configuration
+#
+# Keys:
+# port Server port number
+# applicationUri OPC UA application URI
+# serverCertificate Path to server certificate (.der)
+# serverPrivateKey Path to server private key (.der)
+# clientCertificate Path to client certificate for LDS connection (.der)
+# clientPrivateKey Path to client private key for LDS connection (.der)
+# discoveryEndpoint LDS endpoint URL (e.g. opc.tcp://localhost:4840)
+# registerInterval Seconds between re-registrations with the LDS
+# securityMode None, Sign, or SignAndEncrypt
+# securityPolicy None, Basic256Sha256, Aes256_Sha256_RsaPss,
+# Aes128_Sha256_RsaOaep, or ECC_nistP256
+# serverAuthMode Auth mode for clients connecting to this server:
+# "anonymous" or "user"
+# serverUsername Username (required when serverAuthMode = user)
+# serverPassword Password (required when serverAuthMode = user)
+# clientAuthMode Auth mode for connecting to the LDS:
+# "anonymous" or "user"
+# clientUsername Username (required when clientAuthMode = user)
+# clientPassword Password (required when clientAuthMode = user)
+# trustList Trusted certificate path (repeat for multiple)
+
+port = 4841
+applicationUri = urn:bobink.ServerRegister
+serverCertificate = certs/ServerRegister_cert.der
+serverPrivateKey = certs/ServerRegister_key.der
+clientCertificate = certs/ServerRegisterClient_cert.der
+clientPrivateKey = certs/ServerRegisterClient_key.der
+
+discoveryEndpoint = opc.tcp://localhost:4840
+registerInterval = 10
+
+securityMode = SignAndEncrypt
+securityPolicy = Aes128_Sha256_RsaOaep
+
+serverAuthMode = user
+serverUsername = user
+serverPassword = password
+
+clientAuthMode = user
+clientUsername = user
+clientPassword = password
+
+trustList = certs/ServerLDS_cert.der
+trustList = certs/ClientFindServers_cert.der