Skip to content

Commit

Permalink
Remove Gemalto card support
Browse files Browse the repository at this point in the history
IB-7847

Signed-off-by: Raul Metsma <[email protected]>
  • Loading branch information
metsma committed Mar 1, 2024
1 parent fb81c88 commit c13354b
Show file tree
Hide file tree
Showing 29 changed files with 290 additions and 688 deletions.
9 changes: 4 additions & 5 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ jobs:
run: apt update -qq && apt install --no-install-recommends -y git lsb-release fakeroot build-essential devscripts debhelper pkg-config cmake libldap2-dev gettext libpcsclite-dev libssl-dev libqt5svg5-dev qttools5-dev-tools qttools5-dev lintian libflatbuffers-dev zlib1g-dev
- name: Install dependencies
if: matrix.container != 'ubuntu:20.04'
run: apt update -qq && apt install --no-install-recommends -y git lsb-release fakeroot build-essential devscripts debhelper pkg-config cmake libldap2-dev gettext libpcsclite-dev libssl-dev libgl-dev libqt6svg6-dev qt6-tools-dev qt6-tools-dev-tools qt6-l10n-tools libqt6core5compat6-dev lintian libflatbuffers-dev zlib1g-dev
run: apt update -qq && apt install --no-install-recommends -y git lsb-release fakeroot build-essential devscripts debhelper pkg-config cmake libldap2-dev gettext libpcsclite-dev libssl-dev libgl-dev libqt6svg6-dev qt6-tools-dev qt6-tools-dev-tools qt6-l10n-tools lintian libflatbuffers-dev zlib1g-dev
- name: Checkout
uses: actions/checkout@v4
with:
Expand Down Expand Up @@ -109,7 +109,7 @@ jobs:
- name: Install Deps
run: |
dnf install -y --setopt=install_weak_deps=False \
git gcc-c++ cmake rpm-build gettext openssl-devel openldap-devel pcsc-lite-devel qt6-qtsvg-devel qt6-qttools-devel qt6-qt5compat-devel flatbuffers-devel flatbuffers-compiler zlib-devel
git gcc-c++ cmake rpm-build gettext openssl-devel openldap-devel pcsc-lite-devel qt6-qtsvg-devel qt6-qttools-devel flatbuffers-devel flatbuffers-compiler zlib-devel
- name: Install CMake
if: matrix.container == 'fedora:39'
run: |
Expand Down Expand Up @@ -182,7 +182,6 @@ jobs:
with:
version: 6.6.1
arch: win64_msvc2019_64
modules: qt5compat
- name: Setup dev env
uses: ilammy/msvc-dev-cmd@v1
with:
Expand Down Expand Up @@ -218,7 +217,7 @@ jobs:
with:
submodules: recursive
- name: Install dependencies
run: sudo apt update -qq && sudo apt install --no-install-recommends -y cmake libldap2-dev gettext libpcsclite-dev libminizip-dev libxml-security-c-dev libgl-dev libqt6svg6-dev qt6-tools-dev qt6-tools-dev-tools qt6-l10n-tools libqt6core5compat6-dev libflatbuffers-dev zlib1g-dev
run: sudo apt update -qq && sudo apt install --no-install-recommends -y cmake libldap2-dev gettext libpcsclite-dev libminizip-dev libxml-security-c-dev libgl-dev libqt6svg6-dev qt6-tools-dev qt6-tools-dev-tools qt6-l10n-tools libflatbuffers-dev zlib1g-dev
- name: Download artifact
uses: dawidd6/action-download-artifact@v2
with:
Expand Down Expand Up @@ -262,7 +261,7 @@ jobs:
with:
submodules: recursive
- name: Install dependencies
run: sudo apt update -qq && sudo apt install --no-install-recommends -y cmake libldap2-dev gettext libpcsclite-dev libminizip-dev libxml-security-c-dev libgl-dev libqt6svg6-dev qt6-tools-dev qt6-tools-dev-tools qt6-l10n-tools libqt6core5compat6-dev libflatbuffers-dev zlib1g-dev
run: sudo apt update -qq && sudo apt install --no-install-recommends -y cmake libldap2-dev gettext libpcsclite-dev libminizip-dev libxml-security-c-dev libgl-dev libqt6svg6-dev qt6-tools-dev qt6-tools-dev-tools qt6-l10n-tools libflatbuffers-dev zlib1g-dev
- name: Download artifact
uses: dawidd6/action-download-artifact@v2
with:
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,9 @@
* Install

# Ubuntu
sudo apt install cmake qt6-tools-dev libqt6core5compat6-dev libqt6svg6-dev libpcsclite-dev libssl-dev libdigidocpp-dev libldap2-dev gettext pkg-config libflatbuffers-dev zlib1g-dev
sudo apt install cmake qt6-tools-dev libqt6svg6-dev libpcsclite-dev libssl-dev libdigidocpp-dev libldap2-dev gettext pkg-config libflatbuffers-dev zlib1g-dev
# Fedora
sudo dnf install qt6-qtsvg-devel qt6-qttools-devel qt6-qt5compat-devel pcsc-lite-devel openssl-devel libdigidocpp openldap-devel gettext pkg-config flatbuffers-devel flatbuffers-compiler
sudo dnf install qt6-qtsvg-devel qt6-qttools-devel pcsc-lite-devel openssl-devel libdigidocpp openldap-devel gettext pkg-config flatbuffers-devel flatbuffers-compiler

* Also runtime dependency opensc-pkcs11 and pcscd is needed

Expand Down
5 changes: 3 additions & 2 deletions client/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
add_executable( TSLDownload TSLDownload.cpp )
target_link_libraries(TSLDownload Qt${QT_VERSION_MAJOR}::Network)
set_target_properties(TSLDownload PROPERTIES AUTOMOC OFF)
get_target_property(qtCore_install_prefix Qt${QT_VERSION_MAJOR}::qmake IMPORTED_LOCATION)
get_filename_component(qtCore_install_prefix ${qtCore_install_prefix} DIRECTORY)
add_custom_command(
Expand Down Expand Up @@ -102,8 +103,8 @@ if(NOT BUILD_DATE)
endif()

if(${QT_VERSION_MAJOR} STREQUAL "6")
find_package(Qt6 COMPONENTS Core5Compat SvgWidgets REQUIRED)
target_link_libraries(${PROJECT_NAME} Qt6::Core5Compat Qt6::SvgWidgets)
find_package(Qt6 COMPONENTS SvgWidgets REQUIRED)
target_link_libraries(${PROJECT_NAME} Qt6::SvgWidgets)
endif()

set_target_properties(${PROJECT_NAME} PROPERTIES
Expand Down
7 changes: 0 additions & 7 deletions client/CryptoDoc.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -226,14 +226,7 @@ CKey::CKey(const QSslCertificate &c)
QString sn = c.subjectInfo("SN");
if(!gn.isEmpty() || !sn.isEmpty())
cn = QStringLiteral("%1 %2 %3").arg(gn, sn, c.personalCode());
QString o = c.subjectInfo(QSslCertificate::Organization);

static const QRegularExpression rx(QStringLiteral("ESTEID \\((.*)\\)"));
QRegularExpressionMatch match = rx.match(o);
if(match.hasMatch())
return QStringLiteral("%1 %2").arg(cn, match.captured(1));
if(o == QLatin1String("ESTEID"))
return QStringLiteral("%1 %2").arg(cn, CryptoDoc::tr("ID-CARD"));
int certType = c.type();
if(certType & SslCertificate::EResidentSubType)
return QStringLiteral("%1 %2").arg(cn, CryptoDoc::tr("Digi-ID E-RESIDENT"));
Expand Down
26 changes: 1 addition & 25 deletions client/Diagnostics.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -129,31 +129,7 @@ void Diagnostics::generalInfo(QTextStream &s)
s << "<br />";
return r;
};
if(printAID(QStringLiteral("AID35"), APDU("00A40400 0F D23300000045737445494420763335")) ||
printAID(QStringLiteral("UPDATER_AID"), APDU("00A40400 0A D2330000005550443101")))
{
reader.transfer(APDU("00A4000C"));
reader.transfer(APDU("00A4010C 02 EEEE"));
reader.transfer(APDU("00A4020C 02 5044"));
QByteArray row = APDU("00B20004 00");
row[2] = 0x07; // read card id
s << "ID - " << reader.transfer(row).data << "<br />";

QString appletVersion;
if(QPCSCReader::Result data = reader.transfer(APDU("00CA0100 00")))
{
for(int i = 0; i < data.data.size(); ++i)
{
if(i == 0)
appletVersion = QString::number(quint8(data.data[i]));
else
appletVersion += QStringLiteral(".%1").arg(quint8(data.data[i]));
}
}
if(!appletVersion.isEmpty())
s << tr("Applet version") << ": " << appletVersion << "<br />";
}
else if(printAID(QStringLiteral("AID_IDEMIA"), APDU("00A40400 10 A000000077010800070000FE00000100")) ||
if(printAID(QStringLiteral("AID_IDEMIA"), APDU("00A40400 10 A000000077010800070000FE00000100")) ||
printAID(QStringLiteral("AID_OT"), APDU("00A4040C 0D E828BD080FF2504F5420415750")) ||
printAID(QStringLiteral("AID_QSCD"), APDU("00A4040C 10 51534344204170706C69636174696F6E")))
{
Expand Down
3 changes: 1 addition & 2 deletions client/MainWindow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
#include "PrintSheet.h"
#include "QPCSC.h"
#include "QSigner.h"
#include "Settings.h"
#include "SslCertificate.h"
#include "Styles.h"
#include "TokenData.h"
#include "effects/ButtonHoverFilter.h"
Expand All @@ -43,7 +43,6 @@
#include "dialogs/WarningDialog.h"
#include "widgets/DropdownButton.h"
#include "widgets/CardPopup.h"
#include "widgets/VerifyCert.h"
#include "widgets/WarningItem.h"
#include "widgets/WarningList.h"

Expand Down
Loading

0 comments on commit c13354b

Please sign in to comment.