summaryrefslogtreecommitdiffstats
path: root/src/BobinkClient.h
diff options
context:
space:
mode:
authorThomas Vanbesien <tvanbesi@proton.me>2026-02-18 12:03:16 +0100
committerThomas Vanbesien <tvanbesi@proton.me>2026-02-18 12:03:16 +0100
commit23916cbb98e952aab752a647ac96020aab709bb6 (patch)
tree81fc9b5e551300ab348b48fa6bffbc5fddf2c95a /src/BobinkClient.h
parent1a79ab468d8cc23cfdf28ddfa85d3e03ffddf44c (diff)
downloadBobinkQtOpcUa-23916cbb98e952aab752a647ac96020aab709bb6.tar.gz
BobinkQtOpcUa-23916cbb98e952aab752a647ac96020aab709bb6.zip
Add direct connect, auto-detect PKI, and rework demo flow
- connectDirect(policy, mode): connect without endpoint discovery, for servers with no unencrypted endpoint. Sets user identity token policy matching the auth mode. - autoDetectPki(): scan own/certs/*.der and own/private/*.pem|crt, called automatically at startup. - Demo: discovery auto-starts, PKI section hidden behind toggle with auto-detected cert summary, direct connect appears on connect failure. File/folder dialogs for manual PKI override.
Diffstat (limited to 'src/BobinkClient.h')
-rw-r--r--src/BobinkClient.h20
1 files changed, 20 insertions, 0 deletions
diff --git a/src/BobinkClient.h b/src/BobinkClient.h
index f95ab02..43eda65 100644
--- a/src/BobinkClient.h
+++ b/src/BobinkClient.h
@@ -88,8 +88,26 @@ public:
QString keyFile () const;
void setKeyFile (const QString &path);
+ enum SecurityMode
+ {
+ SignAndEncrypt = 3,
+ Sign = 2,
+ None = 1,
+ };
+ Q_ENUM (SecurityMode)
+
+ enum SecurityPolicy
+ {
+ Basic256Sha256,
+ Aes128_Sha256_RsaOaep,
+ Aes256_Sha256_RsaPss,
+ };
+ Q_ENUM (SecurityPolicy)
+
/** @brief Discover endpoints, pick the most secure, connect. */
Q_INVOKABLE void connectToServer ();
+ /** @brief Connect directly without endpoint discovery. */
+ Q_INVOKABLE void connectDirect (SecurityPolicy policy, SecurityMode mode);
Q_INVOKABLE void disconnectFromServer ();
/** @brief Accept the pending server certificate. */
@@ -100,6 +118,8 @@ public:
Q_INVOKABLE void startDiscovery ();
Q_INVOKABLE void stopDiscovery ();
+ /** @brief Auto-detect cert/key from the PKI directory and apply. */
+ Q_INVOKABLE void autoDetectPki ();
/** @brief Apply PKI dirs and cert/key. Call before connecting. */
Q_INVOKABLE void applyPki ();