From f3beb1624c24012c246d17a40c4e10c1c6b3b5b5 Mon Sep 17 00:00:00 2001 From: Thomas Vanbesien Date: Tue, 31 Mar 2026 17:44:35 +0200 Subject: Add passphrase-protected private key support Wire up QOpcUaClient::passwordForPrivateKeyRequired to a QML dialog, mirroring the existing certificate trust flow (local QEventLoop + 30s timeout). --- demo/Main.qml | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'demo/Main.qml') diff --git a/demo/Main.qml b/demo/Main.qml index 908dcbd..f0f3674 100644 --- a/demo/Main.qml +++ b/demo/Main.qml @@ -44,6 +44,13 @@ ApplicationWindow { debugConsole.appendLog("Discovering: " + Bobink.discovering); } + function onPrivateKeyPasswordRequired(keyFilePath, + previousTryWasInvalid) { + keyPasswordDialog.keyFilePath = keyFilePath; + keyPasswordDialog.previousTryWasInvalid = previousTryWasInvalid; + keyPasswordDialog.open(); + } + function onServersChanged() { debugConsole.appendLog("Discovered server list updated"); } @@ -60,6 +67,11 @@ ApplicationWindow { } + KeyPasswordDialog { + id: keyPasswordDialog + + } + ColumnLayout { anchors.fill: parent spacing: 0 -- cgit v1.2.3