Skip to content

Commit

Permalink
Don't show timeout message on PIN change cancel (open-eid#1300)
Browse files Browse the repository at this point in the history
IB-7963

Signed-off-by: Raul Metsma <[email protected]>
  • Loading branch information
metsma authored Oct 25, 2024
1 parent e322ed3 commit cd8d216
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 5 deletions.
7 changes: 5 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -185,10 +185,13 @@ jobs:
arch: x64
- name: Install WiX
run: |
dotnet tool install -g wix --version 5.0.0
wix extension -g add WixToolset.UI.wixext/5.0.0
dotnet tool install -g wix --version 5.0.2
wix extension -g add WixToolset.UI.wixext/5.0.2
- name: Build
run: |
if ($env:VCToolsRedistDir -eq $null) {
$env:VCToolsRedistDir = -join ($env:VCINSTALLDIR, "Redist\MSVC\", $env:VCToolsVersion, "\")
}
cmake "-GNinja" -B build -S . -DCMAKE_BUILD_TYPE=RelWithDebInfo `
-DCMAKE_TOOLCHAIN_FILE=${{ env.RUNVCPKG_VCPKG_ROOT }}/scripts/buildsystems/vcpkg.cmake `
"-DLibDigiDocpp_ROOT=libs/PFiles64/libdigidocpp"
Expand Down
3 changes: 2 additions & 1 deletion client/MainWindow_MyEID.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,8 @@ bool MainWindow::validateCardError(QSmartCardData::PinType type, QSmartCardData:
switch( err )
{
case QSmartCard::NoError: return true;
case QSmartCard::CancelError:
case QSmartCard::CancelError: break;
case QSmartCard::TimeoutError:
FadeInNotification::warning(ui->topBar, tr("%1 timeout").arg(QSmartCardData::typeString(type)));
break;
case QSmartCard::BlockedError:
Expand Down
2 changes: 1 addition & 1 deletion client/QSmartCard.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -319,7 +319,7 @@ QSmartCard::ErrorType QSmartCard::Private::handlePinResult(QPCSCReader *reader,
case 0x63C1: // Validate error, 1 tries left
case 0x63C2: // Validate error, 2 tries left
case 0x63C3: return QSmartCard::ValidateError;
case 0x6400: // Timeout (SCM)
case 0x6400: return QSmartCard::TimeoutError; // Timeout (SCM)
case 0x6401: return QSmartCard::CancelError; // Cancel (OK, SCM)
case 0x6402: return QSmartCard::DifferentError;
case 0x6403: return QSmartCard::LenghtError;
Expand Down
3 changes: 2 additions & 1 deletion client/QSmartCard.h
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ class QSmartCardData
DocumentId = 7,
Expiry = 8,
};
enum PinType : char
enum PinType : quint8
{
Pin1Type = 1,
Pin2Type,
Expand Down Expand Up @@ -89,6 +89,7 @@ class QSmartCard final: public QObject
NoError,
UnknownError,
BlockedError,
TimeoutError,
CancelError,
DifferentError,
LenghtError,
Expand Down

0 comments on commit cd8d216

Please sign in to comment.