diff --git a/AUTHORS b/AUTHORS index 9cf096150..69da8312e 100644 --- a/AUTHORS +++ b/AUTHORS @@ -1,4 +1,4 @@ -Copyright (c) 2014-2016 Governikus GmbH & Co. KG +Copyright (c) 2014-2018 Governikus GmbH & Co. KG Authors @@ -10,6 +10,7 @@ Ingo Weinhold Giorgio Busatto Jan Murawski Lars Schmertmann +Jens Trillmann diff --git a/CMakeLists.txt b/CMakeLists.txt index 13178efe1..075b67412 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -33,7 +33,7 @@ ELSE() ENDIF() -PROJECT(AusweisApp2 VERSION 1.14.0 LANGUAGES ${LANGUAGES}) +PROJECT(AusweisApp2 VERSION 1.14.1 LANGUAGES ${LANGUAGES}) # Set TWEAK if not defined in PROJECT_VERSION above to # have a valid tweak version without propagating it diff --git a/LICENSE.officially.txt b/LICENSE.officially.txt index 0990aa8f4..cdbc575d9 100644 --- a/LICENSE.officially.txt +++ b/LICENSE.officially.txt @@ -8,7 +8,7 @@ Bitte lesen Sie zunächst die Allgemeinen Geschäftsbedingungen so wie die Lizen Allgemeine Geschäftsbedingungen § 1 Nutzungsbedingungen und Datenschutzhinweis -(1) Diese Allgemeine Geschäftsbedingungen (AGB) des Bundes, vertreten durch das Bundesministerium des Innern (nachfolgend "Bund") und dem Nutzer gelten für die Überlassung und Nutzung der Software AusweisApp2 (nachfolgend AusweisApp2) und deren neue Versionen, die auf der Grundlage dieser Bedingungen überlassen werden. +(1) Diese Allgemeine Geschäftsbedingungen (AGB) des Bundes, vertreten durch das Bundesministerium des Innern, für Bau und Heimat (nachfolgend "Bund") und dem Nutzer gelten für die Überlassung und Nutzung der Software AusweisApp2 (nachfolgend AusweisApp2) und deren neue Versionen, die auf der Grundlage dieser Bedingungen überlassen werden. (2) "Nutzer" im Sinne dieses Vertrages sind natürliche Personen. § 2 Vertragsgegenstand und Unentgeltlichkeit diff --git a/cmake/Appcast.cmake b/cmake/Appcast.cmake index 32e089ab6..e2f4b4240 100644 --- a/cmake/Appcast.cmake +++ b/cmake/Appcast.cmake @@ -18,7 +18,7 @@ IF(MAC OR LINUX OR WIN32) ENDIF() MESSAGE(STATUS "Processing: ${file}") - IF(NOT "${_system}" STREQUAL "SOURCES") + IF(NOT "${_system}" STREQUAL "src") FILE(READ ${PACKAGING_DIR}/updater/Appcast.item.json.in item) STRING(REPLACE "AusweisApp2-" "" APPCAST_FILE_VERSION ${file}) diff --git a/cmake/CompilerFlags.cmake b/cmake/CompilerFlags.cmake index 5c30804d2..9896ef536 100644 --- a/cmake/CompilerFlags.cmake +++ b/cmake/CompilerFlags.cmake @@ -26,6 +26,7 @@ IF(MSVC) IF(WARNINGS_ARE_ERRORS) SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /WX") ENDIF() + ADD_FLAG(/Qspectre) ELSE() ADD_DEFINITIONS(-DQT_STRICT_ITERATORS) @@ -61,9 +62,10 @@ ELSE() IF(ANDROID) + SET(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -Wl,--no-undefined -Wl,--gc-sections -Wl,-z,noexecstack -Wl,-z,relro -Wl,-z,now") SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -ffunction-sections -fdata-sections") IF(CMAKE_COMPILER_IS_GNUCXX) - SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -finline-limit=64 -Wl,--gc-sections -Wl,-z,noexecstack -Wl,-z,relro -Wl,-z,now") + SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -finline-limit=64") ENDIF() SET(CMAKE_CXX_VISIBILITY_PRESET hidden) ENDIF() diff --git a/cmake/Helper.cmake b/cmake/Helper.cmake index 64534f894..3a25513e7 100644 --- a/cmake/Helper.cmake +++ b/cmake/Helper.cmake @@ -54,6 +54,25 @@ FUNCTION(ADD_FLAG) ENDFUNCTION() +FUNCTION(QUERY_QMAKE _out _var) + IF(NOT TARGET Qt5::qmake) + MESSAGE(WARNING "qmake not found") + RETURN() + ENDIF() + + GET_TARGET_PROPERTY(qmake_bin Qt5::qmake LOCATION) + EXECUTE_PROCESS(COMMAND "${qmake_bin}" -query ${_var} + RESULT_VARIABLE _result + OUTPUT_VARIABLE _output + ERROR_QUIET + OUTPUT_STRIP_TRAILING_WHITESPACE) + + IF(_result EQUAL 0) + SET(${_out} "${_output}" PARENT_SCOPE) + ENDIF() +ENDFUNCTION() + + FUNCTION(GET_FILE_MATCHER _result_remove _result_keep) IF(NOT ANDROID) LIST(APPEND matcher_remove "_android") diff --git a/cmake/Libraries.cmake b/cmake/Libraries.cmake index 27d58aa26..350f7d62d 100644 --- a/cmake/Libraries.cmake +++ b/cmake/Libraries.cmake @@ -44,6 +44,10 @@ FOREACH(dest "" "share/qt" "share/qt5") ENDIF() ENDFOREACH() +IF(NOT QT_TRANSLATIONS_DIR) + QUERY_QMAKE(QT_TRANSLATIONS_DIR QT_INSTALL_TRANSLATIONS) +ENDIF() + MESSAGE(STATUS "QT_HOST_PREFIX: ${QT_HOST_PREFIX}") MESSAGE(STATUS "QT_TRANSLATIONS_DIR: ${QT_TRANSLATIONS_DIR}") diff --git a/cmake/android.toolchain.cmake b/cmake/android.toolchain.cmake index afb1d113c..d820900f2 100644 --- a/cmake/android.toolchain.cmake +++ b/cmake/android.toolchain.cmake @@ -3,6 +3,21 @@ CMAKE_MINIMUM_REQUIRED(VERSION 3.7.1) SET(ANDROID_SDK $ENV{ANDROID_HOME}) SET(ANDROID_BUILD_TOOLS_REVISION $ENV{ANDROID_BUILD_TOOLS_REVISION}) +IF(NOT EXISTS "${ANDROID_SDK}") + MESSAGE(FATAL_ERROR "Environment variable ANDROID_HOME is undefined") +ENDIF() + +IF(NOT ANDROID_BUILD_TOOLS_REVISION) + SET(_android_build_tools_dir "${ANDROID_SDK}/build-tools") + FILE(GLOB build_tools ${_android_build_tools_dir}/*) + LIST(LENGTH build_tools build_tools_len) + IF(NOT build_tools_len EQUAL 1) + MESSAGE(FATAL_ERROR "Cannot determine ANDROID_BUILD_TOOLS_REVISION: ${_android_build_tools_dir}") + ENDIF() + + GET_FILENAME_COMPONENT(ANDROID_BUILD_TOOLS_REVISION "${build_tools}" NAME) +ENDIF() + SET(CMAKE_SYSTEM_NAME Android) SET(CMAKE_ANDROID_STL_TYPE gnustl_shared) diff --git a/docs/releasenotes/1.14.1.rst b/docs/releasenotes/1.14.1.rst new file mode 100644 index 000000000..b82e66a2d --- /dev/null +++ b/docs/releasenotes/1.14.1.rst @@ -0,0 +1,68 @@ +AusweisApp2 1.14.1 +^^^^^^^^^^^^^^^^^^ + +**Releasedatum:** 28. März 2018 + + + +Anwender +"""""""" + - Die Nutzung der PIN-Verwaltung ist nun auch mit der Funktion + "Smartphone als Kartenleser" möglich. + + - Die mobile Startseite wurde überarbeitet. + + - Beim Koppeln von zwei Geräten für die Funktion "Smartphone als Kartenleser" + wird nun eine einheitliche PIN-Tastatur verwendet. + + - Während einer Authentisierung wird nun eine Fortschrittsanzeige + zusammen mit dem Namen des aktuellen Authentisierungsschrittes angezeigt. + + - Während der Verwendung der Funktion "Smartphone als Kartenleser" wird auf + beiden Geräten jeweils der Name des verbundenen Gerätes angezeigt. + + - Die Anzeige der unterstützten Kartenlesegeräte wurde optimiert. + + - Das Koppeln für die Funktion "Smartphone als Kartenleser" ist jetzt während + eines Authentisierungsvorgangs möglich und führt nicht mehr zum Abbruch des + Vorgangs. + + - Bei der Android-Version der AusweisApp2 ist es jetzt möglich, den Verlauf + zu deaktivieren und Einträge zu löschen. + + - Die AusweisApp2 kommt nun auch beim erneuten Starten aus dem Launchpad oder + per Doppelklick in den Vordergrund. Voraussetzung ist, dass sie bereits + vorher gestartet wurde. + + - Bei einem Update bleibt der Autostart-Eintrag erhalten. + + - Bei der Android-Version wird die letzte Auswahl einer + Authentisierungsmethode (NFC, Bluetooth oder WLAN) nun als bevorzugte + Methode gespeichert. + + - Bei der Android-Version wurden die Fehlermeldungen / Hinweise bei + Fehleingaben optimiert. + + - Der Begriff "Handbuch" wurde gegen "Online-Hilfe" ausgetauscht und an + geeigneten Stellen wurden Verlinkungen eingefügt. + + - Optimierung der Anzeige der Diensteanbieter im Anbieterverzeichnis + (macOS und Windows). + + - Die Funktion "Smartphone als Kartenleser" unterstützt nun auch einen + mobilen Hotspot des selben Gerätes. + + - Die Unterstützung von Bildschirmlesern wurde verbessert. + + +Entwickler +"""""""""" + - Beim Aufruf von "eID-Client?status" wird nun auch + der Header "Access-Control-Allow-Origin" gesetzt. + + - Im Protokoll wird nun auch das TLS-Zertifikat angezeigt, + welches einen Fehler verursacht. + + - Es wird nun TLS-Session-Resumption beim Attached-eID erzwungen. + + - Fehlercode bei fehlgeschlagenen Transmits korrigiert. diff --git a/docs/releasenotes/announce.rst b/docs/releasenotes/announce.rst index 14769b2d6..6b99dad66 100644 --- a/docs/releasenotes/announce.rst +++ b/docs/releasenotes/announce.rst @@ -1,7 +1,13 @@ Abkündigungen ============= -Mit der Version 1.14.0 der AusweisApp2 wird die Unterstützung +Mit der Version 1.16.0 der AusweisApp2 wird die Unterstützung +folgender Systeme eingestellt. + + - OS X 10.10 + + +Mit der Version 1.14.0 der AusweisApp2 wurde die Unterstützung folgender Systeme eingestellt. - OS X 10.9 diff --git a/docs/releasenotes/appcast.rst b/docs/releasenotes/appcast.rst index a81a1ae38..b44ed59ab 100644 --- a/docs/releasenotes/appcast.rst +++ b/docs/releasenotes/appcast.rst @@ -4,6 +4,7 @@ Release Notes .. toctree:: :maxdepth: 1 + 1.14.1 1.14.0 announce issues diff --git a/docs/releasenotes/issues.rst b/docs/releasenotes/issues.rst index 3f80fb143..d477d8798 100644 --- a/docs/releasenotes/issues.rst +++ b/docs/releasenotes/issues.rst @@ -22,8 +22,5 @@ Die nachfolgende Liste bezieht sich auf die aktuelle Version der AusweisApp2. oder eine PIN-Änderung mit Komfort-Kartenlesegerät durchgeführt wird, kann es unter Windows und macOS zu einem Absturz kommen. - - Die PIN-Änderung über ein Smartphone als Kartenlesegerät wird nicht - unterstützt. - - Unter Umständen kommt es zu Stabilitätsproblemen der NFC-Schnittstelle auf Android. diff --git a/docs/releasenotes/versions.rst b/docs/releasenotes/versions.rst index 99a38d49a..512c63ef3 100644 --- a/docs/releasenotes/versions.rst +++ b/docs/releasenotes/versions.rst @@ -6,6 +6,7 @@ Versionszweig 1.14 .. toctree:: :maxdepth: 1 + 1.14.1 1.14.0 diff --git a/docs/sdk/android.rst b/docs/sdk/android.rst index 997c89737..c93f02fe3 100644 --- a/docs/sdk/android.rst +++ b/docs/sdk/android.rst @@ -29,9 +29,7 @@ secure connection to AusweisApp2. with another session ID. - An attacker cannot grab the session ID of the previous app because - AusweisApp2 uses multiple sources of secure random number generator and - provides an optional API for the app to provide additional random number - entropy. + AusweisApp2 uses multiple sources of secure random number generator. - An attacker cannot fake AusweisApp2 for other apps because the connection via AIDL is bound with package name "com.governikus.ausweisapp2". Google @@ -130,7 +128,7 @@ fingerprint of the authentic SDK certificate is the following: .. code-block:: text - B0:2A:C7:6B:50:A4:97:AE:81:0A:EA:C2:25:98:18:7B:3D:42:90:27:7D:08:51:A7:FA:8E:1A:EA:5A:97:98:70 + B0 2A C7 6B 50 A4 97 AE 81 0A EA C2 25 98 18 7B 3D 42 90 27 7D 08 51 A7 FA 8E 1A EA 5A 97 98 70 @@ -637,11 +635,11 @@ are shown in code listing below. class ForegroundDispatcher { - private Activity mActivity; - private NfcAdapter mAdapter; - private PendingIntent mPendingIntent; - private IntentFilter[] mFilters; - private String[][] mTechLists; + private final Activity mActivity; + private final NfcAdapter mAdapter; + private final PendingIntent mPendingIntent; + private final IntentFilter[] mFilters; + private final String[][] mTechLists; ForegroundDispatcher(Activity pActivity) { diff --git a/libs/CMakeLists.txt b/libs/CMakeLists.txt index 84f81c533..07d217b8e 100644 --- a/libs/CMakeLists.txt +++ b/libs/CMakeLists.txt @@ -313,6 +313,7 @@ ExternalProject_Add(qt ${PATCH_CMD} -p1 ${PATCH_OPTIONS} ${PATCHES_DIR}/qt-Avoid-using-deprecated-APIs-on-iOS-10.0.patch && ${PATCH_CMD} -p1 ${PATCH_OPTIONS} ${PATCHES_DIR}/qt-Add-IsoDep-to-the-techList-on-Android.patch && ${PATCH_CMD} -p1 ${PATCH_OPTIONS} ${PATCHES_DIR}/qt-macOS-iOS-Fix-garbled-text-under-some-conditions.patch && + ${PATCH_CMD} -p1 ${PATCH_OPTIONS} ${PATCHES_DIR}/qt-Fix-reopening-on-macOS.patch && ${CMAKE_COMMAND} -E touch qtbase/.gitignore CONFIGURE_COMMAND ${QT_ENV} ${QT_CONFIGURE} ${QT_CONFIGURE_FLAGS} ${QT_CONFIGURE_FLAGS_SKIP_MODULES} BUILD_COMMAND ${MAKE} ${MAKE_JOBS} diff --git a/patches/qt-Fix-reopening-on-macOS.patch b/patches/qt-Fix-reopening-on-macOS.patch new file mode 100644 index 000000000..5f1689dd2 --- /dev/null +++ b/patches/qt-Fix-reopening-on-macOS.patch @@ -0,0 +1,49 @@ +From d9c149dbc2021ed1e82cd34ae30dfd39f7d82a8d Mon Sep 17 00:00:00 2001 +From: Jens Trillmann +Date: Mon, 12 Mar 2018 12:06:05 +0100 +Subject: [PATCH] Fix reopening on macOS + +When a user reopens an application while the application is already +running, then macOS does not run the application a second time but +sends kAEReopenApplication to inform the running instance. +Qt ignores this event and the application does not open. To handle this +event a new event handler is registered. The application state is set +to Qt::ApplicationActive when the handler is called. An application that +wants to react to reopening has to react to QEvent::ApplicationActivate +in the running QApplication. + +Change-Id: Ic3adeb6b334c85f36671c254657170c71a2dfb59 +--- + src/plugins/platforms/cocoa/qcocoaapplicationdelegate.mm | 11 +++++++++++ + 1 file changed, 11 insertions(+) + +diff --git x/qtbase/src/plugins/platforms/cocoa/qcocoaapplicationdelegate.mm y/qtbase/src/plugins/platforms/cocoa/qcocoaapplicationdelegate.mm +index a94e0dc517..ccf16addea 100644 +--- x/qtbase/src/plugins/platforms/cocoa/qcocoaapplicationdelegate.mm ++++ y/qtbase/src/plugins/platforms/cocoa/qcocoaapplicationdelegate.mm +@@ -259,6 +259,10 @@ - (void) applicationWillFinishLaunching:(NSNotification *)notification + andSelector:@selector(appleEventQuit:withReplyEvent:) + forEventClass:kCoreEventClass + andEventID:kAEQuitApplication]; ++ [eventManager setEventHandler:self ++ andSelector:@selector(appleEventReopen:withReplyEvent:) ++ forEventClass:kCoreEventClass ++ andEventID:kAEReopenApplication]; + [eventManager setEventHandler:self + andSelector:@selector(getUrl:withReplyEvent:) + forEventClass:kInternetEventClass +@@ -438,4 +442,11 @@ - (void)appleEventQuit:(NSAppleEventDescriptor *)event withReplyEvent:(NSAppleEv + [NSApp terminate:self]; + } + ++- (void)appleEventReopen:(NSAppleEventDescriptor *)event withReplyEvent:(NSAppleEventDescriptor *)replyEvent ++{ ++ Q_UNUSED(event); ++ Q_UNUSED(replyEvent); ++ QWindowSystemInterface::handleApplicationStateChanged(Qt::ApplicationActive, true); ++} ++ + @end +-- +2.14.3 (Apple Git-98) + diff --git a/resources/ausweisapp.qrc b/resources/ausweisapp.qrc index cc266d0aa..922c7be10 100644 --- a/resources/ausweisapp.qrc +++ b/resources/ausweisapp.qrc @@ -85,5 +85,6 @@ images/phone_bluetooth.svg images/location_flag_de.svg images/location_flag_en.svg + images/siteWithLogo.png diff --git a/resources/ausweisapp_desktop.qrc b/resources/ausweisapp_desktop.qrc index c1552a8ca..28b747653 100644 --- a/resources/ausweisapp_desktop.qrc +++ b/resources/ausweisapp_desktop.qrc @@ -2,9 +2,6 @@ html_templates/alreadyactive.html html_templates/error.html - stylesheets/common.qss - stylesheets/macos.qss - stylesheets/windows.qss stylesheets/desktop.qss images/beta.svg images/green_check_mark.svg @@ -12,7 +9,6 @@ images/MenuUnselected.png images/MenuUnselectedDisabled.png images/npa.ico - images/siteWithLogo.png images/Logo_AutentApp2_2014.png images/AppLogo_AutentApp2_2014.png images/start_nPA_eAT.png diff --git a/resources/ausweisapp_mobile.qrc b/resources/ausweisapp_mobile.qrc index a1d2118fc..7a6761ee2 100644 --- a/resources/ausweisapp_mobile.qrc +++ b/resources/ausweisapp_mobile.qrc @@ -21,11 +21,6 @@ images/android/navigation/support.svg images/android/navigation/bewerten.svg images/android/navigation/teilen.svg - images/android/mdpi/haken.png - images/android/hdpi/haken.png - images/android/xhdpi/haken.png - images/android/xxhdpi/haken.png - images/android/xxxhdpi/haken.png images/android/checkbox_0.svg images/android/checkbox_1.svg images/android/tabDivider.svg diff --git a/resources/config.json.in b/resources/config.json.in index 8b1fba714..39f3671ee 100644 --- a/resources/config.json.in +++ b/resources/config.json.in @@ -173,9 +173,7 @@ "selfAuthentication": { "_comment_1": "TCTokenURL for self authentication (AusweisAuskunft)", "url": "https://www.autentapp.de/AusweisAuskunft/WebServiceRequesterServlet?mode=xml", - "certDescr": "308202E0060A04007F00070301030101A10E0C0C442D547275737420476D6248A2181316687474703A2F2F7777772E642D74727573742E6E6574A3190C17476F7665726E696B757320476D6248202620436F2E4B47A41A131868747470733A2F2F7777772E617574656E746170702E6465A58202050C8202014E616D652C20416E7363687269667420756E6420452D4D61696C2D4164726573736520646573204469656E737465616E626965746572733A0D0A476F7665726E696B757320476D6248202620436F2E4B470D0A416D2046616C6C7475726D20390D0A3238333539204272656D656E0D0A6B6F6E74616B7440676F7665726E696B75732E636F6D0D0A0D0A4765736368C3A46674737A7765636B3A0D0A53656C6273746175736B756E66740D0A0D0A48696E7765697320617566206469652066C3BC722064656E204469656E737465616E626965746572207A757374C3A46E646967656E205374656C6C656E2C20646965206469652045696E68616C74756E672064657220566F7273636872696674656E207A756D20446174656E73636875747A206B6F6E74726F6C6C696572656E3A0D0A446572204C616E64657362656175667472616774652066C3BC7220446174656E73636875747A20756E6420496E666F726D6174696F6E736672656968656974206465722046726569656E2048616E73657374616474204272656D656E0D0A41726E647473747261C39F6520310D0A3237353730204272656D6572686176656E0D0A303432312F3336312D323031300D0A6F666669636540646174656E73636875747A2E6272656D656E2E64650D0A687474703A2F2F7777772E646174656E73636875747A2E6272656D656E2E64650D0AA7683166042029F04459C39E4B68C70AA3961FA7B1B40E8A49238446CFE606C56FF8DC0989F404203FFF612368211F69D460DFF157F541BEBC96217D7AF6C2D4F57BF6E4A126A86C04209D8EB0BDF36B19C4AF3147E57401FD792845F0413102A7BD784DF9418098BEBE", - "testUrl": "https://test.governikus-eid.de/AusweisAuskunft/WebServiceRequesterServlet?mode=xml", - "testCertDescr": "30820266060A04007F00070301030101A1160C14476F7665726E696B757320546573742044564341A21A1318687474703A2F2F7777772E676F7665726E696B75732E6465A31A0C18476F7665726E696B757320476D6248202620436F2E204B47A420131E68747470733A2F2F746573742E676F7665726E696B75732D6569642E6465A582014F0C82014B416E736368726966743A090D0A476F7665726E696B757320476D6248202620436F2E204B470D0A416D2046616C6C7475726D20390D0A3238333539204272656D656E090D0A0D0A452D4D61696C2D416472657373653A09686240626F732D6272656D656E2E6465090D0A0D0A5A7765636B20646573204175736C657365766F7267616E67733A0944656D6F6E7374726174696F6E20646573206549442D53657276696365090D0A0D0A5A757374C3A46E6469676520446174656E73636875747A61756673696368743A090D0A446965204C616E64657362656175667472616774652066C3BC7220446174656E73636875747A20756E6420496E666F726D6174696F6E736672656968656974206465722046726569656E2048616E73657374616474204272656D656E0D0A41726E647473747261C39F6520310D0A3237353730204272656D6572686176656EA64B134968747470733A2F2F746573742E676F7665726E696B75732D6569642E64653A3434332F417574656E742D44656D6F4170706C69636174696F6E2F5265636569766572536572766C6574A74631440420D2E54E1D26FC5DFC3408609831BBE4CFE3204365604849E7B094623566B54A760420E224D25B448DC054C023392CA11017751041D762F83D880895B3018D8EC2B290" + "testUrl": "https://test.governikus-eid.de/AusweisAuskunft/WebServiceRequesterServlet?mode=xml" }, "updateServer": { diff --git a/resources/images/android/hdpi/haken.png b/resources/images/android/hdpi/haken.png deleted file mode 100644 index 92d355187..000000000 Binary files a/resources/images/android/hdpi/haken.png and /dev/null differ diff --git a/resources/images/android/mdpi/haken.png b/resources/images/android/mdpi/haken.png deleted file mode 100644 index b9c6b2f59..000000000 Binary files a/resources/images/android/mdpi/haken.png and /dev/null differ diff --git a/resources/images/android/navigation/versionsinformation.svg b/resources/images/android/navigation/versionsinformation.svg index 513698c68..e0634d71f 100644 --- a/resources/images/android/navigation/versionsinformation.svg +++ b/resources/images/android/navigation/versionsinformation.svg @@ -1,6 +1,6 @@ - + diff --git a/resources/images/android/xhdpi/haken.png b/resources/images/android/xhdpi/haken.png deleted file mode 100644 index 4da0f9ecc..000000000 Binary files a/resources/images/android/xhdpi/haken.png and /dev/null differ diff --git a/resources/images/android/xxhdpi/haken.png b/resources/images/android/xxhdpi/haken.png deleted file mode 100644 index 46613596f..000000000 Binary files a/resources/images/android/xxhdpi/haken.png and /dev/null differ diff --git a/resources/images/android/xxxhdpi/haken.png b/resources/images/android/xxxhdpi/haken.png deleted file mode 100644 index 3c08369f4..000000000 Binary files a/resources/images/android/xxxhdpi/haken.png and /dev/null differ diff --git a/resources/jenkins/docker/alpine/Dockerfile b/resources/jenkins/docker/alpine/Dockerfile index 75acf6caf..d1aad8d59 100644 --- a/resources/jenkins/docker/alpine/Dockerfile +++ b/resources/jenkins/docker/alpine/Dockerfile @@ -1,7 +1,7 @@ FROM scratch MAINTAINER Governikus KG -ARG version="3.6.2" +ARG version="3.7.0" ARG arch="x86_64" ADD alpine-minirootfs-$version-$arch.tar.gz / diff --git a/resources/jenkins/docker/android/Dockerfile b/resources/jenkins/docker/android/Dockerfile index 1d06872ee..604fa3fe7 100644 --- a/resources/jenkins/docker/android/Dockerfile +++ b/resources/jenkins/docker/android/Dockerfile @@ -7,7 +7,7 @@ RUN echo "[multilib]" >> /etc/pacman.conf && echo 'Include = /etc/pacman.d/mirro RUN chown -R governikus: /var/cache/pacman/pkg/ -ARG JENKINS_SWARM_VERSION=3.6 +ARG JENKINS_SWARM_VERSION=3.8 ARG TINI_VERSION=0.16.1 RUN curl -L -o /sbin/tini https://github.com/krallin/tini/releases/download/v$TINI_VERSION/tini-static-muslc-amd64 && chmod 755 /sbin/tini && \ curl -L -o /swarm-client.jar https://repo.jenkins-ci.org/releases/org/jenkins-ci/plugins/swarm-client/$JENKINS_SWARM_VERSION/swarm-client-$JENKINS_SWARM_VERSION.jar @@ -25,8 +25,5 @@ RUN pacaur -Sy --noconfirm cmake ccache python2-hglib apache-ant jdk8-openjdk jr android-platform-18 android-platform-21 android-platform-25 \ && rm -rf /var/cache/pacman/pkg/* && rm -rf /home/governikus/.cache/pacaur -RUN pacman -Qi android-sdk-build-tools | grep Version | sed -E 's|.*r([0-9]+\.[0-9]\.[0-9]).*|export ANDROID_BUILD_TOOLS_REVISION=\1|' > /home/governikus/build_tools.sh -RUN echo '. /etc/profile ; . /home/governikus/build_tools.sh ;' >> /home/governikus/.profile - ENTRYPOINT ["/sbin/tini", "--"] CMD sh -l -c /swarm.sh diff --git a/resources/jenkins/docker/docs/Dockerfile b/resources/jenkins/docker/docs/Dockerfile index 66907520a..c92986b2c 100644 --- a/resources/jenkins/docker/docs/Dockerfile +++ b/resources/jenkins/docker/docs/Dockerfile @@ -4,7 +4,7 @@ MAINTAINER Governikus KG ENV NAME=Docs LABELS=Docs # Clean up if texlive package is fixed in Alpine -RUN sed -i -e 's/v3.6/edge/' /etc/apk/repositories && \ +RUN sed -i -e 's/v3.7/edge/' /etc/apk/repositories && \ echo '@testing http://dl-cdn.alpinelinux.org/alpine/edge/testing' >> /etc/apk/repositories && \ apk --no-cache add cmake make py2-sphinx py2-setuptools py2-pip py2-hglib icu-libs poppler zziplib texlive-full@testing && \ wget http://ftp.math.utah.edu/pub/tex/historic/systems/texlive/2016/texlive-20160523b-texmf.tar.xz && \ diff --git a/resources/jenkins/docker/swarm/Dockerfile b/resources/jenkins/docker/swarm/Dockerfile index 2e3e99482..f457aa9c1 100644 --- a/resources/jenkins/docker/swarm/Dockerfile +++ b/resources/jenkins/docker/swarm/Dockerfile @@ -1,7 +1,7 @@ FROM alpine:latest MAINTAINER Governikus KG -ARG JENKINS_SWARM_VERSION=3.6 +ARG JENKINS_SWARM_VERSION=3.8 ENV EXECUTOR=3 LABELS= NAME= PASSWORD= RUN adduser governikus -s /bin/sh -D diff --git a/resources/jenkins/docker/swarm/swarm.sh b/resources/jenkins/docker/swarm/swarm.sh index ba44c1a94..24afd168d 100755 --- a/resources/jenkins/docker/swarm/swarm.sh +++ b/resources/jenkins/docker/swarm/swarm.sh @@ -11,7 +11,7 @@ fingerprints=${FINGERPRINTS:-68:21:59:5C:C0:B0:1F:78:FF:23:DE:D4:D8:05:0F:74:38: /usr/bin/java \ -jar /swarm-client.jar \ - -name $name \ + -name $name-$HOSTNAME \ -mode $mode \ -executors $executor \ -labels "$labels" \ @@ -19,5 +19,6 @@ fingerprints=${FINGERPRINTS:-68:21:59:5C:C0:B0:1F:78:FF:23:DE:D4:D8:05:0F:74:38: -username $user \ -passwordEnvVariable PASSWORD \ -sslFingerprints $fingerprints \ - -fsroot $dest + -fsroot $dest \ + -disableClientsUniqueId diff --git a/resources/jenkins/dsl/Builds/Build_Analyze.groovy b/resources/jenkins/dsl/Builds/Build_Analyze.groovy deleted file mode 100644 index 3528c0f61..000000000 --- a/resources/jenkins/dsl/Builds/Build_Analyze.groovy +++ /dev/null @@ -1,93 +0,0 @@ -import common.Build -import static common.Constants.strip - -def j = new Build - ( - name: 'Analyze', - libraries: 'Linux', - label: 'Linux' - ).generate(this) - - -j.with -{ - wrappers - { - environmentVariables - { - env("QT_PLUGIN_PATH", '$WORKSPACE/libs/build/dist/plugins') - } - } - - steps - { - shell('cd build; cmake ../source -DCMAKE_PREFIX_PATH=${WORKSPACE}/libs/build/dist -DCMAKE_CXX_COMPILER=c++-analyzer') - - shell('cd build; make cloc.report') - - shell('cd build; make cppcheck.report') - - shell('''\ - export LD_LIBRARY_PATH=$WORKSPACE/libs/build/dist/lib:$LD_LIBRARY_PATH - cd build; scan-build -o $WORKSPACE/build/result --keep-empty make ${MAKE_FLAGS} - '''.stripIndent().trim()) - - shell('cd build/result; mv * report') - } - - publishers - { - tasks('source/**/*.cpp,source/**/*.h,source/**/*.m,source/**/*.mm,source/**/*.qml,source/**/*.js,source/**/*.cmake,source/**/CMakeLists.txt', '', 'FIXME', 'TODO', 'FINDME', true) - { - defaultEncoding('UTF-8') - } - - warnings(['GNU Make + GNU C Compiler (gcc)']) - - publishHtml - { - report('build/result/report') - { - reportName('Clang-Analyzer') - allowMissing(true) - keepAll(true) - alwaysLinkToLastBuild(false) - } - } - - slocCount - { - pattern('build/cloc.xml') - encoding('UTF-8') - commentIsCode(false) - buildsInGraph(0) - ignoreBuildFailure(false) - } - } - - configure - { - project -> project / 'publishers' << 'org.jenkinsci.plugins.cppcheck.CppcheckPublisher' { - cppcheckConfig { - pattern 'build/cppcheck*.xml' - ignoreBlankFiles 'false' - allowNoReport 'false' - configSeverityEvaluation { - threshold '' - newThreshold '' - failureThreshold '' - newFailureThreshold '' - healthy '' - unHealthy - severityError 'true' - severityWarning 'true' - severityStyle 'true' - severityPerformance 'true' - severityInformation 'true' - severityNoCategory 'false' - severityPortability 'false' - } - } - } - } -} diff --git a/resources/jenkins/dsl/Builds/Build_Linux.groovy b/resources/jenkins/dsl/Builds/Build_Linux.groovy index c9f5dbb64..1cb94553d 100644 --- a/resources/jenkins/dsl/Builds/Build_Linux.groovy +++ b/resources/jenkins/dsl/Builds/Build_Linux.groovy @@ -45,10 +45,21 @@ j.with '''.stripIndent().trim()) shell('cd build; make gcovr') + + shell('cd build; make cloc.report') } publishers { cobertura('build/gcovr.xml') + + slocCount + { + pattern('build/cloc.xml') + encoding('UTF-8') + commentIsCode(false) + buildsInGraph(0) + ignoreBuildFailure(false) + } } } diff --git a/resources/jenkins/dsl/config.xml b/resources/jenkins/dsl/config.xml index 37da19002..a7f501745 100644 --- a/resources/jenkins/dsl/config.xml +++ b/resources/jenkins/dsl/config.xml @@ -4,7 +4,7 @@ false - http://mercurial/AusweisApp2 + https://hg.governikus.de/AusweisApp2 resources/jenkins/dsl/ BRANCH default diff --git a/resources/packaging/android/AndroidManifest.xml.in b/resources/packaging/android/AndroidManifest.xml.in index f6ce899d3..5abd778bc 100644 --- a/resources/packaging/android/AndroidManifest.xml.in +++ b/resources/packaging/android/AndroidManifest.xml.in @@ -150,6 +150,8 @@ + + diff --git a/resources/packaging/win/WIX.template.in b/resources/packaging/win/WIX.template.in index 9e04ee5b6..6c9ecd7d5 100644 --- a/resources/packaging/win/WIX.template.in +++ b/resources/packaging/win/WIX.template.in @@ -64,13 +64,35 @@ - + + + + + + + SYSTEMSETTINGS and NOT Installed + + + + + + Installed and Not REINSTALL + + diff --git a/resources/qml/Governikus/EnterPinView/EnterPinView.qml b/resources/qml/Governikus/EnterPinView/EnterPinView.qml index c9a468140..467f09d14 100644 --- a/resources/qml/Governikus/EnterPinView/EnterPinView.qml +++ b/resources/qml/Governikus/EnterPinView/EnterPinView.qml @@ -6,6 +6,7 @@ import Governikus.Global 1.0 SectionPage { id: baseItem + property string remoteDeviceId: "" signal pinEntered() onVisibleChanged: { @@ -29,8 +30,10 @@ SectionPage anchors.verticalCenter: parent.verticalCenter width: Utils.dp(58) height: width + // because RowLayout uses implicitHeight that is based on sourceSize we have to explicitly set the sourceSize + sourceSize.height: baseItem.state === "REMOTE_PIN" ? Utils.dp(58) : 143 Layout.maximumWidth: width - source: "qrc:///images/NFCPhoneCard.png" + source: baseItem.state === "REMOTE_PIN" ? "qrc:///images/icon_remote.svg" : "qrc:///images/NFCPhoneCard.png" fillMode: Image.PreserveAspectFit } @@ -56,6 +59,7 @@ SectionPage baseItem.state === "PIN_NEW" ? qsTr("Please enter a new 6-digit PIN of your choice.") : baseItem.state === "PIN_NEW_AGAIN" ? qsTr("Please enter your new 6-digit PIN again.") : baseItem.state === "PIN" ? qsTr("Please enter your personal PIN.") : + baseItem.state === "REMOTE_PIN" ? qsTr("Enter the pairing code shown on your other device to use it as a card reader.") : /*"PIN_OR_TRANSPORT_PIN"*/ qsTr("Please enter your current PIN or your initial transport PIN first.") ) + settingsModel.translationTrigger } @@ -108,6 +112,10 @@ SectionPage numberModel.puk = pinField.text baseItem.pinEntered() break + case "REMOTE_PIN": + remoteServiceModel.connectToServer(remoteDeviceId, pinField.text) + baseItem.pinEntered() + break } } } diff --git a/resources/qml/Governikus/EnterPinView/PinField.qml b/resources/qml/Governikus/EnterPinView/PinField.qml index b563c1958..2f09d642f 100644 --- a/resources/qml/Governikus/EnterPinView/PinField.qml +++ b/resources/qml/Governikus/EnterPinView/PinField.qml @@ -23,6 +23,7 @@ Item { TextInput { id: echoField + color: Constants.secondary_text verticalAlignment: TextInput.AlignVCenter echoMode: TextInput.Password font.pixelSize: Utils.sp(18) @@ -33,13 +34,17 @@ Item { focus: false validator: RegExpValidator { regExp: baseItem.state === "PUK" ? /[0-9]{10}/ : - baseItem.state === "PIN_OR_TRANSPORT_PIN" ? /[0-9]{5,6}/ : /[0-9]{6}/ } - maximumLength: baseItem.state === "PUK" ? 10 : 6 + baseItem.state === "PIN_OR_TRANSPORT_PIN" ? /[0-9]{5,6}/ : + baseItem.state === "REMOTE_PIN" ? /[0-9]{4}/ : /[0-9]{6}/ + } + maximumLength: baseItem.state === "PUK" ? 10 : + baseItem.state === "REMOTE_PIN" ? 4 : 6 clip: true } TextInput { id: sample + color: Constants.secondary_text visible: false echoMode: echoField.echoMode font: echoField.font @@ -53,7 +58,8 @@ Item { anchors.left: echoField.left Repeater { - model: baseItem.state === "PUK" ? 10 : 6 + model: baseItem.state === "PUK" ? 10 : + baseItem.state === "REMOTE_PIN" ? 4 : 6 delegate: Rectangle { width: sample.contentWidth - sample.font.letterSpacing diff --git a/resources/qml/Governikus/EnterPinView/PinPadButton.qml b/resources/qml/Governikus/EnterPinView/PinPadButton.qml index abf910e1c..80a6f6e5f 100644 --- a/resources/qml/Governikus/EnterPinView/PinPadButton.qml +++ b/resources/qml/Governikus/EnterPinView/PinPadButton.qml @@ -13,7 +13,7 @@ MouseArea { anchors.centerIn: parent font.pixelSize: Utils.sp(24) wrapMode: Text.WordWrap - color: "black" + color: Constants.secondary_text } Image { diff --git a/resources/qml/Governikus/FeedbackView/Feedback.qml b/resources/qml/Governikus/FeedbackView/Feedback.qml index 8228bcf20..c461544ea 100644 --- a/resources/qml/Governikus/FeedbackView/Feedback.qml +++ b/resources/qml/Governikus/FeedbackView/Feedback.qml @@ -34,6 +34,7 @@ SectionPage { text: titleText } Text { + color: Constants.secondary_text width: parent.width font.pixelSize: Constants.normal_font_size wrapMode: Text.WordWrap @@ -69,6 +70,7 @@ SectionPage { } Text { id: subtitle + color: Constants.secondary_text anchors.left: parent.left anchors.right: parent.right text: qsTr("We are happy about every feedback on our software.") + settingsModel.translationTrigger diff --git a/resources/qml/Governikus/Global/+android/GCheckBox.qml b/resources/qml/Governikus/Global/+android/GCheckBox.qml index 542b61f4e..cd8f64596 100644 --- a/resources/qml/Governikus/Global/+android/GCheckBox.qml +++ b/resources/qml/Governikus/Global/+android/GCheckBox.qml @@ -38,6 +38,7 @@ Item { Text { id: description + color: Gov.Constants.secondary_text visible: text !== "" anchors.verticalCenter: box.verticalCenter font.pixelSize: Gov.Constants.normal_font_size diff --git a/resources/qml/Governikus/Global/+android/LabeledText.qml b/resources/qml/Governikus/Global/+android/LabeledText.qml index 6de66c472..cf3b76917 100644 --- a/resources/qml/Governikus/Global/+android/LabeledText.qml +++ b/resources/qml/Governikus/Global/+android/LabeledText.qml @@ -22,6 +22,7 @@ Item { anchors.rightMargin: margin font.pixelSize: Gov.Constants.normal_font_size font.capitalization: fontUppercase + color: Gov.Constants.secondary_text wrapMode: Text.WordWrap onLinkActivated: parent.linkActivated(link) } diff --git a/resources/qml/Governikus/Global/+android/PlatformConstants.qml b/resources/qml/Governikus/Global/+android/PlatformConstants.qml index 256055a6d..f7f8bc8d7 100644 --- a/resources/qml/Governikus/Global/+android/PlatformConstants.qml +++ b/resources/qml/Governikus/Global/+android/PlatformConstants.qml @@ -10,7 +10,7 @@ Item { readonly property color blue_dark: "#324d66" readonly property color blue_light: "#659bcd" readonly property color primary_text: "#ffffff" - readonly property color secondary_text: "#444444" + readonly property color secondary_text: "#4a4a4a" readonly property color accent_color: "#7879b2" readonly property color second_accent_color: "#a3cb7f" readonly property int titlebar_font_size: Utils.sp(18) diff --git a/resources/qml/Governikus/Global/+ios/GButton.qml b/resources/qml/Governikus/Global/+ios/GButton.qml index 03be62ba0..d8d3bdc09 100644 --- a/resources/qml/Governikus/Global/+ios/GButton.qml +++ b/resources/qml/Governikus/Global/+ios/GButton.qml @@ -5,10 +5,12 @@ import "." /* Custom implementation to be replaced with template specialization of Qt.labs.controls Button*/ Rectangle { + id: rect property alias text: textItem.text property color buttonColor : Constants.blue property int maxWidth: 0 property int preferedWidth: parent.width - 4 * Constants.component_spacing + property alias iconSource: icon.source signal clicked @@ -17,13 +19,25 @@ Rectangle { width: maxWidth > 0 ? Math.min(maxWidth, preferedWidth) : preferedWidth clip: true + Image { + id: icon + visible: source.toString().length > 0 + height: rect.height - Utils.dp(10) + width: height + anchors.left: rect.left + anchors.leftMargin: Utils.dp(5) + anchors.verticalCenter: rect.verticalCenter + } + Text { id: textItem anchors.centerIn: parent color: enabled ? "white" : "#40000000" opacity: mouseArea.containsMouse ? 0.5 : 1 + anchors.leftMargin: icon.visible ? icon.width + icon.anchors.leftMargin : 0 font.pixelSize: Utils.dp(16) } + MouseArea{ id: mouseArea anchors.fill: parent diff --git a/resources/qml/Governikus/Global/+ios/GCheckBox.qml b/resources/qml/Governikus/Global/+ios/GCheckBox.qml index dd5839c93..e418ea485 100644 --- a/resources/qml/Governikus/Global/+ios/GCheckBox.qml +++ b/resources/qml/Governikus/Global/+ios/GCheckBox.qml @@ -24,6 +24,7 @@ Item { Text { id: description + color: Constants.secondary_text visible: text !== "" anchors.verticalCenter: image.verticalCenter font.pixelSize: Constants.normal_font_size diff --git a/resources/qml/Governikus/Global/+ios/LabeledText.qml b/resources/qml/Governikus/Global/+ios/LabeledText.qml index aa045f56f..3a527210b 100644 --- a/resources/qml/Governikus/Global/+ios/LabeledText.qml +++ b/resources/qml/Governikus/Global/+ios/LabeledText.qml @@ -27,6 +27,7 @@ Item { Text { id: bodyText + color: Constants.secondary_text anchors.top: labelText.bottom anchors.left: parent.left anchors.leftMargin: margin diff --git a/resources/qml/Governikus/Global/Constants.qml b/resources/qml/Governikus/Global/Constants.qml index 5599fd3d0..a9e4e36e5 100644 --- a/resources/qml/Governikus/Global/Constants.qml +++ b/resources/qml/Governikus/Global/Constants.qml @@ -15,6 +15,9 @@ Item { readonly property color green: "#a3cb7f" readonly property color red: "#cc0000" readonly property color grey: "#8e8e93" + readonly property color lightgrey: "#d5d5dc" + readonly property color white: "#ffffff" + readonly property color black: "#000000" readonly property color primary_text: Gov.PlatformConstants.primary_text readonly property color secondary_text: Gov.PlatformConstants.secondary_text diff --git a/resources/qml/Governikus/Global/LocationButton.qml b/resources/qml/Governikus/Global/LocationButton.qml index 8b9e7399e..85adf18d5 100644 --- a/resources/qml/Governikus/Global/LocationButton.qml +++ b/resources/qml/Governikus/Global/LocationButton.qml @@ -29,6 +29,7 @@ MouseArea { Text { text: name + color: Gov.Constants.secondary_text anchors.margins: Utils.dp(2) anchors.top: parent.top diff --git a/resources/qml/Governikus/HistoryView/+android/+tablet/HistoryView.qml b/resources/qml/Governikus/HistoryView/+android/+tablet/HistoryView.qml index b97f1937a..18c9d82c7 100644 --- a/resources/qml/Governikus/HistoryView/+android/+tablet/HistoryView.qml +++ b/resources/qml/Governikus/HistoryView/+android/+tablet/HistoryView.qml @@ -1,5 +1,5 @@ import QtQuick 2.5 -import QtQuick.Controls 1.4 +import QtQuick.Controls 2.2 import QtQuick.Controls.Styles 1.4 import QtQuick.Layouts 1.2 @@ -8,12 +8,20 @@ import Governikus.TitleBar 1.0 import Governikus.Provider 1.0 SectionPage { + id: rootPage property alias listViewModel: listView.model property var selectedIndices: [] headerTitleBarAction: TitleBarAction { text: qsTr("History") + settingsModel.translationTrigger; font.bold: true } + rightTitleBarAction: HistoryContextMenu { historyReminderPopup: deleteHistoryConfirmationDialog } + + HistoryViewConfirmationPopup { + id: deleteHistoryConfirmationDialog + baseItem: rootPage + } Text { + color: Constants.secondary_text anchors.centerIn: parent text: qsTr("Currently there are no history entries.") + settingsModel.translationTrigger wrapMode: Text.WordWrap diff --git a/resources/qml/Governikus/HistoryView/+android/HistoryView.qml b/resources/qml/Governikus/HistoryView/+android/HistoryView.qml index d41786e17..07a00dbed 100644 --- a/resources/qml/Governikus/HistoryView/+android/HistoryView.qml +++ b/resources/qml/Governikus/HistoryView/+android/HistoryView.qml @@ -1,18 +1,27 @@ import QtQuick 2.5 -import QtQuick.Controls 1.4 +import QtQuick.Controls 2.2 import QtQuick.Controls.Styles 1.4 import QtQuick.Layouts 1.2 +import QtQuick.Dialogs 1.2 import Governikus.Global 1.0 import Governikus.TitleBar 1.0 SectionPage { + id: rootPage property alias listViewModel: listView.model property var selectedIndices: [] headerTitleBarAction: TitleBarAction { text: qsTr("History") + settingsModel.translationTrigger; font.bold: true } + rightTitleBarAction: HistoryContextMenu { historyReminderPopup: deleteHistoryConfirmationDialog } + + HistoryViewConfirmationPopup { + id: deleteHistoryConfirmationDialog + baseItem: rootPage + } Text { + color: Constants.secondary_text anchors.centerIn: parent text: qsTr("Currently there are no history entries.") + settingsModel.translationTrigger wrapMode: Text.WordWrap diff --git a/resources/qml/Governikus/HistoryView/+ios/+tablet/HistoryView.qml b/resources/qml/Governikus/HistoryView/+ios/+tablet/HistoryView.qml index b4d800ae1..25e700f8e 100644 --- a/resources/qml/Governikus/HistoryView/+ios/+tablet/HistoryView.qml +++ b/resources/qml/Governikus/HistoryView/+ios/+tablet/HistoryView.qml @@ -62,6 +62,7 @@ SectionPage { } Text { + color: Constants.secondary_text anchors.centerIn: parent text: qsTr("Currently there are no history entries.") + settingsModel.translationTrigger wrapMode: Text.WordWrap diff --git a/resources/qml/Governikus/HistoryView/+ios/HistoryView.qml b/resources/qml/Governikus/HistoryView/+ios/HistoryView.qml index c48b16b7e..ed4f32de2 100644 --- a/resources/qml/Governikus/HistoryView/+ios/HistoryView.qml +++ b/resources/qml/Governikus/HistoryView/+ios/HistoryView.qml @@ -61,6 +61,7 @@ SectionPage { } Text { + color: Constants.secondary_text anchors.centerIn: parent text: qsTr("Currently there are no history entries.") + settingsModel.translationTrigger wrapMode: Text.WordWrap diff --git a/resources/qml/Governikus/HistoryView/ContextMenuEntry.qml b/resources/qml/Governikus/HistoryView/ContextMenuEntry.qml new file mode 100644 index 000000000..0a0a9f651 --- /dev/null +++ b/resources/qml/Governikus/HistoryView/ContextMenuEntry.qml @@ -0,0 +1,58 @@ +import QtQuick 2.5 +import QtGraphicalEffects 1.0 + +import Governikus.Global 1.0 + +MouseArea { + id: mouseArea + property alias text: textItem.text + property color buttonColor: Constants.white + readonly property int touchPadding: Utils.dp(3); + + height: textItem.height + 2 * touchPadding + width: Math.max(textItem.implicitWidth + 2 * touchPadding, parent.width) + + state: "normal" + states: [ + State { name: "normal"; when: !mouseArea.pressed + PropertyChanges { target: darkLayer; width: 0 } + }, + State { name: "pressed"; when: mouseArea.pressed + PropertyChanges { target: darkLayer; width: 2 * rect.width } + } + ] + transitions: [ + Transition { + from: "normal"; to: "pressed"; reversible: false + PropertyAnimation { target: darkLayer; property: "width"} + } + ] + + Rectangle { + id: rect + anchors.fill: parent + color: buttonColor + + Item { + anchors.fill: parent + clip: true + Rectangle { + id: darkLayer + x: mouseArea.containsMouse ? mouseArea.mouseX - width * 0.5 : 0 + height: parent.height + color: Constants.black + opacity: 0.2 + } + } + } + + Text { + id: textItem + color: Constants.secondary_text + anchors.left: rect.left + anchors.leftMargin: touchPadding + anchors.verticalCenter: rect.verticalCenter + font.pixelSize: Constants.titlebar_font_size + } +} + diff --git a/resources/qml/Governikus/HistoryView/HistoryContextMenu.qml b/resources/qml/Governikus/HistoryView/HistoryContextMenu.qml new file mode 100644 index 000000000..4b5042255 --- /dev/null +++ b/resources/qml/Governikus/HistoryView/HistoryContextMenu.qml @@ -0,0 +1,103 @@ +import QtQuick 2.7 +import QtQuick.Controls 2.2 + +import Governikus.Global 1.0 + +MouseArea { + property var historyReminderPopup: HistoryViewConfirmationPopup { } + readonly property alias contentWidth: contextMenuButton.width + + id: contextMenuButton + height: Constants.titlebar_height + width: height + anchors.right: parent ? parent.right : undefined + anchors.top: parent ? parent.top : undefined + anchors.verticalCenter: parent ? parent.verticalCenter : undefined + + Image { + id: contextMenuIcon + height: Constants.titlebar_height - 2 * Constants.titlebar_padding + width: height + anchors.topMargin: Constants.titlebar_padding + anchors.right: parent.right + anchors.bottomMargin: Constants.titlebar_padding + source: "qrc:///images/android/navigation/versionsinformation.svg" + anchors.verticalCenter: parent.verticalCenter + } + + onClicked: contextMenu.visible ? contextMenu.close() : contextMenu.open() + + Popup { + id: contextMenu + x: -(width - contextMenuButton.width) + y: Constants.titlebar_height + Constants.titlebar_padding + closePolicy: Popup.CloseOnPressOutsideParent | Popup.CloseOnEscape + height: contentColumn.height + Constants.titlebar_padding + + Column { + id: contentColumn + width: childrenRect.width + spacing: Constants.titlebar_padding + + ContextMenuEntry { + text: (settingsModel.historyEnabled ? qsTr("Disable history") : qsTr("Enable history")) + settingsModel.translationTrigger + onClicked: { + settingsModel.historyEnabled = !settingsModel.historyEnabled + qmlExtension.showFeedback((settingsModel.historyEnabled ? qsTr("History enabled") : qsTr("History disabled")) + settingsModel.translationTrigger) + contextMenu.close() + } + } + + Rectangle { + width: parent.width + color: Constants.grey + height: Utils.dp(1) + } + + ContextMenuEntry { + text: qsTr("Delete all") + settingsModel.translationTrigger + onClicked: { + historyReminderPopup.setValues("ALL_HISTORY", qsTr("Please confirm that you want to delete your complete history.")) + historyReminderPopup.open() + contextMenu.close() + } + } + + ContextMenuEntry { + text: qsTr("Delete last 4 weeks") + settingsModel.translationTrigger + onClicked: { + historyReminderPopup.setValues("LAST_FOUR_WEEKS", qsTr("Please confirm that you want to delete your history from the last four weeks.")) + historyReminderPopup.open() + contextMenu.close() + } + } + + ContextMenuEntry { + text: qsTr("Delete last week") + settingsModel.translationTrigger + onClicked: { + historyReminderPopup.setValues("PAST_WEEK", qsTr("Please confirm that you want to delete your history from the last week.")) + historyReminderPopup.open() + contextMenu.close() + } + } + + ContextMenuEntry { + text: qsTr("Delete last day") + settingsModel.translationTrigger + onClicked: { + historyReminderPopup.setValues("PAST_DAY", qsTr("Please confirm that you want to delete your history from the last day.")) + historyReminderPopup.open() + contextMenu.close() + } + } + + ContextMenuEntry { + text: qsTr("Delete last hour") + settingsModel.translationTrigger + onClicked: { + historyReminderPopup.setValues("PAST_HOUR", qsTr("Please confirm that you want to delete your history from the last hour.")) + historyReminderPopup.open() + contextMenu.close() + } + } + } + } +} diff --git a/resources/qml/Governikus/HistoryView/HistoryListViewDelegateContent.qml b/resources/qml/Governikus/HistoryView/HistoryListViewDelegateContent.qml index 2e483ce68..e18bd8d31 100644 --- a/resources/qml/Governikus/HistoryView/HistoryListViewDelegateContent.qml +++ b/resources/qml/Governikus/HistoryView/HistoryListViewDelegateContent.qml @@ -28,12 +28,16 @@ Item { Rectangle { id: purposeObject + height: purposeColumn.height + property alias truncated: purposeText.truncated + anchors.verticalCenter: parent.verticalCenter anchors.left: showDetail ? parent.left : categoryImage.right anchors.leftMargin: showDetail ? 0 : Utils.dp(15) anchors.right: deleteButton.left Column { + id: purposeColumn anchors.verticalCenter: parent.verticalCenter anchors.left: parent.left anchors.right: parent.right @@ -56,6 +60,7 @@ Item { } Text { id: subjectText + color: Constants.secondary_text anchors.left: parent.left anchors.right: parent.right @@ -73,11 +78,21 @@ Item { font.pixelSize: Constants.small_font_size color: Constants.history_delegate_address_color wrapMode: Text.WordWrap + maximumLineCount: 2 text: historyModelItem ? !!historyModelItem.purpose ? historyModelItem.purpose : qsTr("Tap for more details") + settingsModel.translationTrigger : "" } } } + Text { + visible: purposeText.truncated + anchors.left: purposeObject.right + anchors.bottom: purposeObject.bottom + font.pixelSize: Constants.small_font_size + color: Constants.history_delegate_address_color + text: "..." + } + Image { height: Utils.dp(35) source: "qrc:///images/android/arrowRight.svg" diff --git a/resources/qml/Governikus/HistoryView/HistoryViewConfirmationPopup.qml b/resources/qml/Governikus/HistoryView/HistoryViewConfirmationPopup.qml new file mode 100644 index 000000000..73b96b770 --- /dev/null +++ b/resources/qml/Governikus/HistoryView/HistoryViewConfirmationPopup.qml @@ -0,0 +1,92 @@ +import QtQuick 2.7 +import QtQuick.Controls 2.2 + +import Governikus.Global 1.0 + +Popup { + id: popupObject + property string timePeriod: "UNKNOWN" + property string popupDescriptionString: "" + property var baseItem: Item { } + x: (baseItem.width - width) / 2 + y: (baseItem.height - height) / 2 + + function setValues(pPeriodToRemove, pNewDescriptionString) { + timePeriod = pPeriodToRemove + popupDescriptionString = pNewDescriptionString + } + + modal: true + focus: true + closePolicy: Popup.CloseOnPressOutside | Popup.CloseOnEscape + width: Utils.dp(250) + height: popupColumn.height + + Column { + id: popupColumn + width: parent.width + spacing: Constants.pane_spacing + padding: Constants.pane_padding + + Text { + id: header + color: Constants.secondary_text + text: qsTr("Delete history") + settingsModel.translationTrigger + font.pixelSize: Constants.header_font_size + font.bold: true + } + + Text { + id: info + color: Constants.secondary_text + width: parent.width - 2 * Constants.pane_padding + wrapMode: Text.WordWrap + font.pixelSize: Constants.normal_font_size + text: popupObject.popupDescriptionString + } + + Row { + id: buttonBox + anchors.right: parent.right + anchors.rightMargin: Constants.pane_padding + spacing: Constants.pane_spacing + + MouseArea { + height: textItemCancel.height + 2 * Utils.dp(10) + width: textItemCancel.width + 2 * Utils.dp(10) + + Text { + id: textItemCancel + anchors.centerIn: parent + text: qsTr("Cancel") + settingsModel.translationTrigger + color: Constants.blue + font.pixelSize: Constants.titlebar_font_size + } + + onClicked: { + popupObject.close() + } + } + + MouseArea { + height: textItemDelete.height + 2 * Utils.dp(10) + width: textItemDelete.width + 2 * Utils.dp(10) + + Text { + id: textItemDelete + anchors.centerIn: parent + text: qsTr("Delete") + settingsModel.translationTrigger + color: Constants.blue + font.pixelSize: Constants.titlebar_font_size + } + + onClicked: { + var removedItems = settingsModel.removeHistory(deleteHistoryConfirmationDialog.timePeriod); + qmlExtension.showFeedback(qsTr("Removed %1 entries from the history.").arg(removedItems)) + popupObject.close() + } + } + } + } +} + diff --git a/resources/qml/Governikus/IdentifyView/+android/+tablet/IdentifyViewContent.qml b/resources/qml/Governikus/IdentifyView/+android/+tablet/IdentifyViewContent.qml index 1efe4ed76..a768e3cbd 100644 --- a/resources/qml/Governikus/IdentifyView/+android/+tablet/IdentifyViewContent.qml +++ b/resources/qml/Governikus/IdentifyView/+android/+tablet/IdentifyViewContent.qml @@ -1,88 +1,88 @@ -import QtQuick 2.5 +import QtQuick 2.7 import Governikus.Global 1.0 import Governikus.Provider 1.0 +import Governikus.TitleBar 1.0 -Item { +SectionPage { id: root - height: infoPane.height + 2 * Constants.component_spacing - - Column { - id: infoPane - anchors.top: parent.top - anchors.left: parent.left - anchors.right: parent.right - anchors.margins: Constants.component_spacing - - spacing: Constants.pane_spacing - - Text { - font.pixelSize: Constants.normal_font_size - width: parent.width - wrapMode: Text.WordWrap - text: qsTr("You are about to identify yourself towards the following service provider:") + settingsModel.translationTrigger + + leftTitleBarAction: TitleBarAction { + state: "cancel" + onClicked: authModel.cancelWorkflow() } + headerTitleBarAction: TitleBarAction { text: qsTr("Identify") + settingsModel.translationTrigger; font.bold: true } + + content: Column { + width: baseItem.width + padding: Constants.pane_padding - Pane { + Column { + width: parent.width - 2 * Constants.pane_padding + spacing: Constants.pane_spacing - Row { - height: providerEntries.height + Text { + color: Constants.secondary_text + font.pixelSize: Constants.normal_font_size width: parent.width - spacing: Constants.pane_spacing + wrapMode: Text.WordWrap + text: qsTr("You are about to identify yourself towards the following service provider:") + settingsModel.translationTrigger + } - Item { - height: providerEntries.height - width: (parent.width - Constants.pane_spacing) / 2 + Pane { - Column { - id: providerEntries - anchors.top: parent.top - anchors.left: parent.left - anchors.right: parent.right - spacing: Constants.pane_spacing + Row { + height: providerEntries.height + width: parent.width + spacing: Constants.pane_spacing - ProviderInfoSection { - imageSource: "qrc:///images/provider/information.svg" - title: qsTr("Service provider") + settingsModel.translationTrigger - name: certificateDescriptionModel.subjectName - } - ProviderInfoSection { - imageSource: "qrc:///images/provider/purpose.svg" - title: qsTr("Purpose for reading out requested data") + settingsModel.translationTrigger - name: certificateDescriptionModel.purpose + Item { + height: providerEntries.height + width: (parent.width - Constants.pane_spacing) / 2 + + Column { + id: providerEntries + anchors.top: parent.top + anchors.left: parent.left + anchors.right: parent.right + spacing: Constants.pane_spacing + + ProviderInfoSection { + imageSource: "qrc:///images/provider/information.svg" + title: qsTr("Service provider") + settingsModel.translationTrigger + name: certificateDescriptionModel.subjectName + } + ProviderInfoSection { + imageSource: "qrc:///images/provider/purpose.svg" + title: qsTr("Purpose for reading out requested data") + settingsModel.translationTrigger + name: certificateDescriptionModel.purpose + } } - } - MouseArea { - anchors.fill: parent - onClicked: firePush(certificateDescriptionPage, {}) - } + MouseArea { + anchors.fill: parent + onClicked: firePush(certificateDescriptionPage, {}) + } - CertificateDescriptionPage { - id: certificateDescriptionPage - name: certificateDescriptionModel.subjectName - visible: false + CertificateDescriptionPage { + id: certificateDescriptionPage + name: certificateDescriptionModel.subjectName + visible: false + } } - } - - Item { - height: parent.height - width: (parent.width - Constants.pane_spacing) / 2 - GButton { - id: button - iconSource: "qrc:///images/npa.svg" - anchors.horizontalCenter: parent.horizontalCenter - anchors.verticalCenter: parent.verticalCenter - buttonColor: applicationModel.currentWorkflow === "" && settingsModel.useSelfauthenticationTestUri ? Constants.red : Constants.blue + Item { + height: parent.height + width: (parent.width - Constants.pane_spacing) / 2 - text: qsTr("Identify now") + settingsModel.translationTrigger - onClicked: { - if (applicationModel.currentWorkflow === "") { - selfAuthenticationModel.startWorkflow(); - } - else if (applicationModel.currentWorkflow === "authentication") { + GButton { + id: button + iconSource: "qrc:///images/npa.svg" + anchors.horizontalCenter: parent.horizontalCenter + anchors.verticalCenter: parent.verticalCenter + text: qsTr("Identify now") + settingsModel.translationTrigger + onClicked: { chatModel.transferAccessRights() numberModel.continueWorkflow() } @@ -90,65 +90,67 @@ Item { } } } - } - - Text { - font.pixelSize: Constants.normal_font_size - width: parent.width - wrapMode: Text.WordWrap - text: qsTr("The following data will be transferred to the service provider when you enter the PIN:") + settingsModel.translationTrigger - } - Pane { - Column { - height: childrenRect.height + Text { + color: Constants.secondary_text + font.pixelSize: Constants.normal_font_size width: parent.width - spacing: Utils.dp(30) + wrapMode: Text.WordWrap + text: qsTr("The following data will be transferred to the service provider when you enter the PIN:") + settingsModel.translationTrigger + } + Pane { Column { - id: transactionInfo - + height: childrenRect.height width: parent.width - visible: !!transactionInfoText.text - - Text { - height: implicitHeight * 1.5 - verticalAlignment: Text.AlignTop - text: qsTr("Transactional information") + settingsModel.translationTrigger - color: Constants.blue - font.pixelSize: Constants.header_font_size - elide: Text.ElideRight - } + spacing: Utils.dp(30) - Text { - id: transactionInfoText + Column { + id: transactionInfo width: parent.width - font.pixelSize: Constants.normal_font_size - text: authModel.transactionInfo - wrapMode: Text.WordWrap + visible: !!transactionInfoText.text + + Text { + height: implicitHeight * 1.5 + verticalAlignment: Text.AlignTop + text: qsTr("Transactional information") + settingsModel.translationTrigger + color: Constants.blue + font.pixelSize: Constants.header_font_size + elide: Text.ElideRight + } + + Text { + id: transactionInfoText + color: Constants.secondary_text + + width: parent.width + font.pixelSize: Constants.normal_font_size + text: authModel.transactionInfo + wrapMode: Text.WordWrap + } } - } - Row { - width: parent.width - spacing: Constants.pane_spacing + Row { + width: parent.width + spacing: Constants.pane_spacing - DataGroup { - id: requiredData - width: optionalData.visible ? parent.width * 0.63 : parent.width + DataGroup { + id: requiredData + width: optionalData.visible ? parent.width * 0.63 : parent.width - title: qsTr("Required Data") + settingsModel.translationTrigger - columns: optionalData.visible ? 2 : 3 - chat: chatModel.required - } + title: qsTr("Required Data") + settingsModel.translationTrigger + columns: optionalData.visible ? 2 : 3 + chat: chatModel.required + } - DataGroup { - id: optionalData - width: parent.width * 0.37 - Constants.pane_spacing + DataGroup { + id: optionalData + width: parent.width * 0.37 - Constants.pane_spacing - title: qsTr("Optional Data") + settingsModel.translationTrigger - chat: chatModel.optional + title: qsTr("Optional Data") + settingsModel.translationTrigger + chat: chatModel.optional + } } } } diff --git a/resources/qml/Governikus/IdentifyView/+android/DataGroup.qml b/resources/qml/Governikus/IdentifyView/+android/DataGroup.qml index f272be0c7..f3f9f62eb 100644 --- a/resources/qml/Governikus/IdentifyView/+android/DataGroup.qml +++ b/resources/qml/Governikus/IdentifyView/+android/DataGroup.qml @@ -37,6 +37,7 @@ Rectangle { visible: repeater.count < 1 Text { id: emptyText + color: Constants.secondary_text anchors.verticalCenter: parent.verticalCenter width: parent.width font.pixelSize: Constants.normal_font_size @@ -70,6 +71,7 @@ Rectangle { Text { id: text + color: Constants.secondary_text anchors.verticalCenter: parent.verticalCenter anchors.left: parent.left anchors.right: checkBox.left diff --git a/resources/qml/Governikus/IdentifyView/+android/IdentifyViewContent.qml b/resources/qml/Governikus/IdentifyView/+android/IdentifyViewContent.qml index 94d14cd93..252d56372 100644 --- a/resources/qml/Governikus/IdentifyView/+android/IdentifyViewContent.qml +++ b/resources/qml/Governikus/IdentifyView/+android/IdentifyViewContent.qml @@ -1,134 +1,138 @@ -import QtQuick 2.5 +import QtQuick 2.7 import Governikus.Global 1.0 import Governikus.Provider 1.0 +import Governikus.TitleBar 1.0 -Item { - height: identifycolumn.height + Utils.dp(30) +SectionPage { + id: baseItem - Column { - id: identifycolumn - anchors.top: parent.top - anchors.left: parent.left - anchors.right: parent.right - anchors.margins: Constants.component_spacing - - spacing: Constants.component_spacing + leftTitleBarAction: TitleBarAction { + state: "cancel" + onClicked: authModel.cancelWorkflow() + } + headerTitleBarAction: TitleBarAction { text: qsTr("Identify") + settingsModel.translationTrigger; font.bold: true } - Text { - font.pixelSize: Constants.normal_font_size - width: parent.width - wrapMode: Text.WordWrap - text: qsTr("You are about to identify yourself towards the following service provider:") + settingsModel.translationTrigger - } + content: Column { + width: baseItem.width + padding: Constants.pane_padding - Pane { + Column { + width: parent.width - 2 * Constants.pane_padding + spacing: Constants.component_spacing - Item { + Text { + color: Constants.secondary_text + font.pixelSize: Constants.normal_font_size width: parent.width - height: providerEntries.height + wrapMode: Text.WordWrap + text: qsTr("You are about to identify yourself towards the following service provider:") + settingsModel.translationTrigger + } - Column { - id: providerEntries - anchors.top: parent.top - anchors.left: parent.left - anchors.right: forwardAction.left - spacing: Constants.pane_spacing - - ProviderInfoSection { - imageSource: "qrc:///images/provider/information.svg" - title: qsTr("Service provider") + settingsModel.translationTrigger - name: certificateDescriptionModel.subjectName - } - ProviderInfoSection { - imageSource: "qrc:///images/provider/purpose.svg" - title: qsTr("Purpose for reading out requested data") + settingsModel.translationTrigger - name: certificateDescriptionModel.purpose + Pane { + + Item { + width: parent.width + height: providerEntries.height + + Column { + id: providerEntries + anchors.top: parent.top + anchors.left: parent.left + anchors.right: forwardAction.left + spacing: Constants.pane_spacing + + ProviderInfoSection { + imageSource: "qrc:///images/provider/information.svg" + title: qsTr("Service provider") + settingsModel.translationTrigger + name: certificateDescriptionModel.subjectName + } + ProviderInfoSection { + imageSource: "qrc:///images/provider/purpose.svg" + title: qsTr("Purpose for reading out requested data") + settingsModel.translationTrigger + name: certificateDescriptionModel.purpose + } } - } - Text { - id: forwardAction - anchors.right: parent.right - anchors.verticalCenter: providerEntries.verticalCenter + Text { + id: forwardAction + anchors.right: parent.right + anchors.verticalCenter: providerEntries.verticalCenter - text: ">" - font.pixelSize: Utils.sp(22) - color: Constants.grey - } + text: ">" + font.pixelSize: Utils.sp(22) + color: Constants.grey + } - MouseArea { - anchors.fill: parent - onClicked: firePush(certificateDescriptionPage, {}) - } + MouseArea { + anchors.fill: parent + onClicked: firePush(certificateDescriptionPage, {}) + } - CertificateDescriptionPage { - id: certificateDescriptionPage - name: certificateDescriptionModel.subjectName - visible: false + CertificateDescriptionPage { + id: certificateDescriptionPage + name: certificateDescriptionModel.subjectName + visible: false + } } } - } - GButton { - iconSource: "qrc:///images/npa.svg" - anchors.horizontalCenter: parent.horizontalCenter - buttonColor: applicationModel.currentWorkflow === "" && settingsModel.useSelfauthenticationTestUri ? Constants.red : Constants.blue - text: qsTr("Identify now") + settingsModel.translationTrigger; - onClicked: { - if (applicationModel.currentWorkflow === "") { - selfAuthenticationModel.startWorkflow(); - } - else if (applicationModel.currentWorkflow === "authentication") { + GButton { + iconSource: "qrc:///images/npa.svg" + anchors.horizontalCenter: parent.horizontalCenter + text: qsTr("Identify now") + settingsModel.translationTrigger; + onClicked: { chatModel.transferAccessRights() numberModel.continueWorkflow() } } - } - - Text { - font.pixelSize: Constants.normal_font_size - width: parent.width - wrapMode: Text.WordWrap - text: qsTr("The following data will be transferred to the service provider when you enter the PIN:") + settingsModel.translationTrigger - } - - Pane { - width: parent.width - Column { - id: transactionInfo + Text { + color: Constants.secondary_text + font.pixelSize: Constants.normal_font_size + width: parent.width + wrapMode: Text.WordWrap + text: qsTr("The following data will be transferred to the service provider when you enter the PIN:") + settingsModel.translationTrigger + } + Pane { width: parent.width - visible: !!transactionInfoText.text - - Text { - height: implicitHeight * 1.5 - verticalAlignment: Text.AlignTop - text: qsTr("Transactional information") + settingsModel.translationTrigger - color: Constants.blue - font.pixelSize: Constants.header_font_size - elide: Text.ElideRight - } - Text { - id: transactionInfoText + Column { + id: transactionInfo width: parent.width - font.pixelSize: Constants.normal_font_size - text: authModel.transactionInfo - wrapMode: Text.WordWrap + visible: !!transactionInfoText.text + + Text { + height: implicitHeight * 1.5 + verticalAlignment: Text.AlignTop + text: qsTr("Transactional information") + settingsModel.translationTrigger + color: Constants.blue + font.pixelSize: Constants.header_font_size + elide: Text.ElideRight + } + + Text { + id: transactionInfoText + color: Constants.secondary_text + + width: parent.width + font.pixelSize: Constants.normal_font_size + text: authModel.transactionInfo + wrapMode: Text.WordWrap + } } - } - DataGroup { - title: qsTr("Required Data") + settingsModel.translationTrigger - chat: chatModel.required - } + DataGroup { + title: qsTr("Required Data") + settingsModel.translationTrigger + chat: chatModel.required + } - DataGroup { - title: qsTr("Optional Data") + settingsModel.translationTrigger - chat: chatModel.optional + DataGroup { + title: qsTr("Optional Data") + settingsModel.translationTrigger + chat: chatModel.optional + } } } } diff --git a/resources/qml/Governikus/IdentifyView/+ios/+tablet/DataGroup.qml b/resources/qml/Governikus/IdentifyView/+ios/+tablet/DataGroup.qml index f272be0c7..38cc8d6d2 100644 --- a/resources/qml/Governikus/IdentifyView/+ios/+tablet/DataGroup.qml +++ b/resources/qml/Governikus/IdentifyView/+ios/+tablet/DataGroup.qml @@ -36,6 +36,7 @@ Rectangle { height: Utils.dp(40) visible: repeater.count < 1 Text { + color: Constants.secondary_text id: emptyText anchors.verticalCenter: parent.verticalCenter width: parent.width @@ -70,6 +71,7 @@ Rectangle { Text { id: text + color: Constants.secondary_text anchors.verticalCenter: parent.verticalCenter anchors.left: parent.left anchors.right: checkBox.left diff --git a/resources/qml/Governikus/IdentifyView/+ios/+tablet/IdentifyViewContent.qml b/resources/qml/Governikus/IdentifyView/+ios/+tablet/IdentifyViewContent.qml index f22afb3ce..55fad1bad 100644 --- a/resources/qml/Governikus/IdentifyView/+ios/+tablet/IdentifyViewContent.qml +++ b/resources/qml/Governikus/IdentifyView/+ios/+tablet/IdentifyViewContent.qml @@ -1,147 +1,152 @@ -import QtQuick 2.5 +import QtQuick 2.7 import Governikus.Global 1.0 import Governikus.Provider 1.0 +import Governikus.TitleBar 1.0 -Item { - height: identifycolumn.height + Utils.dp(30) +SectionPage { + id: baseItem - Column { - id: identifycolumn - anchors.top: parent.top - anchors.left: parent.left - anchors.right: parent.right - anchors.margins: Constants.component_spacing - - spacing: Constants.component_spacing - - Text { - font.pixelSize: Constants.normal_font_size - width: parent.width - wrapMode: Text.WordWrap - text: qsTr("You are about to identify yourself towards the following service provider:") + settingsModel.translationTrigger + leftTitleBarAction: TitleBarAction { + state: "cancel" + onClicked: authModel.cancelWorkflow() } + headerTitleBarAction: TitleBarAction { text: qsTr("Identify") + settingsModel.translationTrigger; font.bold: true } - Pane { + content: Column { + width: baseItem.width + padding: Constants.pane_padding - Item { + Column { + width: parent.width - 2 * Constants.pane_padding + spacing: Constants.component_spacing + + Text { + color: Constants.secondary_text + font.pixelSize: Constants.normal_font_size width: parent.width - height: providerEntries.height + wrapMode: Text.WordWrap + text: qsTr("You are about to identify yourself towards the following service provider:") + settingsModel.translationTrigger + } - Column { - id: providerEntries - anchors.top: parent.top - anchors.left: parent.left - anchors.right: forwardAction.left - spacing: Constants.pane_spacing - - ProviderInfoSection { - imageSource: "qrc:///images/provider/information.svg" - title: qsTr("Service provider") + settingsModel.translationTrigger - name: certificateDescriptionModel.subjectName - } - ProviderInfoSection { - imageSource: "qrc:///images/provider/purpose.svg" - title: qsTr("Purpose for reading out requested data") + settingsModel.translationTrigger - name: certificateDescriptionModel.purpose + Pane { + + Item { + width: parent.width + height: providerEntries.height + + Column { + id: providerEntries + anchors.top: parent.top + anchors.left: parent.left + anchors.right: forwardAction.left + spacing: Constants.pane_spacing + + ProviderInfoSection { + imageSource: "qrc:///images/provider/information.svg" + title: qsTr("Service provider") + settingsModel.translationTrigger + name: certificateDescriptionModel.subjectName + } + ProviderInfoSection { + imageSource: "qrc:///images/provider/purpose.svg" + title: qsTr("Purpose for reading out requested data") + settingsModel.translationTrigger + name: certificateDescriptionModel.purpose + } } - } - Text { - id: forwardAction - anchors.right: parent.right - anchors.verticalCenter: providerEntries.verticalCenter + Text { + id: forwardAction + anchors.right: parent.right + anchors.verticalCenter: providerEntries.verticalCenter - text: ">" - font.pixelSize: Utils.sp(22) - color: Constants.grey - } + text: ">" + font.pixelSize: Utils.sp(22) + color: Constants.grey + } - MouseArea { - anchors.fill: parent - onClicked: firePush(certificateDescriptionPage, {}) - } + MouseArea { + anchors.fill: parent + onClicked: firePush(certificateDescriptionPage, {}) + } - CertificateDescriptionPage { - id: certificateDescriptionPage - name: certificateDescriptionModel.subjectName - visible: false + CertificateDescriptionPage { + id: certificateDescriptionPage + name: certificateDescriptionModel.subjectName + visible: false + } } } - } - GButton { - anchors.horizontalCenter: parent.horizontalCenter - buttonColor: applicationModel.currentWorkflow === "" && settingsModel.useSelfauthenticationTestUri ? Constants.red : Constants.blue - text: qsTr("Identify now") + settingsModel.translationTrigger; - onClicked: { - if (applicationModel.currentWorkflow === "") { - selfAuthenticationModel.startWorkflow(); - } - else if (applicationModel.currentWorkflow === "authentication") { + GButton { + iconSource: "qrc:///images/npa.svg" + anchors.horizontalCenter: parent.horizontalCenter + text: qsTr("Identify now") + settingsModel.translationTrigger; + onClicked: { chatModel.transferAccessRights() numberModel.continueWorkflow() } } - } - Text { - font.pixelSize: Constants.normal_font_size - width: parent.width - wrapMode: Text.WordWrap - text: qsTr("The following data will be transferred to the service provider when you enter the PIN:") + settingsModel.translationTrigger - } - - Pane { - Column { - height: childrenRect.height + Text { + color: Constants.secondary_text + font.pixelSize: Constants.normal_font_size width: parent.width - spacing: Utils.dp(30) + wrapMode: Text.WordWrap + text: qsTr("The following data will be transferred to the service provider when you enter the PIN:") + settingsModel.translationTrigger + } + Pane { Column { - id: transactionInfo - + height: childrenRect.height width: parent.width - visible: !!transactionInfoText.text + spacing: Utils.dp(30) - Text { - height: implicitHeight * 1.5 - verticalAlignment: Text.AlignTop - text: qsTr("Transactional information") + settingsModel.translationTrigger - color: Constants.blue - font.pixelSize: Constants.header_font_size - elide: Text.ElideRight - } - - Text { - id: transactionInfoText + Column { + id: transactionInfo width: parent.width - font.pixelSize: Constants.normal_font_size - text: authModel.transactionInfo - wrapMode: Text.WordWrap + visible: !!transactionInfoText.text + + Text { + height: implicitHeight * 1.5 + verticalAlignment: Text.AlignTop + text: qsTr("Transactional information") + settingsModel.translationTrigger + color: Constants.blue + font.pixelSize: Constants.header_font_size + elide: Text.ElideRight + } + + Text { + id: transactionInfoText + color: Constants.secondary_text + + width: parent.width + font.pixelSize: Constants.normal_font_size + text: authModel.transactionInfo + wrapMode: Text.WordWrap + } } - } - Row { - width: parent.width - spacing: Constants.pane_spacing + Row { + width: parent.width + spacing: Constants.pane_spacing - DataGroup { - id: requiredData - width: optionalData.visible ? parent.width * 0.63 : parent.width + DataGroup { + id: requiredData + width: optionalData.visible ? parent.width * 0.63 : parent.width - title: qsTr("Required Data") + settingsModel.translationTrigger - columns: optionalData.visible ? 2 : 3 - chat: chatModel.required - } + title: qsTr("Required Data") + settingsModel.translationTrigger + columns: optionalData.visible ? 2 : 3 + chat: chatModel.required + } - DataGroup { - id: optionalData - width: parent.width * 0.37 - Constants.pane_spacing + DataGroup { + id: optionalData + width: parent.width * 0.37 - Constants.pane_spacing - title: qsTr("Optional Data") + settingsModel.translationTrigger - chat: chatModel.optional + title: qsTr("Optional Data") + settingsModel.translationTrigger + chat: chatModel.optional + } } } } diff --git a/resources/qml/Governikus/IdentifyView/+ios/DataGroup.qml b/resources/qml/Governikus/IdentifyView/+ios/DataGroup.qml index 7d659c2e9..3eae86b1e 100644 --- a/resources/qml/Governikus/IdentifyView/+ios/DataGroup.qml +++ b/resources/qml/Governikus/IdentifyView/+ios/DataGroup.qml @@ -12,8 +12,6 @@ Pane { id: pane spacing: 0 visible: repeater.count > 0 - anchors.topMargin: Constants.component_spacing - anchors.top: header.bottom Repeater { id: repeater @@ -25,6 +23,7 @@ Pane { color: "white" Text { id: dataGroup + color: Constants.secondary_text anchors.left: parent.left anchors.verticalCenter: parent.verticalCenter anchors.right: checkBox.left diff --git a/resources/qml/Governikus/IdentifyView/+ios/IdentifyViewContent.qml b/resources/qml/Governikus/IdentifyView/+ios/IdentifyViewContent.qml index 65b2cfb4b..e3233e3fe 100644 --- a/resources/qml/Governikus/IdentifyView/+ios/IdentifyViewContent.qml +++ b/resources/qml/Governikus/IdentifyView/+ios/IdentifyViewContent.qml @@ -1,120 +1,126 @@ -import QtQuick 2.5 +import QtQuick 2.7 import Governikus.Global 1.0 import Governikus.Provider 1.0 +import Governikus.TitleBar 1.0 -Item { - height: identifycolumn.height + Utils.dp(30) +SectionPage { + id: baseItem - Column { - id: identifycolumn - anchors.top: parent.top - anchors.left: parent.left - anchors.right: parent.right - anchors.margins: Constants.component_spacing + leftTitleBarAction: TitleBarAction { + state: "cancel" + onClicked: authModel.cancelWorkflow() + } + headerTitleBarAction: TitleBarAction { text: qsTr("Identify") + settingsModel.translationTrigger; font.bold: true } - spacing: Constants.component_spacing + content: Column { + width: baseItem.width + padding: Constants.pane_padding - Text { - font.pixelSize: Constants.normal_font_size - width: parent.width - wrapMode: Text.WordWrap - text: qsTr("You are about to identify yourself towards the following service provider:") + settingsModel.translationTrigger - } + Column { + width: parent.width - 2 * Constants.pane_padding - Pane { + spacing: Constants.component_spacing - Item { + Text { + color: Constants.secondary_text + font.pixelSize: Constants.normal_font_size width: parent.width - height: providerEntries.height - - Column { - id: providerEntries - anchors.top: parent.top - anchors.left: parent.left - anchors.right: forwardAction.left - spacing: Constants.pane_spacing - - ProviderInfoSection { - imageSource: "qrc:///images/provider/information.svg" - title: qsTr("Service provider") + settingsModel.translationTrigger - name: certificateDescriptionModel.subjectName - } - ProviderInfoSection { - imageSource: "qrc:///images/provider/purpose.svg" - title: qsTr("Purpose for reading out requested data") + settingsModel.translationTrigger - name: certificateDescriptionModel.purpose + wrapMode: Text.WordWrap + text: qsTr("You are about to identify yourself towards the following service provider:") + settingsModel.translationTrigger + } + + Pane { + + Item { + width: parent.width + height: providerEntries.height + + Column { + id: providerEntries + anchors.top: parent.top + anchors.left: parent.left + anchors.right: forwardAction.left + spacing: Constants.pane_spacing + + ProviderInfoSection { + imageSource: "qrc:///images/provider/information.svg" + title: qsTr("Service provider") + settingsModel.translationTrigger + name: certificateDescriptionModel.subjectName + } + ProviderInfoSection { + imageSource: "qrc:///images/provider/purpose.svg" + title: qsTr("Purpose for reading out requested data") + settingsModel.translationTrigger + name: certificateDescriptionModel.purpose + } } - } - Text { - id: forwardAction - anchors.right: parent.right - anchors.verticalCenter: providerEntries.verticalCenter + Text { + id: forwardAction + anchors.right: parent.right + anchors.verticalCenter: providerEntries.verticalCenter - text: ">" - font.pixelSize: Utils.sp(22) - color: Constants.grey - } + text: ">" + font.pixelSize: Utils.sp(22) + color: Constants.grey + } - MouseArea { - anchors.fill: parent - onClicked: firePush(certificateDescriptionPage, {}) - } + MouseArea { + anchors.fill: parent + onClicked: firePush(certificateDescriptionPage, {}) + } - CertificateDescriptionPage { - id: certificateDescriptionPage - name: certificateDescriptionModel.subjectName - visible: false + CertificateDescriptionPage { + id: certificateDescriptionPage + name: certificateDescriptionModel.subjectName + visible: false + } } } - } - GButton { - anchors.horizontalCenter: parent.horizontalCenter - buttonColor: applicationModel.currentWorkflow === "" && settingsModel.useSelfauthenticationTestUri ? Constants.red : Constants.blue - text: qsTr("Identify now") + settingsModel.translationTrigger; - onClicked: { - if (applicationModel.currentWorkflow === "") { - selfAuthenticationModel.startWorkflow(); - } - else if (applicationModel.currentWorkflow === "authentication") { + GButton { + iconSource: "qrc:///images/npa.svg" + anchors.horizontalCenter: parent.horizontalCenter + text: qsTr("Identify now") + settingsModel.translationTrigger; + onClicked: { chatModel.transferAccessRights() numberModel.continueWorkflow() } } - } - - Text { - font.pixelSize: Constants.normal_font_size - width: parent.width - wrapMode: Text.WordWrap - text: qsTr("The following data will be transferred to the service provider when you enter the PIN:") + settingsModel.translationTrigger - } - - Pane { - id: transactionInfo - title: qsTr("Transactional information") + settingsModel.translationTrigger - visible: !!transactionInfoText.text Text { - id: transactionInfoText - - width: parent.width + color: Constants.secondary_text font.pixelSize: Constants.normal_font_size - text: authModel.transactionInfo + width: parent.width wrapMode: Text.WordWrap + text: qsTr("The following data will be transferred to the service provider when you enter the PIN:") + settingsModel.translationTrigger } - } - DataGroup { - title: qsTr("Required Data") + settingsModel.translationTrigger - chat: chatModel.required - } + Pane { + id: transactionInfo + title: qsTr("Transactional information") + settingsModel.translationTrigger + visible: !!transactionInfoText.text + + Text { + id: transactionInfoText + color: Constants.secondary_text - DataGroup { - title: qsTr("Optional Data") + settingsModel.translationTrigger - chat: chatModel.optional + width: parent.width + font.pixelSize: Constants.normal_font_size + text: authModel.transactionInfo + wrapMode: Text.WordWrap + } + } + + DataGroup { + title: qsTr("Required Data") + settingsModel.translationTrigger + chat: chatModel.required + } + + DataGroup { + title: qsTr("Optional Data") + settingsModel.translationTrigger + chat: chatModel.optional + } } } } diff --git a/resources/qml/Governikus/IdentifyView/+ios/IdentifyViewHeader.qml b/resources/qml/Governikus/IdentifyView/+ios/IdentifyViewHeader.qml deleted file mode 100644 index 62ae18835..000000000 --- a/resources/qml/Governikus/IdentifyView/+ios/IdentifyViewHeader.qml +++ /dev/null @@ -1,97 +0,0 @@ -import QtQuick 2.5 -import QtQuick.Controls 1.4 -import QtQuick.Controls.Styles 1.4 -import QtGraphicalEffects 1.0 -import QtQuick.Layouts 1.2 - -import Governikus.Global 1.0 - - -Item { - id: header - /* this is interpreted by the SectionPage component */ - readonly property real titleBarOpacity: shadow.opacity === 1 ? 1 : 0 - - Image { - id: dna - width: parent.width - source: "qrc:///images/iOS/Header-Ausweisapp@3x.png" - anchors.top: parent.top - anchors.bottom: parent.bottom - anchors.bottomMargin: (parent.height - 2 * Constants.titlebar_height) * transition() - - function transition() { - return Math.min(1, contentY / Constants.titlebar_height) - } - - Rectangle { - id: shadow - anchors.fill: parent - color: Constants.blue - opacity: Math.min(1, 0.5 + parent.transition() * 0.5) - } - } - - Item { - anchors.left: parent.left - anchors.right: parent.right - anchors.bottom: information.top - - LocationButton { - id: lang_de - - language: "de" - name: "DE" - image: "qrc:///images/location_flag_de.svg" - - anchors.margins: Constants.component_spacing - anchors.bottom: parent.bottom - anchors.right: lang_en.left - } - - LocationButton { - id: lang_en - - language: "en" - name: "EN" - image: "qrc:///images/location_flag_en.svg" - - anchors.margins: Constants.component_spacing - anchors.bottom: parent.bottom - anchors.right: parent.right - } - } - - Item { - id: information - height: Math.max(npa.height, text.height) - anchors.margins: Constants.component_spacing - anchors.left: parent.left - anchors.right: parent.right - anchors.bottom: parent.bottom - - Image { - id: npa - anchors.left: parent.left - anchors.verticalCenter: information.verticalCenter - - height: Utils.dp(60) - width: height - source: "qrc:///images/npa.svg" - } - Text { - id: text - anchors.verticalCenter: npa.verticalCenter - anchors.left: npa.right - anchors.leftMargin: Constants.component_spacing - anchors.right: parent.right - - text: ((applicationModel.currentWorkflow !== "authentication") ? - qsTr("Hello, here you have the opportunity to view the stored data on your identity card.") : - qsTr("Hello, \"%1\" wants to read your data.").arg(certificateDescriptionModel.subjectName) - ) + settingsModel.translationTrigger - wrapMode: Text.WordWrap - font.pixelSize: Constants.normal_font_size - } - } -} diff --git a/resources/qml/Governikus/IdentifyView/IdentifyController.qml b/resources/qml/Governikus/IdentifyView/IdentifyController.qml index 876cc8e20..ed9d47b5e 100644 --- a/resources/qml/Governikus/IdentifyView/IdentifyController.qml +++ b/resources/qml/Governikus/IdentifyView/IdentifyController.qml @@ -53,21 +53,9 @@ Item { navBar.currentIndex = 0 break case "StateEditAccessRights": - if (applicationModel.currentWorkflow === "selfauthentication") { - chatModel.transferAccessRights() - numberModel.continueWorkflow() - } - if (applicationModel.currentWorkflow === "authentication") { - firePopAll() - } + firePush(identifyViewContent, {}) - if (Qt.platform.os === "android") { - authModel.readerPlugInType = "NFC"; - } else if (Qt.platform.os === "ios") { - authModel.readerPlugInType = "BLUETOOTH"; - } else { - authModel.readerPlugInType = "PCSC"; - } + authModel.setInitialPluginType() break case "StateSelectReader": firePush(identifyWorkflow, {}) @@ -96,15 +84,33 @@ Item { setIdentifyWorkflowStateAndRequestInput("identify_enterpin", "PIN") break case "StateDidAuthenticateEac1": + identifyProgressView.progressBarVisible = true + setIdentifyProgressViewValue(1) setIdentifyWorkflowStateAndContinue("identify_processing") break case "StateEstablishPacePuk": authModel.cancelWorkflowOnPinBlocked() break + case "StateDidAuthenticateEac2": + setIdentifyProgressViewValue(2) + numberModel.continueWorkflow() + break + case "StateTransmit": + setIdentifyProgressViewValue(3) + numberModel.continueWorkflow() + break case "StateCleanUpReaderManager": controller.showRemoveCardFeedback = numberModel.cardConnected && !authModel.isError; numberModel.continueWorkflow() break; + case "StateCheckRefreshAddress": + setIdentifyProgressViewValue(4) + numberModel.continueWorkflow() + break + case "StateWriteHistory": + setIdentifyProgressViewValue(5) + numberModel.continueWorkflow() + break case "FinalState": navBar.lockedAndHidden = true if (controller.showRemoveCardFeedback) { @@ -123,12 +129,18 @@ Item { navBar.lockedAndHidden = false } } + identifyProgressView.progressBarVisible = false + setIdentifyProgressViewValue(0) break default: numberModel.continueWorkflow() } } + function setIdentifyProgressViewValue(value){ + identifyProgressView.progressValue = value + } + function setIdentifyWorkflowState(pState) { identifyWorkflow.state = pState } diff --git a/resources/qml/Governikus/IdentifyView/IdentifyView.qml b/resources/qml/Governikus/IdentifyView/IdentifyView.qml index 328c663c2..7a07fa607 100644 --- a/resources/qml/Governikus/IdentifyView/IdentifyView.qml +++ b/resources/qml/Governikus/IdentifyView/IdentifyView.qml @@ -18,14 +18,21 @@ SectionPage } headerTitleBarAction: TitleBarAction { text: qsTr("Identify") + settingsModel.translationTrigger; font.bold: true } - content: IdentifyViewContent { + content: IdentifyViewInfo { + id: identifyViewInfo width: identifyEditChatView.width + height: identifyEditChatView.height } IdentifyController { id: identifyController } + IdentifyViewContent { + id: identifyViewContent + visible: false + } + SelfAuthenticationData { id: selfAuthenticationData visible: false @@ -54,7 +61,7 @@ SectionPage leftTitleBarAction: TitleBarAction { state: authModel.isBasicReader ? "cancel" : "hidden"; onClicked: authModel.cancelWorkflow() } headerTitleBarAction: TitleBarAction { text: qsTr("Identify") + settingsModel.translationTrigger; font.bold: true } visible: false - text: qsTr("Authenticate") + settingsModel.translationTrigger + text: qsTr("Authentication in progress") + settingsModel.translationTrigger subText: (!visible ? "" : authModel.isBasicReader ? qsTr("Please wait a moment...") : @@ -70,7 +77,16 @@ SectionPage qsTr("You have entered a wrong PIN three times. Your PIN is now blocked. You have to enter the PUK now for unblocking.") : qsTr("Please wait a moment...") ) + settingsModel.translationTrigger - subTextColor: !authModel.isBasicReader && (numberModel.inputError || numberModel.pinDeactivated || state === "identify_entercan" || state === "enterpuk") ? "red" : "black" + subTextColor: !authModel.isBasicReader && (numberModel.inputError || numberModel.pinDeactivated || state === "identify_entercan" || state === "enterpuk") ? "red" : Constants.secondary_text + progressValue: 0 + progressText: (progressValue == 0 ? "" : + progressValue == 1 ? qsTr("Service provider is being verified") : + progressValue == 2 ? qsTr("Card is being verified") : + progressValue == 3 ? qsTr("Reading data") : + progressValue == 4 ? qsTr("Sending data to service provider") : + progressValue == 5 ? qsTr("Preparing results") : + "") + settingsModel.translationTrigger + progressBarVisible: false } ProgressView { diff --git a/resources/qml/Governikus/IdentifyView/IdentifyViewInfo.qml b/resources/qml/Governikus/IdentifyView/IdentifyViewInfo.qml new file mode 100644 index 000000000..66d608ad0 --- /dev/null +++ b/resources/qml/Governikus/IdentifyView/IdentifyViewInfo.qml @@ -0,0 +1,71 @@ +import QtQuick 2.7 + +import Governikus.Global 1.0 +import Governikus.TitleBar 1.0 + + +Item { + id: baseItem + Column { + readonly property int maxWidth: width - 2 * Constants.pane_padding + width: baseItem.width + + id: root + spacing: Constants.component_spacing + padding: Constants.pane_padding + + Item { + height: childrenRect.height + width: root.maxWidth + Image { + id: useNpa + anchors.left: parent.left + width: parent.width * 0.4 + fillMode: Image.PreserveAspectFit + source: "qrc:///images/siteWithLogo.png" + } + + Text { + color: Constants.secondary_text + font.pixelSize: Constants.normal_font_size + anchors.verticalCenter: useNpa.verticalCenter + anchors.leftMargin: Constants.component_spacing + wrapMode: Text.WordWrap + anchors.left: useNpa.right + anchors.right: parent.right + text: qsTr("You can use your ID card anywhere you see this logo.") + settingsModel.translationTrigger + } + } + + Pane { + anchors.leftMargin: Constants.pane_padding + anchors.rightMargin: Constants.pane_padding + Text { + id: info + color: Constants.secondary_text + font.pixelSize: Constants.normal_font_size + wrapMode: Text.WordWrap + anchors.left: parent.left + anchors.right: parent.right + text: qsTr("Use the button 'See my personal data' to display the data stored on your ID card." + + " An Internet connection is required to display the data." + + " Your personal data is neither saved nor processed in any way.") + + settingsModel.translationTrigger + } + } + } + + GButton { + iconSource: "qrc:///images/npa.svg" + anchors.bottom: baseItem.bottom + anchors.bottomMargin: Constants.pane_padding + anchors.horizontalCenter: parent.horizontalCenter + buttonColor: settingsModel.useSelfauthenticationTestUri ? Constants.red : Constants.blue + text: qsTr("See my personal data") + settingsModel.translationTrigger + + enabled: applicationModel.currentWorkflow !== "authentication" + onClicked: { + selfAuthenticationModel.startWorkflow() + } + } +} diff --git a/resources/qml/Governikus/IdentifyView/SelfAuthenticationData.qml b/resources/qml/Governikus/IdentifyView/SelfAuthenticationData.qml index c21b4d7ea..d1ac5dd79 100644 --- a/resources/qml/Governikus/IdentifyView/SelfAuthenticationData.qml +++ b/resources/qml/Governikus/IdentifyView/SelfAuthenticationData.qml @@ -81,7 +81,7 @@ SectionPage { anchors.horizontalCenter: parent.horizontalCenter anchors.bottom: parent.bottom anchors.bottomMargin: Constants.component_spacing - text: qsTr("Ok") + settingsModel.translationTrigger + text: qsTr("OK") + settingsModel.translationTrigger onClicked: root.close() } } diff --git a/resources/qml/Governikus/InformationView/Information.qml b/resources/qml/Governikus/InformationView/Information.qml index ba75629f5..11cb59227 100644 --- a/resources/qml/Governikus/InformationView/Information.qml +++ b/resources/qml/Governikus/InformationView/Information.qml @@ -35,6 +35,7 @@ SectionPage { text: titleText } Text { + color: Constants.secondary_text width: parent.width font.pixelSize: Constants.normal_font_size wrapMode: Text.WordWrap @@ -74,6 +75,7 @@ SectionPage { } Text { id: subtitle + color: Constants.secondary_text anchors.left: parent.left anchors.right: parent.right text: qsTr("Here you are in the right place.") + settingsModel.translationTrigger diff --git a/resources/qml/Governikus/MoreView/MoreView.qml b/resources/qml/Governikus/MoreView/MoreView.qml index ffdefce93..ef971d8af 100644 --- a/resources/qml/Governikus/MoreView/MoreView.qml +++ b/resources/qml/Governikus/MoreView/MoreView.qml @@ -16,6 +16,13 @@ SectionPage { color: "white" } + + onVisibleChanged: { + if (visible) { + remoteServiceModel.detectRemoteDevices = false + } + } + Column { id: menu width: parent.width @@ -65,7 +72,10 @@ SectionPage { imageSource: "qrc:///images/android/navigation/remotesettings.svg" text: qsTr("Configure remote service") + settingsModel.translationTrigger showRightArrow: true - onClicked: firePush(remoteServiceSettings, {}) + onClicked: { + remoteServiceModel.detectRemoteDevices = true + firePush(remoteServiceSettings, {}) + } } MoreViewMenuItem { diff --git a/resources/qml/Governikus/MoreView/MoreViewMenuItem.qml b/resources/qml/Governikus/MoreView/MoreViewMenuItem.qml index 9d4efa096..d6f4740c0 100644 --- a/resources/qml/Governikus/MoreView/MoreViewMenuItem.qml +++ b/resources/qml/Governikus/MoreView/MoreViewMenuItem.qml @@ -25,6 +25,7 @@ Item { Text { id: textItem + color: Constants.secondary_text height: parent.height verticalAlignment: Text.AlignVCenter anchors.left: imageItem.right diff --git a/resources/qml/Governikus/Navigation/+android/Navigation.qml b/resources/qml/Governikus/Navigation/+android/Navigation.qml index 72180c9c7..1a2e11897 100644 --- a/resources/qml/Governikus/Navigation/+android/Navigation.qml +++ b/resources/qml/Governikus/Navigation/+android/Navigation.qml @@ -7,6 +7,7 @@ Item { id: navigation state: "identify" width: !PlatformConstants.is_tablet || lockedAndHidden ? 0 : Constants.menubar_width + enabled: !lockedAndHidden property bool lockedAndHidden: true property bool isOpen: drawer.position > 0 diff --git a/resources/qml/Governikus/Navigation/+android/NavigationItem.qml b/resources/qml/Governikus/Navigation/+android/NavigationItem.qml index 592a3967a..0c30c5212 100644 --- a/resources/qml/Governikus/Navigation/+android/NavigationItem.qml +++ b/resources/qml/Governikus/Navigation/+android/NavigationItem.qml @@ -29,7 +29,7 @@ Item { anchors.verticalCenter: parent.verticalCenter font.pixelSize: Constants.small_font_size renderType: Text.NativeRendering - color: "black" + color: Constants.secondary_text } MouseArea { diff --git a/resources/qml/Governikus/Navigation/+ios/Navigation.qml b/resources/qml/Governikus/Navigation/+ios/Navigation.qml index 70b82e0e6..e5111ce17 100644 --- a/resources/qml/Governikus/Navigation/+ios/Navigation.qml +++ b/resources/qml/Governikus/Navigation/+ios/Navigation.qml @@ -6,6 +6,8 @@ import Governikus.Global 1.0 Item { property bool lockedAndHidden: false property bool isOpen: true + property int currentIndex: 0 + enabled: !lockedAndHidden id: baseItem state: "identify" diff --git a/resources/qml/Governikus/Navigation/+ios/NavigationItem.qml b/resources/qml/Governikus/Navigation/+ios/NavigationItem.qml index f5b07bcb6..d512667d1 100644 --- a/resources/qml/Governikus/Navigation/+ios/NavigationItem.qml +++ b/resources/qml/Governikus/Navigation/+ios/NavigationItem.qml @@ -19,6 +19,7 @@ Item { Text { id: tabText + color: Constants.secondary_text anchors.horizontalCenter: parent.horizontalCenter anchors.bottom: parent.bottom anchors.bottomMargin: font.pixelSize / 10 diff --git a/resources/qml/Governikus/PinView/+android/PinViewContent.qml b/resources/qml/Governikus/PinView/+android/PinViewContent.qml index 4bd015ac1..024e9bc17 100644 --- a/resources/qml/Governikus/PinView/+android/PinViewContent.qml +++ b/resources/qml/Governikus/PinView/+android/PinViewContent.qml @@ -36,6 +36,7 @@ Item { Text { id: pinDesc + color: Constants.secondary_text anchors.margins: Utils.dp(10) anchors.top: pinHeader.bottom diff --git a/resources/qml/Governikus/PinView/+ios/PinViewContent.qml b/resources/qml/Governikus/PinView/+ios/PinViewContent.qml index 66cb5b922..f3ce948a4 100644 --- a/resources/qml/Governikus/PinView/+ios/PinViewContent.qml +++ b/resources/qml/Governikus/PinView/+ios/PinViewContent.qml @@ -21,6 +21,7 @@ Item { Text { id: pinDesc + color: Constants.secondary_text width: parent.width * 0.9 diff --git a/resources/qml/Governikus/PinView/ChangePinController.qml b/resources/qml/Governikus/PinView/ChangePinController.qml index 7898f102d..d41c24dda 100644 --- a/resources/qml/Governikus/PinView/ChangePinController.qml +++ b/resources/qml/Governikus/PinView/ChangePinController.qml @@ -22,13 +22,7 @@ Item { baseItem.firePopAll() baseItem.firePush(pinWorkflow, {}) - if (Qt.platform.os === "android") { - changePinModel.readerPlugInType = "NFC" - } else if (Qt.platform.os === "ios") { - changePinModel.readerPlugInType = "BLUETOOTH" - } else { - changePinModel.readerPlugInType = "PCSC" - } + changePinModel.setInitialPluginType() } navBar.lockedAndHidden = true diff --git a/resources/qml/Governikus/PinView/PinView.qml b/resources/qml/Governikus/PinView/PinView.qml index 4c774eaf7..bdf4a7722 100644 --- a/resources/qml/Governikus/PinView/PinView.qml +++ b/resources/qml/Governikus/PinView/PinView.qml @@ -78,6 +78,6 @@ SectionPage { qsTr("You have entered a wrong PIN three times. Your PIN is now blocked. You have to enter the PUK now for unblocking.") : qsTr("Please wait a moment...") ) + settingsModel.translationTrigger - subTextColor: !changePinModel.isBasicReader && (numberModel.inputError || numberModel.pinDeactivated || state === "changepin_entercan" || state === "enterpuk") ? "red" : "black" + subTextColor: !changePinModel.isBasicReader && (numberModel.inputError || numberModel.pinDeactivated || state === "changepin_entercan" || state === "enterpuk") ? "red" : Constants.secondary_text } } diff --git a/resources/qml/Governikus/PinView/PinWorkflow.qml b/resources/qml/Governikus/PinView/PinWorkflow.qml index 6152f87de..c62f8b9c3 100644 --- a/resources/qml/Governikus/PinView/PinWorkflow.qml +++ b/resources/qml/Governikus/PinView/PinWorkflow.qml @@ -19,7 +19,6 @@ SectionPage NfcWorkflow { - allowRemote: false anchors.fill: parent state: parent.state visible: changePinModel.readerPlugInType === "NFC" @@ -36,7 +35,6 @@ SectionPage BluetoothWorkflow { - allowRemote: false anchors.fill: parent state: parent.state visible: changePinModel.readerPlugInType === "BLUETOOTH" diff --git a/resources/qml/Governikus/ProgressView/ProgressView.qml b/resources/qml/Governikus/ProgressView/ProgressView.qml index f5bdae6c4..394fbf70f 100644 --- a/resources/qml/Governikus/ProgressView/ProgressView.qml +++ b/resources/qml/Governikus/ProgressView/ProgressView.qml @@ -1,5 +1,6 @@ import QtQuick 2.5 import QtQuick.Controls 1.4 +import QtQuick.Controls.Styles 1.4 import QtQuick.Layouts 1.2 import Governikus.Global 1.0 @@ -11,6 +12,9 @@ SectionPage property alias text: text.text property alias subText: subText.text property alias subTextColor: subText.color + property alias progressText: progressText.text + property int progressValue + property alias progressBarVisible: progressBar.visible BusyIndicator { id: busyIndicator @@ -39,6 +43,7 @@ SectionPage } Text { id: subText + color: Constants.secondary_text verticalAlignment: Text.AlignVCenter horizontalAlignment: Text.AlignHCenter font.pixelSize: Constants.normal_font_size @@ -48,4 +53,39 @@ SectionPage width: baseItem.width * 0.8 wrapMode: Text.WordWrap } + Text { + id: progressText + verticalAlignment: Text.AlignVCenter + horizontalAlignment: Text.AlignHCenter + font.pixelSize: Constants.normal_font_size + anchors.top: subText.bottom + anchors.topMargin: Utils.dp(20) + anchors.horizontalCenter: parent.horizontalCenter + width: baseItem.width * 0.8 + wrapMode: Text.WordWrap + color: Constants.grey + } + ProgressBar { + id: progressBar + anchors.top: progressText.bottom + anchors.horizontalCenter: parent.horizontalCenter + anchors.topMargin: Utils.dp(10) + width: baseItem.width * 0.6 + minimumValue: 0 + maximumValue: 5 + visible: false + value: progressValue + style: ProgressBarStyle { + background: Rectangle { + radius: Utils.dp(2) + color: Constants.lightgrey + implicitWidth: parent.width + implicitHeight: parent.width/12.0 + } + progress: Rectangle { + radius: Utils.dp(2) + color: Constants.green + } + } + } } diff --git a/resources/qml/Governikus/Provider/+android/ProviderDetailView.qml b/resources/qml/Governikus/Provider/+android/ProviderDetailView.qml index f965fc35a..ef92f35ee 100644 --- a/resources/qml/Governikus/Provider/+android/ProviderDetailView.qml +++ b/resources/qml/Governikus/Provider/+android/ProviderDetailView.qml @@ -99,6 +99,7 @@ SectionPage { Text { id: providerText + color: Constants.secondary_text text: (!!provider.longDescription ? provider.longDescription : qsTr("Description not available")) + settingsModel.translationTrigger horizontalAlignment: Text.AlignLeft wrapMode: Text.WordWrap diff --git a/resources/qml/Governikus/Provider/+ios/ProviderDetailView.qml b/resources/qml/Governikus/Provider/+ios/ProviderDetailView.qml index 142710aa5..70a59d442 100644 --- a/resources/qml/Governikus/Provider/+ios/ProviderDetailView.qml +++ b/resources/qml/Governikus/Provider/+ios/ProviderDetailView.qml @@ -102,6 +102,7 @@ SectionPage { Text { id: providerText + color: Constants.secondary_text text: (!!provider.longDescription ? provider.longDescription : qsTr("Description not available")) + settingsModel.translationTrigger horizontalAlignment: Text.AlignLeft wrapMode: Text.WordWrap diff --git a/resources/qml/Governikus/Provider/+ios/ProviderViewDelegate.qml b/resources/qml/Governikus/Provider/+ios/ProviderViewDelegate.qml index 4bae152bb..dde60e6b4 100644 --- a/resources/qml/Governikus/Provider/+ios/ProviderViewDelegate.qml +++ b/resources/qml/Governikus/Provider/+ios/ProviderViewDelegate.qml @@ -34,6 +34,7 @@ Rectangle { Text { id: subjectText + color: Constants.secondary_text width: parent.width verticalAlignment: Text.AlignVCenter font.pixelSize: Constants.normal_font_size diff --git a/resources/qml/Governikus/Provider/ProviderContactTab.qml b/resources/qml/Governikus/Provider/ProviderContactTab.qml index eb2b7059e..1aa1d4bc2 100644 --- a/resources/qml/Governikus/Provider/ProviderContactTab.qml +++ b/resources/qml/Governikus/Provider/ProviderContactTab.qml @@ -32,6 +32,7 @@ Item { Text { id: textItem + color: Constants.secondary_text text: !!model.text ? model.text : qsTr("Unknown") + settingsModel.translationTrigger verticalAlignment: Text.AlignVCenter anchors.left: imageItem.right diff --git a/resources/qml/Governikus/Provider/ProviderDetailDescription_tablet.qml b/resources/qml/Governikus/Provider/ProviderDetailDescription_tablet.qml index ac2a54e6b..5483d5208 100644 --- a/resources/qml/Governikus/Provider/ProviderDetailDescription_tablet.qml +++ b/resources/qml/Governikus/Provider/ProviderDetailDescription_tablet.qml @@ -16,6 +16,7 @@ Column { } Text { + color: Constants.secondary_text font.pixelSize: Constants.normal_font_size horizontalAlignment: Text.AlignLeft text: baseItem.description diff --git a/resources/qml/Governikus/Provider/ProviderDetailHistoryInfo_tablet.qml b/resources/qml/Governikus/Provider/ProviderDetailHistoryInfo_tablet.qml index c5a83f26d..25a980a46 100644 --- a/resources/qml/Governikus/Provider/ProviderDetailHistoryInfo_tablet.qml +++ b/resources/qml/Governikus/Provider/ProviderDetailHistoryInfo_tablet.qml @@ -92,6 +92,7 @@ Item { } Text { + color: Constants.secondary_text text: modelData.trim() anchors.verticalCenter: parent.verticalCenter @@ -129,6 +130,7 @@ Item { Text { id: termsOfUsageTextItem + color: Constants.secondary_text text: baseItem.termsOfUsageText width: parent.width diff --git a/resources/qml/Governikus/Provider/ProviderHeader.qml b/resources/qml/Governikus/Provider/ProviderHeader.qml index 31c676258..abc0dec26 100644 --- a/resources/qml/Governikus/Provider/ProviderHeader.qml +++ b/resources/qml/Governikus/Provider/ProviderHeader.qml @@ -151,6 +151,7 @@ Rectangle { Text { id: providerText + color: Constants.secondary_text width: parent.width text: selectedProvider ? selectedProvider.shortDescription : "" font.pixelSize: Constants.normal_font_size diff --git a/resources/qml/Governikus/ProviderView/+android/+tablet/ProviderView.qml b/resources/qml/Governikus/ProviderView/+android/+tablet/ProviderView.qml index f29f8e5a8..13d55606a 100644 --- a/resources/qml/Governikus/ProviderView/+android/+tablet/ProviderView.qml +++ b/resources/qml/Governikus/ProviderView/+android/+tablet/ProviderView.qml @@ -110,6 +110,7 @@ SectionPage { Text { id: noResultsText + color: Constants.secondary_text anchors.centerIn: mainPane text: qsTr("No match found") + settingsModel.translationTrigger diff --git a/resources/qml/Governikus/ProviderView/+android/ProviderView.qml b/resources/qml/Governikus/ProviderView/+android/ProviderView.qml index 0072660e7..223cbfd90 100644 --- a/resources/qml/Governikus/ProviderView/+android/ProviderView.qml +++ b/resources/qml/Governikus/ProviderView/+android/ProviderView.qml @@ -62,6 +62,7 @@ SectionPage { visible: providerModel.rowCount === 0 && !additionalResults.visible Text { + color: Constants.secondary_text anchors.centerIn: parent text: qsTr("No match found") + settingsModel.translationTrigger font.pixelSize: Constants.normal_font_size diff --git a/resources/qml/Governikus/ProviderView/+android/SearchBar.qml b/resources/qml/Governikus/ProviderView/+android/SearchBar.qml index 807d75f37..1530ba4da 100644 --- a/resources/qml/Governikus/ProviderView/+android/SearchBar.qml +++ b/resources/qml/Governikus/ProviderView/+android/SearchBar.qml @@ -12,8 +12,10 @@ Row { readonly property alias searchText: searchField.displayText anchors.top: parent ? parent.top : undefined + anchors.topMargin: Constants.titlebar_padding anchors.right: parent ? parent.right : undefined anchors.bottom: parent ? parent.bottom : undefined + anchors.bottomMargin: Constants.titlebar_padding spacing: Constants.titlebar_padding GTextField { diff --git a/resources/qml/Governikus/ProviderView/+ios/+tablet/ProviderView.qml b/resources/qml/Governikus/ProviderView/+ios/+tablet/ProviderView.qml index f5bd8380e..3f4278586 100644 --- a/resources/qml/Governikus/ProviderView/+ios/+tablet/ProviderView.qml +++ b/resources/qml/Governikus/ProviderView/+ios/+tablet/ProviderView.qml @@ -111,6 +111,7 @@ SectionPage { Text { id: noResultsText + color: Constants.secondary_text anchors.centerIn: mainPane text: qsTr("No match found") + settingsModel.translationTrigger diff --git a/resources/qml/Governikus/ProviderView/+ios/ProviderView.qml b/resources/qml/Governikus/ProviderView/+ios/ProviderView.qml index 02c4cf9ae..538a0baab 100644 --- a/resources/qml/Governikus/ProviderView/+ios/ProviderView.qml +++ b/resources/qml/Governikus/ProviderView/+ios/ProviderView.qml @@ -56,6 +56,7 @@ SectionPage { visible: providerModel.rowCount === 0 && !additionalResults.visible Text { + color: Constants.secondary_text anchors.centerIn: parent text: qsTr("No match found") + settingsModel.translationTrigger font.pixelSize: Constants.normal_font_size diff --git a/resources/qml/Governikus/ProviderView/CategoryCheckbox_tablet.qml b/resources/qml/Governikus/ProviderView/CategoryCheckbox_tablet.qml index 8cb3f2a6a..86cad7527 100644 --- a/resources/qml/Governikus/ProviderView/CategoryCheckbox_tablet.qml +++ b/resources/qml/Governikus/ProviderView/CategoryCheckbox_tablet.qml @@ -29,6 +29,7 @@ Item { Text { id: label + color: Constants.secondary_text font.pixelSize: Constants.normal_font_size anchors.verticalCenter: parent.verticalCenter } diff --git a/resources/qml/Governikus/RemoteServiceView/AvailableDevicesListDelegate.qml b/resources/qml/Governikus/RemoteServiceView/AvailableDevicesListDelegate.qml index 3c070f90a..d5db823b4 100644 --- a/resources/qml/Governikus/RemoteServiceView/AvailableDevicesListDelegate.qml +++ b/resources/qml/Governikus/RemoteServiceView/AvailableDevicesListDelegate.qml @@ -10,16 +10,24 @@ MouseArea { signal requestPairing(string pDeviceId) onClicked: { - requestPairing(deviceId) + if (isSupported) requestPairing(deviceId) } Text { id: nameText + color: Constants.secondary_text width: parent.width font.pixelSize: Utils.sp(16) anchors.verticalCenter: parent.verticalCenter opacity: 0.87 - text: remoteDeviceName + text: { + settingsModel.translationTrigger + + if (isSupported) { + return remoteDeviceName; + } + return remoteDeviceName + " (" + qsTr("Unsupported") + ")" + } } Rectangle { diff --git a/resources/qml/Governikus/RemoteServiceView/KnownDevicesListDelegate.qml b/resources/qml/Governikus/RemoteServiceView/KnownDevicesListDelegate.qml index fcedbbff5..9cbe067b0 100644 --- a/resources/qml/Governikus/RemoteServiceView/KnownDevicesListDelegate.qml +++ b/resources/qml/Governikus/RemoteServiceView/KnownDevicesListDelegate.qml @@ -15,18 +15,30 @@ Item { Text { id: nameText + color: Constants.secondary_text font.pixelSize: Utils.sp(16) opacity: 0.87 - text: remoteDeviceName + (isNetworkVisible ? qsTr(" (Available)"): "") + text: { + settingsModel.translationTrigger + + if (!isNetworkVisible) { + return remoteDeviceName; + } + if (isSupported) { + return remoteDeviceName + " (" + qsTr("Available") + ")" + } + return remoteDeviceName + " (" + qsTr("Available, but unsupported") + ")" + } } Text { id: dateText + color: Constants.secondary_text anchors.top: nameText.bottom anchors.topMargin: Utils.dp(2) font.pixelSize: Utils.sp(14) opacity: 0.38 - text: qsTr("Last connection: ") + lastConnected + text: qsTr("Last connection:") + " " + lastConnected + settingsModel.translationTrigger } } diff --git a/resources/qml/Governikus/RemoteServiceView/RemoteServiceController.qml b/resources/qml/Governikus/RemoteServiceView/RemoteServiceController.qml index 1a4a7146e..f4066110e 100644 --- a/resources/qml/Governikus/RemoteServiceView/RemoteServiceController.qml +++ b/resources/qml/Governikus/RemoteServiceView/RemoteServiceController.qml @@ -23,7 +23,11 @@ Item { break case "StateEstablishPaceChannel": enterPinView.state = "INITIAL" - setWorkflowStateAndRequestInput("establishPaceChannel") + setWorkflowStateAndRequestInput("establishPaceChannel", remoteServiceModel.getPacePasswordId()) + break + case "StateChangePinRemote": + enterPinView.state = "INITIAL" + setWorkflowStateAndRequestInput("changePinRemote", "PIN_NEW") break case "FinalState": numberModel.continueWorkflow() @@ -44,10 +48,10 @@ Item { numberModel.continueWorkflow() } - function setWorkflowStateAndRequestInput(pState) { + function setWorkflowStateAndRequestInput(pState, pEnterPinState) { setWorkflowState(pState) if (remoteServiceModel.pinPadModeOn()) { - firePush(enterPinView, {state: remoteServiceModel.getPacePasswordId()}) + firePush(enterPinView, {state: pEnterPinState}) } } } diff --git a/resources/qml/Governikus/RemoteServiceView/RemoteServicePairingPopup.qml b/resources/qml/Governikus/RemoteServiceView/RemoteServicePairingPopup.qml index b627a2589..7084ed8ed 100644 --- a/resources/qml/Governikus/RemoteServiceView/RemoteServicePairingPopup.qml +++ b/resources/qml/Governikus/RemoteServiceView/RemoteServicePairingPopup.qml @@ -29,6 +29,7 @@ Popup { Text { id: header + color: Constants.secondary_text text: qsTr("Pairing code") + settingsModel.translationTrigger font.pixelSize: Constants.header_font_size font.bold: true @@ -36,6 +37,7 @@ Popup { Text { id: info + color: Constants.secondary_text width: parent.width wrapMode: Text.WordWrap font.pixelSize: Constants.normal_font_size @@ -47,6 +49,7 @@ Popup { TextField { id: name + focus: true width: parent.width horizontalAlignment: Text.AlignHCenter font.letterSpacing: Utils.dp(5) diff --git a/resources/qml/Governikus/RemoteServiceView/RemoteServiceSettings.qml b/resources/qml/Governikus/RemoteServiceView/RemoteServiceSettings.qml index d9ea8a3f4..cee5bdccf 100644 --- a/resources/qml/Governikus/RemoteServiceView/RemoteServiceSettings.qml +++ b/resources/qml/Governikus/RemoteServiceView/RemoteServiceSettings.qml @@ -2,6 +2,7 @@ import QtQuick 2.7 import QtQuick.Controls 2.2 import QtQuick.Layouts 1.1 +import Governikus.EnterPinView 1.0 import Governikus.Global 1.0 import Governikus.TitleBar 1.0 @@ -10,8 +11,6 @@ SectionPage { leftTitleBarAction: TitleBarAction { state: "back"; onClicked: firePop() } headerTitleBarAction: TitleBarAction { text: qsTr("Configure remote service") + settingsModel.translationTrigger; font.bold: true } - onVisibleChanged: remoteServiceModel.detectRemoteDevices = visible - Connections { target: remoteServiceModel onFirePairingFailed: qmlExtension.showFeedback(qsTr("Pairing failed. Please try again to activate pairing on your other device and enter the shown pairing code.")) @@ -48,10 +47,10 @@ SectionPage { } Text { + color: Constants.secondary_text text: qsTr("Choose a device name here to identify it in the network:") + settingsModel.translationTrigger width: parent.width font.pixelSize: Constants.normal_font_size - horizontalAlignment: Text.AlignJustify wrapMode: Text.WordWrap } @@ -89,7 +88,7 @@ SectionPage { id: nameText anchors.bottomMargin: Utils.dp(2) font.pixelSize: Utils.sp(16) - color: "#000000" + color: Constants.secondary_text opacity: 0.87 text: qsTr("PIN pad mode") + settingsModel.translationTrigger } @@ -99,7 +98,7 @@ SectionPage { width: parent.width anchors.top: nameText.bottom font.pixelSize: Utils.sp(14) - color: "#000000" + color: Constants.secondary_text opacity: 0.38 text: qsTr("Enter PIN on smartphone") + settingsModel.translationTrigger wrapMode: Text.WordWrap @@ -126,11 +125,11 @@ SectionPage { } Text { + color: Constants.secondary_text text: qsTr("No device is paired.") + settingsModel.translationTrigger width: parent.width visible: !knownDeviceList.visible font.pixelSize: Constants.normal_font_size - horizontalAlignment: Text.AlignJustify wrapMode: Text.WordWrap } @@ -158,11 +157,11 @@ SectionPage { } Text { + color: Constants.secondary_text text: qsTr("No new remote reader was found on your network. Make sure that the remote reader functionality in AusweisApp2 on your other device is activated and that your devices are connected to the same network.") + settingsModel.translationTrigger width: parent.width visible: !searchDeviceList.visible font.pixelSize: Constants.normal_font_size - horizontalAlignment: Text.AlignJustify wrapMode: Text.WordWrap } @@ -174,8 +173,7 @@ SectionPage { delegate: AvailableDevicesListDelegate { width: searchDeviceList.width onRequestPairing: { - popup.deviceId = pDeviceId - popup.pin = "" + enterPinView.remoteDeviceId = pDeviceId informationPairingPopup.open() } } @@ -203,6 +201,7 @@ SectionPage { Text { id: info + color: Constants.secondary_text width: parent.width wrapMode: Text.WordWrap font.pixelSize: Constants.normal_font_size @@ -214,18 +213,22 @@ SectionPage { width: parent.width onClicked: { - popup.open() informationPairingPopup.close() + firePush(enterPinView, {}) } } } } - RemoteServicePairingPopup { - id: popup - requestInput: true + EnterPinView { + id: enterPinView + state: "REMOTE_PIN" + leftTitleBarAction: TitleBarAction { state: "cancel"; onClicked: firePop() } + headerTitleBarAction: TitleBarAction { text: qsTr("Pairing code") + settingsModel.translationTrigger } + visible: false - x: (rootPage.width - width) / 2 - y: Constants.pane_padding + onPinEntered: { + firePop() + } } } diff --git a/resources/qml/Governikus/RemoteServiceView/RemoteServiceView.qml b/resources/qml/Governikus/RemoteServiceView/RemoteServiceView.qml index 11f907006..ebabaccd1 100644 --- a/resources/qml/Governikus/RemoteServiceView/RemoteServiceView.qml +++ b/resources/qml/Governikus/RemoteServiceView/RemoteServiceView.qml @@ -18,6 +18,12 @@ SectionPage { font.bold: true } + onVisibleChanged: { + if (visible) { + remoteServiceModel.detectRemoteDevices = false + } + } + readonly property int maxWidth: Math.min(width - 2 * Constants.component_spacing, Utils.dp(500)) id: root @@ -57,6 +63,7 @@ SectionPage { Text { id: text + color: Constants.secondary_text width: parent.maxWidth anchors.top: image.bottom @@ -67,7 +74,6 @@ SectionPage { + " Please note: Both your devices have to be connected to the same WiFi.") + settingsModel.translationTrigger font.pixelSize: Constants.normal_font_size - horizontalAlignment: Text.AlignJustify wrapMode: Text.WordWrap } @@ -86,7 +92,6 @@ SectionPage { } else { var newRunning = !running; remoteServiceModel.running = newRunning - qmlExtension.keepScreenOn(newRunning) } } text: { @@ -103,7 +108,6 @@ SectionPage { onRunningChanged: { navBar.lockedAndHidden = running } - enabled: remoteServiceModel.runnable || canEnableNfc } GButton { @@ -160,6 +164,7 @@ SectionPage { } Text { id: subText + color: Constants.secondary_text verticalAlignment: Text.AlignVCenter horizontalAlignment: Text.AlignHCenter font.pixelSize: Constants.normal_font_size @@ -169,7 +174,7 @@ SectionPage { width: connectedText.width * 0.8 wrapMode: Text.WordWrap - text: qsTr("Please pay attention to the display on your other device.") + settingsModel.translationTrigger; + text: qsTr("Please pay attention to the display on your other device %1.").arg("\"" + remoteServiceModel.connectedClientDeviceName + "\"") + settingsModel.translationTrigger; } states: [ @@ -212,7 +217,10 @@ SectionPage { id: switchTo anchors.horizontalCenter: parent.horizontalCenter anchors.bottom: parent.bottom - onClicked: firePush(remoteSettings, {}) + onClicked: { + remoteServiceModel.detectRemoteDevices = true + firePush(remoteSettings, {}) + } imageSource: "qrc:///images/android/navigation/remotesettings.svg" text: qsTr("Settings") + settingsModel.translationTrigger opacity: 1 @@ -223,10 +231,12 @@ SectionPage { State { name: "OFF"; when: !remoteServiceModel.running PropertyChanges { target: pairingButton; opacity: 0 } PropertyChanges { target: switchTo; opacity: 1 } + AnchorChanges { target: statusText; anchors.top: startButton.bottom } }, State { name: "ON"; when: remoteServiceModel.running PropertyChanges { target: pairingButton; opacity: 1 } PropertyChanges { target: switchTo; opacity: 0 } + AnchorChanges { target: statusText; anchors.top: pairingButton.bottom } } ] transitions: [ @@ -236,6 +246,9 @@ SectionPage { duration: 500 easing.type: Easing.InOutQuad } + AnchorAnimation { + duration: 500 + } } ] } diff --git a/resources/qml/Governikus/ResultView/+android/ResultView.qml b/resources/qml/Governikus/ResultView/+android/ResultView.qml index 24de0fb59..f78cf2ec2 100644 --- a/resources/qml/Governikus/ResultView/+android/ResultView.qml +++ b/resources/qml/Governikus/ResultView/+android/ResultView.qml @@ -20,22 +20,9 @@ SectionPage { // See: http://tagasks.com/in_qtqml_how_to_load_different_images_for_different_device_densities_android property int ppi: Screen.pixelDensity * 25.4 - readonly property string imageDir: { - if (ppi >= 360) - "xxxhdpi" - else if (ppi >= 270) - "xxhdpi" - else if (ppi >= 180) - "xhdpi" - else if (ppi >= 135) - "hdpi" - else - "mdpi" - } - Image { id: resultImage - source: isError ? "qrc:///images/rotes_X.svg" : "qrc:///images/android/" + imageDir + "/haken.png" + source: isError ? "qrc:///images/rotes_X.svg" : "qrc:///images/gruener_Haken.svg" height: Utils.dp(100) width: height anchors.horizontalCenter: parent.horizontalCenter @@ -66,7 +53,7 @@ SectionPage { anchors.horizontalCenter: parent.horizontalCenter anchors.bottomMargin: Utils.dp(30) - text: qsTr("Ok") + settingsModel.translationTrigger + text: qsTr("OK") + settingsModel.translationTrigger onClicked: baseItem.clicked() } } diff --git a/resources/qml/Governikus/ResultView/+ios/ResultView.qml b/resources/qml/Governikus/ResultView/+ios/ResultView.qml index 188298057..7e167df79 100644 --- a/resources/qml/Governikus/ResultView/+ios/ResultView.qml +++ b/resources/qml/Governikus/ResultView/+ios/ResultView.qml @@ -41,7 +41,7 @@ SectionPage { anchors.horizontalCenter: parent.horizontalCenter anchors.bottom: parent.bottom anchors.bottomMargin: Utils.dp(30) - text: qsTr("Ok") + settingsModel.translationTrigger + text: qsTr("OK") + settingsModel.translationTrigger onClicked: baseItem.clicked() } } diff --git a/resources/qml/Governikus/TechnologyInfo/+android/TechnologySwitch.qml b/resources/qml/Governikus/TechnologyInfo/+android/TechnologySwitch.qml index f29a13511..cca07ac0c 100644 --- a/resources/qml/Governikus/TechnologyInfo/+android/TechnologySwitch.qml +++ b/resources/qml/Governikus/TechnologyInfo/+android/TechnologySwitch.qml @@ -9,7 +9,6 @@ Item { signal requestPluginType(string pReaderPlugInType) - property bool allowRemote: true property string selectedTechnology Row { @@ -26,7 +25,7 @@ Item { } Gov.TechnologySwitchButton { - visible: allowRemote && selectedTechnology !== "REMOTE" + visible: selectedTechnology !== "REMOTE" onClicked: baseItem.requestPluginType("REMOTE") imageSource: "qrc:///images/icon_remote.svg" text: qsTr("WiFi") + settingsModel.translationTrigger diff --git a/resources/qml/Governikus/TechnologyInfo/+ios/TechnologySwitch.qml b/resources/qml/Governikus/TechnologyInfo/+ios/TechnologySwitch.qml index c303ca07d..b6ab0fa94 100644 --- a/resources/qml/Governikus/TechnologyInfo/+ios/TechnologySwitch.qml +++ b/resources/qml/Governikus/TechnologyInfo/+ios/TechnologySwitch.qml @@ -9,7 +9,6 @@ Item { signal requestPluginType(string pReaderPlugInType) - property bool allowRemote: true property string selectedTechnology Row { @@ -19,7 +18,7 @@ Item { anchors.horizontalCenter: parent.horizontalCenter Gov.TechnologySwitchButton { - visible: allowRemote && selectedTechnology !== "REMOTE" + visible: selectedTechnology !== "REMOTE" onClicked: baseItem.requestPluginType("REMOTE") imageSource: "qrc:///images/icon_remote.svg" text: qsTr("Use WiFi card reader instead
of Bluetooth card reader") + settingsModel.translationTrigger diff --git a/resources/qml/Governikus/TechnologyInfo/TechnologyInfo.qml b/resources/qml/Governikus/TechnologyInfo/TechnologyInfo.qml index e00feea41..54dff84f5 100644 --- a/resources/qml/Governikus/TechnologyInfo/TechnologyInfo.qml +++ b/resources/qml/Governikus/TechnologyInfo/TechnologyInfo.qml @@ -13,11 +13,6 @@ Item { signal enableClicked() - Connections { - target: applicationModel - onFireCertificateRemoved: qmlExtension.showFeedback(qsTr("The device %1 was unpaired because it does not react to connection attempts. Retry the pairing process if you want to use this device to authenticate yourself.").arg(pDeviceName)) - } - Text { id: enableInfo anchors.bottom: enableButton.top @@ -30,6 +25,15 @@ Item { color: Constants.red wrapMode: Text.WordWrap visible: !!text + + + Behavior on text { + SequentialAnimation { + PropertyAnimation { target: enableInfo; property: "opacity"; to: 0; duration: 500} + PropertyAction { target: enableInfo; property: "text" } + PropertyAnimation { target: enableInfo; property: "opacity"; to: 1.0; duration: 500} + } + } } GButton { @@ -81,7 +85,7 @@ Item { anchors.right: parent.right horizontalAlignment: Text.AlignHCenter font.pixelSize: Constants.normal_font_size - color: "#000000" + color: Constants.secondary_text wrapMode: Text.WordWrap visible: !enableInfo.visible && !enableButton.visible @@ -89,7 +93,7 @@ Item { SequentialAnimation { PropertyAnimation { target: subTitle; property: "anchors.topMargin"; to: baseItem.height/2; duration: 500} PropertyAction { target: subTitle; property: "text" } - PropertyAction { target: subTitle; property: "color"; value: baseItem.subTitleTextRedColor ? Constants.red : "#000000" } + PropertyAction { target: subTitle; property: "color"; value: baseItem.subTitleTextRedColor ? Constants.red : Constants.secondary_texte } PropertyAnimation { target: subTitle; property: "anchors.topMargin"; to: 0; duration: 500 } } } diff --git a/resources/qml/Governikus/TitleBar/+android/TitleBar.qml b/resources/qml/Governikus/TitleBar/+android/TitleBar.qml index 009376eca..e94822795 100644 --- a/resources/qml/Governikus/TitleBar/+android/TitleBar.qml +++ b/resources/qml/Governikus/TitleBar/+android/TitleBar.qml @@ -120,7 +120,7 @@ Item Item { id: rightActionStack - anchors.margins: Constants.titlebar_padding + anchors.rightMargin: Constants.titlebar_padding anchors.top: parent.top anchors.right: parent.right anchors.bottom: parent.bottom diff --git a/resources/qml/Governikus/TitleBar/+ios/TitleBar.qml b/resources/qml/Governikus/TitleBar/+ios/TitleBar.qml index 84221d35c..6793708e1 100644 --- a/resources/qml/Governikus/TitleBar/+ios/TitleBar.qml +++ b/resources/qml/Governikus/TitleBar/+ios/TitleBar.qml @@ -41,10 +41,12 @@ Item { width: parent.width Item { + id: leftActionStack data: activeleftAction width: activeleftAction.width anchors.verticalCenter: parent.verticalCenter anchors.left: parent.left + anchors.leftMargin: Constants.titlebar_padding } Item { @@ -52,10 +54,10 @@ Item { property string text: activeTitleItem.text property bool bold: activeTitleItem.font.bold - anchors.left: burger.right - anchors.leftMargin: Constants.titlebar_spacing + anchors.left: parent.left + anchors.leftMargin: leftActionStack.width > 0 ? leftAction.width + Constants.titlebar_spacing : 0 anchors.right: parent.right - anchors.rightMargin: Constants.titlebar_padding + (rightActionStack.width > 0 ? rightAction.width + Constants.titlebar_spacing : 0) + anchors.rightMargin: rightActionStack.width > 0 ? rightAction.width + Constants.titlebar_spacing : 0 height: parent.height clip: true @@ -93,10 +95,12 @@ Item { } Item { + id: rightActionStack data: activeRightAction width: activeRightAction.width anchors.verticalCenter: parent.verticalCenter anchors.right: parent.right + anchors.rightMargin: Constants.titlebar_padding } } diff --git a/resources/qml/Governikus/TitleBar/Hamburger.qml b/resources/qml/Governikus/TitleBar/Hamburger.qml index 1073005ce..297ed5b2b 100644 --- a/resources/qml/Governikus/TitleBar/Hamburger.qml +++ b/resources/qml/Governikus/TitleBar/Hamburger.qml @@ -26,7 +26,7 @@ Item { width: content.itemWidth height: content.itemHeight antialiasing: true - transformOrigin: baseItem.state === "cancel" ? Item.Left : Item.Right + opacity: 1 color: baseItem.color } @@ -37,7 +37,7 @@ Item { width: content.itemWidth height: content.itemHeight antialiasing: true - transformOrigin: baseItem.state === "cancel" ? Item.Left : Item.Right + opacity: (baseItem.state === "cancel") ? 0 : 1 color: baseItem.color } @@ -48,7 +48,7 @@ Item { width: content.itemWidth height: content.itemHeight antialiasing: true - transformOrigin: baseItem.state === "cancel" ? Item.Left : Item.Right + opacity: 1 color: baseItem.color } } @@ -57,46 +57,111 @@ Item { State { name: "back" PropertyChanges { target: content; rotation: 180 } - PropertyChanges { target: r0; transformOrigin: Item.Right; rotation: 45; y: (content.height - content.itemHeight) * 0.5 + content.itemHeightDelta; width: content.itemArrowWidth; x: content.itemWidth * 0.5 } - PropertyChanges { target: r1; opacity: 1; width: content.itemArrowMiddleWidth; x: (content.width - content.itemArrowMiddleWidth - content.itemHeightDelta) * 0.5 } - PropertyChanges { target: r2; transformOrigin: Item.Right; rotation: -45; y: (content.height - content.itemHeight) * 0.5 - content.itemHeightDelta; width: content.itemArrowWidth; x: content.itemWidth * 0.5 } + + PropertyChanges { + target: r0 + explicit: true + transformOrigin: Item.Right + rotation: 45 + opacity: 1 + x: content.itemWidth * 0.5 + y: (2+1) / 6 * content.height - content.itemHeight * 0.25 + width: content.itemArrowWidth + } + PropertyChanges { + target: r1 + explicit: true + opacity: 1 + x: (content.width - content.itemArrowMiddleWidth - content.itemHeightDelta) * 0.5 + y: (2+1) / 6 * content.height - content.itemHeight * 0.5 + width: content.itemArrowMiddleWidth + } + PropertyChanges { + target: r2 + explicit: true + transformOrigin: Item.Right + opacity: 1 + rotation: -45 + x: content.itemWidth * 0.5 + y: (2+1) / 6 * content.height - content.itemHeight * 0.75 + width: content.itemArrowWidth + } }, + State { name: "cancel" PropertyChanges { target: content; rotation: 180 } - PropertyChanges { target: r0; transformOrigin: Item.Left; rotation: 45; x: content.width * 0.5 - content.itemWidthDelta; y: content.height * 0.5 - content.itemWidthDelta } - PropertyChanges { target: r1; opacity: 0; width: 0; x: (content.width - content.itemArrowMiddleWidth - content.itemHeightDelta) * 0.5 } - PropertyChanges { target: r2; transformOrigin: Item.Left; rotation: -45; x: content.width * 0.5 - content.itemWidthDelta; y: content.height * 0.5 + content.itemWidthDelta } - } - ] - transitions: [ - Transition { - from: "cancel" - to: "back" - SequentialAnimation{ - PropertyAction { target: content; property: "rotation"; value: 0 } - PropertyAction { targets: [r0, r1, r2]; property: "transformOrigin"; value: Item.Right } - PropertyAction { targets: [r0, r1, r2]; property: "x"; value: (content.width - content.itemWidth) * 0.5 } - PropertyAction { target: r0; property: "y"; value: (content.height - content.itemHeight) * 0.5 + content.itemHeightDelta } - PropertyAction { target: r2; property: "y"; value: (content.height - content.itemHeight) * 0.5 + content.itemHeightDelta } + PropertyChanges { + target: r0 + explicit: true + transformOrigin: Item.Center + rotation: 45 + opacity: 1 + x: content.width * 0.5 - content.itemWidthDelta + y: (2+1) / 6 * content.height - content.itemHeight * 0.5 + width: content.itemWidth } - RotationAnimation { target: content; direction: RotationAnimation.Clockwise; duration: 300; easing.type: Easing.InOutQuad } - PropertyAnimation { targets: [r0, r1, r2]; properties: "width, y, x"; duration: 300; easing.type: Easing.InOutQuad } - }, - Transition { - from: "back" - to: "cancel" - SequentialAnimation{ - PropertyAction { target: content; property: "rotation"; value: 0 } - PropertyAction { targets: [r0, r1, r2]; property: "transformOrigin"; value: Item.Left } - PropertyAction { targets: [r0, r2]; property: "width"; value: content.itemWidth } - PropertyAction { target: r1; property: "width"; value: 0 } - PropertyAction { targets: [r0, r1, r2]; property: "x"; value: (content.width - content.itemWidth) * 0.5 } + PropertyChanges { + target: r1 + explicit: true + transformOrigin: Item.Center + rotation: 0 + opacity: 0 + width: content.itemWidth + x: (content.width - content.itemWidth) * 0.5 + y: (2+1) / 6 * content.height - content.itemHeight * 0.5 + } + PropertyChanges { + target: r2 + explicit: true + transformOrigin: Item.Center + rotation: -45 + opacity: 1 + x: content.width * 0.5 - content.itemWidthDelta + y: (2+1) / 6 * content.height - content.itemHeight * 0.5 + width: content.itemWidth } - RotationAnimation { target: content; direction: RotationAnimation.Clockwise; duration: 300; easing.type: Easing.InOutQuad } - PropertyAnimation { targets: [r0, r1, r2]; properties: "width, y, x"; duration: 300; easing.type: Easing.InOutQuad } }, + + State { + name: "" + PropertyChanges { target: content; rotation: 0 } + + PropertyChanges { + target: r0 + explicit: true + transformOrigin: Item.Right + rotation: 0 + opacity: 1 + x: (content.width - content.itemWidth) * 0.5 + y: (2+0) / 6 * content.height - content.itemHeight * 0.5 + width: content.itemWidth + } + PropertyChanges { + target: r1 + explicit: true + transformOrigin: Item.Right + rotation: 0 + opacity: 1 + x: (content.width - content.itemWidth) * 0.5 + y: (2+1) / 6 * content.height - content.itemHeight * 0.5 + width: content.itemWidth + } + PropertyChanges { + target: r2 + explicit: true + transformOrigin: Item.Right + rotation: 0 + opacity: 1 + x: (content.width - content.itemWidth) * 0.5 + y: (2+2) / 6 * content.height - content.itemHeight * 0.5 + width: content.itemWidth + } + } + ] + + transitions: [ Transition { RotationAnimation { target: content; direction: RotationAnimation.Clockwise; duration: 300; easing.type: Easing.InOutQuad } PropertyAnimation { targets: [r0, r1, r2]; properties: "opacity, width, rotation, y, x"; duration: 300; easing.type: Easing.InOutQuad } diff --git a/resources/qml/Governikus/TitleBar/TitleBarAction.qml b/resources/qml/Governikus/TitleBar/TitleBarAction.qml index 701eba6af..4ca362c2c 100644 --- a/resources/qml/Governikus/TitleBar/TitleBarAction.qml +++ b/resources/qml/Governikus/TitleBar/TitleBarAction.qml @@ -7,7 +7,7 @@ MouseArea { property alias font: titleBarText.font height: Constants.titlebar_height - width: titleBarText.width + 2 * Constants.titlebar_padding + width: titleBarText.width anchors.centerIn: parent TitleBarText { diff --git a/resources/qml/Governikus/TitleBar/qmldir b/resources/qml/Governikus/TitleBar/qmldir index 52cf30b95..50eeff3c4 100644 --- a/resources/qml/Governikus/TitleBar/qmldir +++ b/resources/qml/Governikus/TitleBar/qmldir @@ -1,4 +1,5 @@ module TitleBar TitleBar 1.0 TitleBar.qml TitleBarAction 1.0 TitleBarAction.qml +TitleBarText 1.0 TitleBarText.qml Hamburger 1.0 Hamburger.qml diff --git a/resources/qml/Governikus/Workflow/BluetoothWorkflow.qml b/resources/qml/Governikus/Workflow/BluetoothWorkflow.qml index 4f87c8fa5..f09bf461c 100644 --- a/resources/qml/Governikus/Workflow/BluetoothWorkflow.qml +++ b/resources/qml/Governikus/Workflow/BluetoothWorkflow.qml @@ -8,8 +8,6 @@ Item { id: baseItem signal requestPluginType(string pReaderPlugInType) - property alias allowRemote: technologySwitch.allowRemote - property bool locationPermissionInfoConfirmed: false onLocationPermissionInfoConfirmedChanged: { if (identifyController) identifyController.locationPermissionConfirmed = locationPermissionInfoConfirmed @@ -65,7 +63,8 @@ Item { enableText: (!visible ? "" : !applicationModel.bluetoothAvailable ? qsTr("Bluetooth is not supported by your device.") + "
" + qsTr("Please try NFC.") : !applicationModel.bluetoothEnabled ? qsTr("Bluetooth is switched off.") + "
" + qsTr("Please enable Bluetooth.") : - parent.showLocationPermissionInfo ? qsTr("No paired and activated Bluetooth device was detected. The AusweisApp2 needs access to your location in order to discover available devices. You can grant this permission after clicking the continue button.") : "" + parent.showLocationPermissionInfo ? qsTr("No paired and activated Bluetooth device was detected. The AusweisApp2 needs access to your location in order to discover available devices. You can grant this permission after clicking the continue button.") : + !applicationModel.bluetoothResponding ? qsTr("An error occured while connecting to your bluetooth device. Try to pair your device in the system settings and restart the app.") : "" ) + settingsModel.translationTrigger titleText: ((baseItem.state === "reader") ? qsTr("Establish connection") : diff --git a/resources/qml/Governikus/Workflow/NfcWorkflow.qml b/resources/qml/Governikus/Workflow/NfcWorkflow.qml index b452726d5..1cb38f626 100644 --- a/resources/qml/Governikus/Workflow/NfcWorkflow.qml +++ b/resources/qml/Governikus/Workflow/NfcWorkflow.qml @@ -9,8 +9,6 @@ Item { signal requestPluginType(string pReaderPlugInType) clip: true - property alias allowRemote: technologySwitch.allowRemote - NfcProgressIndicator { id: progressIndicator anchors.left: parent.left diff --git a/resources/qml/Governikus/Workflow/RemoteWorkflow.qml b/resources/qml/Governikus/Workflow/RemoteWorkflow.qml index 1bb79154a..83e79af88 100644 --- a/resources/qml/Governikus/Workflow/RemoteWorkflow.qml +++ b/resources/qml/Governikus/Workflow/RemoteWorkflow.qml @@ -2,12 +2,30 @@ import QtQuick 2.5 import QtQuick.Layouts 1.1 import Governikus.Global 1.0 +import Governikus.RemoteServiceView 1.0 import Governikus.TechnologyInfo 1.0 Item { id: baseItem signal requestPluginType(string pReaderPlugInType) + property bool settingsPushed: remoteServiceSettings.visible + property bool wifiEnabled: applicationModel.wifiEnabled + property bool foundSelectedReader: applicationModel.foundSelectedReader + + Connections { + target: applicationModel + onFireCertificateRemoved: { + qmlExtension.showFeedback(qsTr("The device %1 was unpaired because it does not react to connection attempts. Retry the pairing process if you want to use this device to authenticate yourself.").arg(pDeviceName)) + } + } + + onFoundSelectedReaderChanged: { + if (baseItem.settingsPushed && foundSelectedReader) { + remoteServiceSettings.firePop() + } + } + ProgressIndicator { id: progressIndicator anchors.left: parent.left @@ -16,7 +34,7 @@ Item { height: parent.height / 2 imageIconSource: "qrc:///images/icon_remote.svg" imagePhoneSource: "qrc:///images/phone_remote.svg" - state: applicationModel.foundSelectedReader ? "two" : "one" + state: foundSelectedReader ? "two" : "one" } TechnologyInfo { @@ -29,25 +47,57 @@ Item { anchors.bottom: switchToNfcAction.top state: parent.state - enableButtonVisible: false - enableButtonText: (!applicationModel.wifiEnabled ? qsTr("Enable Wifi") : qsTr("Continue")) + settingsModel.translationTrigger + enableButtonVisible: !wifiEnabled || !foundSelectedReader + enableButtonText: { + settingsModel.translationTrigger + + if (!wifiEnabled) { + return qsTr("Enable Wifi"); + } else if (!foundSelectedReader) { + return qsTr("Pair device"); + } else { + return qsTr("Continue") + } + } + onEnableClicked: { - // open wifi dialogue + if (!wifiEnabled) { + applicationModel.enableWifi() + } else if (!baseItem.settingsPushed) { + firePush(remoteServiceSettings, {}) + } + } + enableText: { + settingsModel.translationTrigger + + if (!wifiEnabled) { + return qsTr("To use the remote service WiFi has to be activated. Please activate WiFi in your device settings."); + } else if (!foundSelectedReader) { + return qsTr("No paired and activated remote device was detected. Make sure that you have started remote service on you remote device."); + } else { + return ""; + } } - titleText: (!applicationModel.foundSelectedReader ? - qsTr("Establish connection") : - qsTr("Determine card") - ) + settingsModel.translationTrigger - - subTitleText: (!visible ? "" : - !!numberModel.inputError ? numberModel.inputError : - !applicationModel.wifiEnabled ? qsTr("To use the remote service WiFi has to be activated. Please activate WiFi in your device settings.") : - !applicationModel.foundSelectedReader ? - qsTr("No paired and activated remote device was detected. Make sure that you have started remote service on you remote device.") : - qsTr("Please insert your ID card.") - ) + settingsModel.translationTrigger - subTitleTextRedColor: !applicationModel.wifiEnabled + titleText: (foundSelectedReader ? + qsTr("Determine card") : + qsTr("Establish connection") + ) + settingsModel.translationTrigger + + subTitleText: { + settingsModel.translationTrigger + + if (!visible) { + return ""; + } else if (!!numberModel.inputError) { + return numberModel.inputError; + } else if (numberModel.pinDeactivated) { + qsTr("The online identification function of your ID card is deactivated. Please contact the authority responsible for issuing your identification document to activate the online identification function."); + } else { + return qsTr("Connected to %1. Please insert your ID card.").arg(remoteServiceModel.connectedServerDeviceNames); + } + } + subTitleTextRedColor: false } TechnologySwitch { @@ -58,4 +108,9 @@ Item { selectedTechnology: "REMOTE" onRequestPluginType: parent.requestPluginType(pReaderPlugInType) } + + RemoteServiceSettings { + id: remoteServiceSettings + visible: false + } } diff --git a/resources/qml/TabBarView.qml b/resources/qml/TabBarView.qml index f059a3879..abc744e10 100644 --- a/resources/qml/TabBarView.qml +++ b/resources/qml/TabBarView.qml @@ -45,6 +45,11 @@ Item { } function push(sectionPage, properties) { + var dep = stack.depth + if (dep !== 0 && stack.get(dep - 1) === sectionPage) { + return + } + if (baseItem.pushed) { sectionPage.firePush.connect(baseItem.push) sectionPage.firePop.connect(baseItem.pop) diff --git a/resources/qml/main.qml b/resources/qml/main.qml index 3380b8d30..5e36784f5 100644 --- a/resources/qml/main.qml +++ b/resources/qml/main.qml @@ -82,14 +82,19 @@ ApplicationWindow { var activeStackView = contentArea.visibleItem.stack if (activeStackView.depth <= 1 && (!activeStackView.currentItem.leftTitleBarAction || activeStackView.currentItem.leftTitleBarAction.state === "")) { - var currentTime = new Date().getTime(); - if( currentTime - lastCloseInvocation < 1000 ) { - plugin.fireQuitApplicationRequest() - return + if (contentArea.state != "identify") { + navBar.state = "identify" + navBar.currentIndex = 0 + } else { + var currentTime = new Date().getTime(); + if( currentTime - lastCloseInvocation < 1000 ) { + plugin.fireQuitApplicationRequest() + return + } + + lastCloseInvocation = currentTime + qmlExtension.showFeedback(qsTr("To close the app, quickly press the back button twice.")) } - - lastCloseInvocation = currentTime - qmlExtension.showFeedback(qsTr("Press the back button twice to close the app.")) } else if (activeStackView.currentItem.leftTitleBarAction) { if (navBar.isOpen) { diff --git a/resources/qml_stationary/AusweisApp2/Views/ProviderDetails/ProviderDetailDescription.qml b/resources/qml_stationary/AusweisApp2/Views/ProviderDetails/ProviderDetailDescription.qml index a0913ea4d..1cf650510 100644 --- a/resources/qml_stationary/AusweisApp2/Views/ProviderDetails/ProviderDetailDescription.qml +++ b/resources/qml_stationary/AusweisApp2/Views/ProviderDetails/ProviderDetailDescription.qml @@ -25,7 +25,6 @@ ScrollView { text: baseItem.description width: baseItem.width - Utils.dp(50) wrapMode: Text.Wrap - horizontalAlignment: Text.AlignJustify } } } diff --git a/resources/qtlogging.ini b/resources/qtlogging.ini index 980241eff..2464dc974 100644 --- a/resources/qtlogging.ini +++ b/resources/qtlogging.ini @@ -51,3 +51,6 @@ language=true # Logging category for initial stuff like main function init=true + +# Loggin category for persistent settings +settings=true diff --git a/resources/stylesheets/common.qss b/resources/stylesheets/common.qss deleted file mode 100644 index 3022f6bff..000000000 --- a/resources/stylesheets/common.qss +++ /dev/null @@ -1,99 +0,0 @@ -QLabel:focus{ - border-style: dotted; - border-width: 1px; -} - -QWidget#applicationPage{ - background-color: white; -} - -QLabel#logoLabel{ - background-color: #619CC8; -} - -QWidget#headerWidget{ - background-color: #619CC8; -} - -QWidget#centralWidget{ - background-color: white; -} - -governikus--SelfInformationWidget{ - background-color: white; -} - -governikus--SettingsWidget{ - background-color: white; -} - -QLabel#eac1PinInformationLabel{ - qproperty-alignment: AlignCenter; - font-weight:bold; - color: red; -} - -QLabel#changePinComfortInProgressLabel{ - qproperty-alignment: AlignCenter; - font-weight:bold; - color: red; -} - -QLabel#eac1PinInformationLabel, QLabel#changePinInformationLabel{ - qproperty-alignment: AlignCenter; - font-weight:bold; - color: red; -} - -QLabel#changePinDoneLabel{ - qproperty-alignment: AlignCenter; - font-weight:bold; - color: green; -} - -QLabel#detailText{ - background-color: #FFFFFF; - padding: 10px; - border:1px solid gray; -} - -QWidget#mainTabList{ - background-color:white; - border: none; -} - -QToolButton#canRandomButton{ - margin-right: 30px; -} - -#mainTabList governikus--TabButton{ - background-image: url(:/images/MenuUnselected.png); - background-repeat: no-repeat; - background-position: right; - padding: 16px; - margin: 1px 0px 1px 0px; - border: none; - font-size: 16pt; - text-align: left; - color: white; -} - -#mainTabList governikus--TabButton:checked{ - background-image: url(:/images/MenuSelected.png); - background-repeat: no-repeat; - background-position: right; - color: #619CC8; -} - -#mainTabList governikus--TabButton:disabled{ - background-image: url(:/images/MenuUnselectedDisabled.png); - background-repeat: no-repeat; - background-position: right; - color: grey; -} - -#mainTabList governikus--TabButton:focus{ - border-style: dotted; - border-width: 1px; -} - diff --git a/resources/stylesheets/desktop.qss b/resources/stylesheets/desktop.qss index 771468980..b8e81a5f4 100644 --- a/resources/stylesheets/desktop.qss +++ b/resources/stylesheets/desktop.qss @@ -1,9 +1,111 @@ -@import ":/stylesheets/common.qss"; +QLabel:focus { + border-style: dotted; + border-width: 1px; +} + +QWidget#applicationPage { + background-color: white; +} + +QLabel#logoLabel { + background-color: #619CC8; +} + +QWidget#headerWidget { + background-color: #619CC8; +} + +QWidget#centralWidget { + background-color: white; +} + +governikus--SelfInformationWidget { + background-color: white; +} + +governikus--SettingsWidget { + background-color: white; +} + +QLabel#eac1PinInformationLabel { + qproperty-alignment: AlignCenter; + font-weight:bold; + color: red; +} + +QLabel#changePinComfortInProgressLabel { + qproperty-alignment: AlignCenter; + font-weight:bold; + color: red; +} + +QLabel#eac1PinInformationLabel, QLabel#changePinInformationLabel { + qproperty-alignment: AlignCenter; + font-weight:bold; + color: red; +} -governikus--SelfInformationWidget #descriptionLogoInfo{ +QLabel#changePinDoneLabel { + qproperty-alignment: AlignCenter; + font-weight:bold; + color: green; +} + +QLabel#detailText { + background-color: #FFFFFF; + padding: 10px; + border:1px solid gray; +} + +QWidget#mainTabList { + background-color:white; + border: none; +} + +QToolButton#canRandomButton { + margin-right: 30px; +} + +#mainTabList governikus--TabButton { + background-image: url(:/images/MenuUnselected.png); + background-repeat: no-repeat; + background-position: right; + padding: 16px; + margin: 1px 0px 1px 0px; + border: none; + font-size: 16pt; + text-align: left; + color: white; +} + +#mainTabList governikus--TabButton:checked { + background-image: url(:/images/MenuSelected.png); + background-repeat: no-repeat; + background-position: right; + color: #619CC8; +} + +#mainTabList governikus--TabButton:disabled { + background-image: url(:/images/MenuUnselectedDisabled.png); + background-repeat: no-repeat; + background-position: right; + color: grey; +} + +#mainTabList governikus--TabButton:focus { + border-style: dotted; + border-width: 1px; +} + +governikus--SelfInformationWidget #descriptionLogoInfo { font-weight: bold; } -governikus--SelfInformationWidget #titleLabel{ +governikus--SelfInformationWidget #titleLabel { font-weight: bold; } + +QMessageBox { + messagebox-text-interaction-flags: 12; +} + diff --git a/resources/stylesheets/macos.qss b/resources/stylesheets/macos.qss deleted file mode 100644 index e3e65af67..000000000 --- a/resources/stylesheets/macos.qss +++ /dev/null @@ -1 +0,0 @@ -@import ":/stylesheets/desktop.qss"; diff --git a/resources/stylesheets/windows.qss b/resources/stylesheets/windows.qss deleted file mode 100644 index e3e65af67..000000000 --- a/resources/stylesheets/windows.qss +++ /dev/null @@ -1 +0,0 @@ -@import ":/stylesheets/desktop.qss"; diff --git a/resources/translations/ausweisapp2_de.ts b/resources/translations/ausweisapp2_de.ts index 1b473e2f5..5ce5276e0 100644 --- a/resources/translations/ausweisapp2_de.ts +++ b/resources/translations/ausweisapp2_de.ts @@ -5,8 +5,8 @@ AboutDialog - AusweisApp2 is a product of Governikus GmbH & Co. KG - on behalf of the Federal Ministry of the Interior. - Die AusweisApp2 ist ein Produkt der Governikus GmbH & Co. KG - im Auftrag des Bundesministeriums des Innern. + AusweisApp2 is a product of Governikus GmbH & Co. KG - on behalf of the Federal Ministry of the Interior, Building and Community. + Die AusweisApp2 ist ein Produkt der Governikus GmbH & Co. KG - im Auftrag des Bundesministeriums des Innern, für Bau und Heimat. @@ -124,8 +124,8 @@ - &Manual - &Handbuch + &Online help + &Online-Hilfe @@ -208,60 +208,73 @@ EN + + AvailableDevicesListDelegate + + + Unsupported + Nicht unterstützt + + BluetoothWorkflow - + Enable Bluetooth Bluetooth aktivieren - + Continue Fortsetzen - + Bluetooth is not supported by your device. Ihr Gerät unterstützt kein Bluetooth. - + Please try NFC. Bitte versuchen Sie NFC. + An error occured while connecting to your bluetooth device. Try to pair your device in the system settings and restart the app. + Beim Verbindungsaufbau zum Bluetooth-Kartenlesegerät ist ein Fehler aufgetreten. Bitte koppeln Sie das Gerät über die Einstellungen des Systems und starten Sie die App erneut. + + + Bluetooth is switched off. Bluetooth ist deaktiviert. - + Please enable Bluetooth. Bitte aktivieren Sie Bluetooth. - + No paired and activated Bluetooth device was detected. The AusweisApp2 needs access to your location in order to discover available devices. You can grant this permission after clicking the continue button. - Es konnte kein gekoppeltes, eingeschaltetes Bluetooth-Kartenlesegerät erkannt werden. Zur Erkennung benötigt die AusweisApp2 Zugriff auf Ihren Standort. Nach Klicken auf den Weiter-Knopf können Sie die benötigte Freigabe erteilen. + Es konnte kein gekoppeltes, eingeschaltetes Bluetooth-Kartenlesegerät erkannt werden. Zur Erkennung benötigt die AusweisApp2 Zugriff auf Ihren Standort. Nach Klicken auf den Fortsetzen-Knopf können Sie die benötigte Freigabe erteilen. - + Establish connection Verbindung wird hergestellt - + Determine card Ermittle Ausweis - + Search card reader... Suche Kartenlesegerät... - + Please insert your ID card. Bitte legen Sie Ihren Ausweis ein. @@ -323,7 +336,7 @@ ChangePinController - + You may now remove your ID card from the device. Sie können nun Ihr Ausweisdokument vom Gerät entfernen. @@ -387,8 +400,8 @@ DataGroup - - + + No data requested Keine Daten erforderlich @@ -461,37 +474,42 @@ EnterPinView - + The entered PIN does not match the new PIN. Please correct your input. Die eingegebene PIN stimmt nicht mit Ihrer neuen PIN überein. Bitte korrigieren Sie Ihre PIN-Eingabe. - + You have entered the wrong PIN twice. Prior to a third attempt, you have to enter your six-digit card access number first. You can find your card access number on the front of your ID card. Sie haben Ihre PIN zweimal falsch eingegeben. Für einen dritten Versuch müssen Sie vorher Ihre 6-stellige Zugangsnummer eingeben. Sie finden Ihre Zugangsnummer auf der Vorderseite Ihres Ausweises. - + You have entered a wrong PIN three times. Your PIN is now blocked. You have to enter the PUK now for unblocking. Sie haben Ihre PIN dreimal falsch eingegeben. Ihre PIN ist jetzt gesperrt. Zum Entsperren geben Sie bitte Ihre PUK ein. - + Please enter a new 6-digit PIN of your choice. Geben Sie nun bitte eine neue 6-stellige PIN Ihrer Wahl ein. - + Please enter your new 6-digit PIN again. Wiederholen Sie bitte Ihre neue 6-stellige PIN. - + + Enter the pairing code shown on your other device to use it as a card reader. + Geben Sie den Kopplungscode, der auf Ihrem anderen Gerät angezeigt wird, ein, um dieses als Kartenlesegerät verwenden zu können. + + + Please enter your current PIN or your initial transport PIN first. Geben Sie bitte zunächst Ihre aktuelle PIN bzw. die Transport-PIN ein. - + Please enter your personal PIN. Geben Sie bitte Ihre persönliche PIN ein. @@ -499,17 +517,17 @@ Feedback - + Your opinion matters Ihre Meinung zählt - + We are happy about every feedback on our software. Wir freuen uns über Ihre Rückmeldung zu unserem Programm. - + Rate AusweisApp2 Bewerten Sie die AusweisApp2 @@ -519,57 +537,57 @@ Hilfe & Feedback - + FAQ FAQ - + Do you have questions how to use AusweisApp2? Haben Sie Fragen zur Nutzung der AusweisApp2? - + https://www.ausweisapp.bund.de/en/questions-and-answers/frequently-asked-questions/ https://www.ausweisapp.bund.de/fragen-und-antworten/haeufig-gestellte-fragen/ - + Support Support - + You need further help? Benötigen Sie weitere Hilfe? - + https://www.ausweisapp.bund.de/en/questions-and-answers/support/ https://www.ausweisapp.bund.de/fragen-und-antworten/support/ - + Please rate us in the Google Play Store. Bewerten Sie die AusweisApp2. - + Report error Melden Sie einen Fehler - + You found a bug? Please tell us, so we can fix it. Sie haben einen Fehler gefunden? Teilen Sie ihn uns mit, damit wir ihn beheben können. - + Android log file Android Protokolle - + <Please describe the error> <Bitte beschreiben Sie den Fehler> @@ -649,7 +667,7 @@ Close AusweisApp2 window automatically after successful identification - AusweisApp2 automatisch nach erfolgreicher Authentifizierung schließen + AusweisApp2 automatisch nach erfolgreicher Authentisierung schließen @@ -657,6 +675,79 @@ Bildschirmtastatur verwenden + + HistoryContextMenu + + + Disable history + Verlauf deaktivieren + + + + Enable history + Verlauf aktivieren + + + + History enabled + Verlauf aktiviert + + + + History disabled + Verlauf deaktiviert + + + + Delete all + Lösche alle + + + + Please confirm that you want to delete your complete history. + Bitte bestätigen Sie, dass der komplette Verlauf gelöscht werden soll. + + + + Delete last 4 weeks + Lösche die letzten 4 Wochen + + + + Please confirm that you want to delete your history from the last four weeks. + Bitte bestätigen Sie, dass der Verlauf der letzten vier Wochen gelöscht werden soll. + + + + Delete last week + Lösche letzte Woche + + + + Please confirm that you want to delete your history from the last week. + Bitte bestätigen Sie, dass der Verlauf der letzten Woche gelöscht werden soll. + + + + Delete last day + Lösche letzten Tag + + + + Please confirm that you want to delete your history from the last day. + Bitte bestätigen Sie, dass der Verlauf des letzten Tages gelöscht werden soll. + + + + Delete last hour + Lösche letzte Stunde + + + + Please confirm that you want to delete your history from the last hour. + Bitte bestätigen Sie, dass der Verlauf der letzten Stunde gelöscht werden soll. + + HistoryListView @@ -668,27 +759,27 @@ HistoryListViewDelegateContent - + today heute - + yesterday gestern - + dddd dddd - + dd.MM.yyyy dd.MM.yyyy - + Tap for more details Berühren Sie hier für mehr Details @@ -696,18 +787,18 @@ HistoryView - - + + History Verlauf - - - - + + + + Currently there are no history entries. Derzeit gibt es keine Einträge im Verlauf. @@ -721,7 +812,7 @@ Delete all - Alle löschen + Lösche alle @@ -779,6 +870,29 @@ PDF Dokumente (*.pdf) + + HistoryViewConfirmationPopup + + + Delete history + Verlauf löschen + + + + Cancel + Abbrechen + + + + Delete + Löschen + + + + Removed %1 entries from the history. + Es wurden %1 Einträge aus dem Verlauf entfernt. + + HistoryViewDetails @@ -878,7 +992,7 @@ IdentifyController - + You may now remove your ID card from the device. Sie können nun Ihr Ausweisdokument vom Gerät entfernen. @@ -887,51 +1001,76 @@ IdentifyView - - - - + + + + Identify Ausweisen - - Authenticate - Jetzt ausweisen + + Authentication in progress + Authentisierung wird durchgeführt - - + + Please wait a moment... Bitte warten Sie einen Moment... - + The online identification function of your ID card is deactivated. Please contact the authority responsible for issuing your identification document to activate the online identification function. Die Online-Ausweisfunktion Ihres Ausweisdokumentes ist nicht aktiviert. Bitte wenden Sie sich an die Behörde, die Ihr Ausweisdokument ausgegeben hat, um die Online-Ausweisfunktion zu aktivieren. - + Please observe the display of your card reader. Bitte beachten Sie die Anzeige Ihres Kartenlesegeräts. - + You have entered the wrong PIN twice. Prior to a third attempt, you have to enter your six-digit card access number first. You can find your card access number on the front of your ID card. Sie haben Ihre PIN zweimal falsch eingegeben. Für einen dritten Versuch müssen Sie vorher Ihre 6-stellige Zugangsnummer eingeben. Sie finden Ihre Zugangsnummer auf der Vorderseite Ihres Ausweises. - + You have entered a wrong PIN three times. Your PIN is now blocked. You have to enter the PUK now for unblocking. Sie haben Ihre PIN dreimal falsch eingegeben. Ihre PIN ist jetzt gesperrt. Zum Entsperren geben Sie bitte Ihre PUK ein. - + + Service provider is being verified + Diensteanbieter wird geprüft + + + + Card is being verified + Karte wird geprüft + + + + Reading data + Daten werden gelesen + + + + Sending data to service provider + Sende Daten an den Dienstanbieter + + + + Preparing results + Bereite Ergebnisse vor + + + No network connectivity Keine Netzwerkverbindung - + Please enable the network interface or cancel the workflow. Bitte stellen Sie eine Internetverbindung her oder beenden Sie den Vorgang. @@ -939,81 +1078,94 @@ IdentifyViewContent - - - - + + + + Service provider Diensteanbieter - - - - + + + + Purpose for reading out requested data Zweck des Auslesevorgangs - - - - + + + + Identify now Jetzt ausweisen - - - + + + Transactional information Transaktionsinformationen - - - - + + + + Required Data Erforderliche Daten - - - - + + + + Optional Data Optionale Daten - - - - + + + + You are about to identify yourself towards the following service provider: Sie möchten sich bei folgendem Diensteanbieter ausweisen: + + + + + + Identify + Ausweisen + - - - + + + The following data will be transferred to the service provider when you enter the PIN: Folgende Daten Ihres Ausweises werden nach Eingabe der PIN ausgelesen und an den Diensteanbieter übermittelt: - IdentifyViewHeader + IdentifyViewInfo - - Hello, here you have the opportunity to view the stored data on your identity card. - Hallo, hier haben Sie die Möglichkeit, die auf Ihrem Personalausweis hinterlegten Daten einzusehen. + + You can use your ID card anywhere you see this logo. + Überall wo Sie dieses Logo sehen, können Sie Ihr Ausweisdokument einsetzen. - - Hello, "%1" wants to read your data. - Hallo, "%1" möchte Ihre Daten auslesen. + + Use the button 'See my personal data' to display the data stored on your ID card. An Internet connection is required to display the data. Your personal data is neither saved nor processed in any way. + Über die Schaltfläche "Meine Daten einsehen" können Sie sich die im Chip Ihres Ausweisdokuments gespeicherten Daten anzeigen lassen. Um die Daten anzeigen zu können, benötigt diese Anwendung eine Internetverbindung. Es erfolgt keine Speicherung oder Weiterverarbeitung Ihrer persönlichen Daten. + + + + See my personal data + Meine Daten einsehen @@ -1027,12 +1179,12 @@ Information - + You need help? Benötigen Sie Hilfe? - + Here you are in the right place. Dann sind Sie hier richtig. @@ -1042,27 +1194,27 @@ Information - + Version information Versionsinformationen - + Here you can see detailed information about AusweisApp2. Hier finden Sie detaillierte Informationen zur AusweisApp2. - + Software license Softwarelizenz - + Read the software license text on the application homepage. Lesen Sie die Softwarelizenz auf der Internetseite der Anwendung. - + https://www.ausweisapp.bund.de/en/download/ https://www.ausweisapp.bund.de/download/ @@ -1070,14 +1222,19 @@ KnownDevicesListDelegate - - (Available) - (Verfügbar) + + Available + Verfügbar + + + + Available, but unsupported + Verfügbar, aber nicht unterstützt - - Last connection: - Letzte Verbindung: + + Last connection: + Letzte Verbindung: @@ -1139,57 +1296,57 @@ Mehr - + Version information Versionsinformationen - + FAQ FAQ - + https://www.ausweisapp.bund.de/en/questions-and-answers/frequently-asked-questions/ https://www.ausweisapp.bund.de/fragen-und-antworten/haeufig-gestellte-fragen/ - + Support Support - + https://www.ausweisapp.bund.de/en/questions-and-answers/support/ https://www.ausweisapp.bund.de/fragen-und-antworten/support/ - + Rate app Bewerten - + https://www.ausweisapp.bund.de/en/questions-and-answers/evaluate-us/ https://www.ausweisapp.bund.de/fragen-und-antworten/bewerten-sie-uns/ - + Software license Softwarelizenz - + https://www.ausweisapp.bund.de/en/download/ https://www.ausweisapp.bund.de/download/ - + Configure remote service Fernzugriff konfigurieren - + Developer options Entwickleroptionen @@ -1249,53 +1406,58 @@ NfcWorkflow - + NFC is not supported by your device. Ihr Gerät unterstützt kein NFC. - + Please try Bluetooth. Bitte versuchen Sie Bluetooth. - + NFC is switched off. NFC ist nicht aktiv. - + Go to NFC settings Zu den NFC Einstellungen - + Please enable NFC in your system settings. Bitte aktivieren Sie NFC in Ihren Systemeinstellungen. - + Establish connection Verbindung wird hergestellt - + Your device does not meet the technical requirements (Extended Length not supported). You require an additional 'Bluetooth card reader' or an additional 'smartphone as card reader' to use the online identification function with this device. Ihr Gerät erfüllt leider nicht die technischen Voraussetzungen (Extended Length). Sie können die Online-Ausweisfunktion daher mit diesem Gerät nur über einen separaten Bluetooth-Leser oder mit einem separaten Smartphone als Kartenleser nutzen. - + The online identification function of your ID card is deactivated. Please contact the authority responsible for issuing your identification document to activate the online identification function. Die Online-Ausweisfunktion Ihres Ausweisdokumentes ist nicht aktiviert. Bitte wenden Sie sich an die Behörde, die Ihr Ausweisdokument ausgegeben hat, um die Online-Ausweisfunktion zu aktivieren. - + Please place your device<br/>on your ID card. Bitte platzieren Sie Ihr Gerät<br/>über Ihrem Personalausweis. PinSettingsWidget + + + open on screen keyboard + öffne bildschirmtastatur + Please pay attention to the display of your card reader. @@ -1549,14 +1711,14 @@ Bitte beachten Sie, dass Sie mit Ihrer PUK lediglich Ihren Online-Ausweis entspe PIN-Verwaltung - - + + You have the opportunity to change your transport PIN into a personal PIN. You can also change the PIN at any time or unblock the PIN using the personal unblocking key (PUK). The transport PIN and the PUK can be found in the letter sent to you by your competent authority. Hier haben Sie die Möglichkeit, Ihre Transport-PIN in eine persönliche PIN zu ändern. Zudem können Sie jederzeit Ihre persönliche PIN ändern oder eine Blockierung mit Hilfe der Entsperrnummer (PUK) aufheben. Sie finden Ihre initiale PIN und die PUK in dem Schreiben, das Sie nach Beantragung Ihres Ausweisdokuments von der für die Ausgabe Ihres Ausweisdokuments zuständigen Behörde erhalten haben. - - + + Change PIN now Jetzt PIN ändern @@ -1598,7 +1760,7 @@ Bitte beachten Sie, dass Sie mit Ihrer PUK lediglich Ihren Online-Ausweis entspe ProviderContactTab - + Unknown Unbekannt @@ -1653,7 +1815,7 @@ Bitte beachten Sie, dass Sie mit Ihrer PUK lediglich Ihren Online-Ausweis entspe Daten auslesen - + Terms of usage Nutzungsbedingungen @@ -1722,8 +1884,8 @@ Bitte beachten Sie, dass Sie mit Ihrer PUK lediglich Ihren Online-Ausweis entspe Kontakt - - + + Description not available Beschreibung nicht verfügbar @@ -1739,7 +1901,7 @@ Bitte beachten Sie, dass Sie mit Ihrer PUK lediglich Ihren Online-Ausweis entspe ProviderHeader - + To service provider Zum Anbieter @@ -1816,10 +1978,10 @@ Bitte beachten Sie, dass Sie mit Ihrer PUK lediglich Ihren Online-Ausweis entspe Weitere Services - - - - + + + + No match found Kein Ergebnis gefunden @@ -1838,7 +2000,7 @@ Bitte beachten Sie, dass Sie mit Ihrer PUK lediglich Ihren Online-Ausweis entspe ProviderViewDelegate - + i i @@ -1927,11 +2089,6 @@ Bitte beachten Sie, dass Sie mit Ihrer PUK lediglich Ihren Online-Ausweis entspe Smartphone as card reader Smartphone als Kartenleser - - - No smartphone with enabled remote service found. See online help for details of use. - Es wurde kein Smartphone mit aktiviertem Fernzugriff gefunden. Details zur Verwendung finden Sie in der Online-Hilfe. - Pair @@ -1947,11 +2104,6 @@ Bitte beachten Sie, dass Sie mit Ihrer PUK lediglich Ihren Online-Ausweis entspe Card readers Kartenlesegeräte - - - No connected card reader found. See online help for installation of card readers. - Es wurde kein angeschlossenes Kartenlesegerät gefunden. Details zur Installation von Kartenlesegeräten finden Sie in der Online-Hilfe. - After connecting a new card reader it may take a few seconds to recognize the driver. It may be necessary to restart your system after installing the driver. @@ -1979,22 +2131,22 @@ Bitte beachten Sie, dass Sie mit Ihrer PUK lediglich Ihren Online-Ausweis entspe RemoteServicePairingPopup - + Pairing code Kopplungscode - + Enter the pairing code shown on your other device to use it as a card reader Geben Sie den Kopplungscode ein, der auf Ihrem anderen Gerät angezeigt wird, um es als Kartenlesegerät zu verwenden - + Enter this code on your other device to use this device as a card reader Geben Sie diesen Code auf Ihrem anderen Gerät ein, um dieses Gerät als Kartenlesegerät zu verwenden - + Start pairing Kopplung starten @@ -2002,17 +2154,17 @@ Bitte beachten Sie, dass Sie mit Ihrer PUK lediglich Ihren Online-Ausweis entspe RemoteServiceSettings - + Configure remote service Fernzugriff konfigurieren - + Pairing failed. Please try again to activate pairing on your other device and enter the shown pairing code. Die Kopplung ist fehlgeschlagen. Bitte starten Sie eine neue Kopplung an Ihrem anderen Gerät und geben den angezeigten Kopplungscode ein. - + Device name Gerätename @@ -2022,17 +2174,17 @@ Bitte beachten Sie, dass Sie mit Ihrer PUK lediglich Ihren Online-Ausweis entspe Wählen Sie einen Gerätenamen, unter dem Ihr Smartphone im Netzwerk gefunden werden kann: - + PIN pad mode Tastaturmodus - + Enter PIN on smartphone PIN-Eingabe auf dem Smartphone - + Paired devices Gekoppelte Geräte @@ -2042,7 +2194,7 @@ Bitte beachten Sie, dass Sie mit Ihrer PUK lediglich Ihren Online-Ausweis entspe Kein Gerät gekoppelt. - + Available devices Verfügbare Geräte @@ -2052,15 +2204,20 @@ Bitte beachten Sie, dass Sie mit Ihrer PUK lediglich Ihren Online-Ausweis entspe Kein entferntes Kartenlesegerät in Ihrem Netzwerk verfügbar. Bitte stellen Sie sicher, dass die Funktion "Fernzugriff" in der AusweisApp2 auf Ihrem anderen Gerät aktiviert ist. Beide Geräte müssen sich im selben Netzwerk befinden. - + Start the pairing mode on the other device if it is not already started. Aktivieren Sie den Kopplungsmodus auf dem anderen Gerät wenn er noch nicht aktiviert sein sollte. - + OK OK + + + Pairing code + Kopplungscode + RemoteServiceView @@ -2070,42 +2227,42 @@ Bitte beachten Sie, dass Sie mit Ihrer PUK lediglich Ihren Online-Ausweis entspe Smartphone als Kartenlesegerät - + Please start the remote service in order to use your smartphone as a card reader with AusweisApp2. Please note: Both your devices have to be connected to the same WiFi. Bitte starten Sie den Fernzugriff, damit Sie Ihr Smartphone als Kartenlesegerät für die AusweisApp2 nutzen können. Bitte beachten Sie: dies ist nur möglich, wenn beide Geräte mit demselben WLAN verbunden sind. - + Enable NFC NFC aktivieren - + Stop remote service Fernzugriff stoppen - + Start remote service Fernzugriff starten - + Start pairing Kopplung starten - + Card access in progress Kartenzugriff - - Please pay attention to the display on your other device. - Bitte beachten Sie die Anzeige auf Ihrem anderen Gerät. + + Please pay attention to the display on your other device %1. + Bitte beachten Sie die Anzeige auf Ihrem anderen Gerät %1. - + Settings Einstellungen @@ -2113,48 +2270,63 @@ Bitte beachten Sie, dass Sie mit Ihrer PUK lediglich Ihren Online-Ausweis entspe RemoteWorkflow - - Enable Wifi - WLAN aktivieren - - - + Continue Fortsetzen - + + Pair device + Gerät koppeln + + + + Enable Wifi + WLAN aktivieren + + + Establish connection Verbindung wird hergestellt - + + The online identification function of your ID card is deactivated. Please contact the authority responsible for issuing your identification document to activate the online identification function. + Die Online-Ausweisfunktion Ihres Ausweisdokumentes ist nicht aktiviert. Bitte wenden Sie sich an die Behörde, die Ihr Ausweisdokument ausgegeben hat, um die Online-Ausweisfunktion zu aktivieren. + + + + Connected to %1. Please insert your ID card. + Verbunden mit %1. Bitte legen Sie Ihr Ausweisdokument auf. + + + Determine card Ermittle Ausweis - + + The device %1 was unpaired because it does not react to connection attempts. Retry the pairing process if you want to use this device to authenticate yourself. + Das Gerät %1 wurde entkoppelt, da es nicht auf Verbindungsversuche reagiert hat. Versuchen Sie das Gerät erneut zu koppeln, wenn Sie es zur Authentisierung verwenden möchten. + + + To use the remote service WiFi has to be activated. Please activate WiFi in your device settings. - Um den Fernzugriff zu nutzen muss WLAN aktiviert werden. Bitte aktivieren Sie WLAN in Ihren Einstellungen. + Um den Fernzugriff zu nutzen, muss WLAN aktiviert werden. Bitte aktivieren Sie WLAN in Ihren Einstellungen. - + No paired and activated remote device was detected. Make sure that you have started remote service on you remote device. Kein gekoppeltes und aktiviertes Gerät gefunden. Stellen Sie sicher, dass der Fernzugriff auf Ihrem Gerät gestartet wurde. - - - Please insert your ID card. - Bitte legen Sie Ihren Ausweis auf. - ResultView - + - Ok - Ok + OK + OK @@ -2184,8 +2356,8 @@ Bitte beachten Sie, dass Sie mit Ihrer PUK lediglich Ihren Online-Ausweis entspe - Ok - Ok + OK + OK @@ -2305,38 +2477,30 @@ Bitte beachten Sie, dass Sie mit Ihrer PUK lediglich Ihren Online-Ausweis entspe Details - - TechnologyInfo - - - The device %1 was unpaired because it does not react to connection attempts. Retry the pairing process if you want to use this device to authenticate yourself. - Das Gerät %1 wurde entkoppelt, da es nicht auf Verbindungsversuche reagiert hat. Versuchen Sie das Gerät erneut zu koppeln wenn sie es zur Selbstauthentifizierung verwenden möchten. - - TechnologySwitch - + NFC NFC - + WiFi WLAN - + Bluetooth Bluetooth - + Use WiFi card reader instead<br/>of Bluetooth card reader WLAN Kartenlesegerät anstelle <br/>vom Bluetooth Kartenlesegerät verwenden - + Use Bluetooth card reader instead<br/>of remote card reader Bluetooth Kartenlesegerät anstelle <br/>vom WLAN Kartenlesegerät verwenden @@ -2617,17 +2781,17 @@ Bitte beachten Sie, dass Sie mit Ihrer PUK lediglich Ihren Online-Ausweis entspe governikus::AppQtGui - + AusweisApp2 was started. AusweisApp2 wurde gestartet. - + Do not show this dialog again. Diesen Hinweis nicht mehr anzeigen. - + Open Öffnen @@ -2637,67 +2801,73 @@ Bitte beachten Sie, dass Sie mit Ihrer PUK lediglich Ihren Online-Ausweis entspe Aktualisierungen - - - + + + + Information Information - + The developer mode is enabled. Der Entwicklermodus ist aktiviert. - + Do you want to disable the developer mode? Möchten Sie den Entwicklermodus deaktivieren? - + Did you change the initial transport PIN already?<br><br>Prior to the first use of the online identification function you have to replace the transport PIN by an individual 6-digit PIN. Online identification with transport PIN is not possible. Haben Sie Ihre Transport-PIN schon geändert? <br><br>Bevor Sie das erste mal die Online-Ausweisfunktion nutzen können, müssen Sie Ihre Transport-PIN durch eine persönliche, 6-stellige PIN ersetzen. Die Online-Ausweisfunktion ist mit der Transport-PIN nicht möglich. - + No, change transport PIN now Nein, PIN jetzt ändern - + Exit AusweisApp2 AusweisApp2 beenden - + The user interface of the %1 is closed. Die Benutzeroberfläche der %1 wird geschlossen. - + The program remains available via the icon in the system tray. Click on the %1 icon to reopen the user interface. Das Programm steht weiterhin im Infobereich zur Verfügung. Klicken Sie auf das Symbol der %1, um die Anwendung wieder zu öffnen. - + Your software is up to date. Ihre Software ist auf dem aktuellen Stand. + + + The device "%1" was unpaired because it does not react to connection attempts. Retry the pairing process if you want to use this device to authenticate yourself. + Das Gerät "%1" wurde entkoppelt, da es nicht auf Verbindungsversuche reagiert hat. Versuchen Sie das Gerät erneut zu koppeln wenn Sie es zur Authentisierung verwenden möchten. + governikus::AppQtMainWidget - + https://www.ausweisapp.bund.de/en/service/haeufig-gestellte-fragen/ https://www.ausweisapp.bund.de/service/haeufig-gestellte-fragen/ - + https://www.ausweisapp.bund.de/en/feedback/melden-sie-einen-fehler/ https://www.ausweisapp.bund.de/feedback/melden-sie-einen-fehler/ - + https://www.ausweisapp.bund.de/en/feedback/bewerten-sie-uns/ https://www.ausweisapp.bund.de/feedback/bewerten-sie-uns/ @@ -2725,37 +2895,37 @@ Bitte beachten Sie, dass Sie mit Ihrer PUK lediglich Ihren Online-Ausweis entspe governikus::CertificateDescriptionModel - + Service provider Diensteanbieter - + Certificate issuer Aussteller des Berechtigungszertifikats - + Name, address and mail address of the service provider Name, Adresse und E-Mail vom Diensteanbieter - + Purpose Zweck - + Indication of the bodies responsible for the service provider, that verify the compliance with data security regulations Angabe der für den Dienstanbieter zuständigen Datenschutzaufsicht - + Service provider information Dienstanbieterinformationen - + Validity Gültigkeit @@ -2809,7 +2979,7 @@ Bitte beachten Sie, dass Sie mit Ihrer PUK lediglich Ihren Online-Ausweis entspe governikus::DetailDialog - + Service provider data Angaben zum Diensteanbieter @@ -2817,7 +2987,7 @@ Bitte beachten Sie, dass Sie mit Ihrer PUK lediglich Ihren Online-Ausweis entspe governikus::DetailWidget - + Service provider details dialog Dialog mit Details des Diensteanbieters @@ -2848,27 +3018,23 @@ Bitte beachten Sie, dass Sie mit Ihrer PUK lediglich Ihren Online-Ausweis entspe Diagnose - - Save diagnosis result - Diagnoseergebnis speichern - - - - AusweisApp2-diagnosis.txt - AusweisApp2-Diagnose.txt + + Save + Speichern - - Text files (*.txt) - Textdateien (*.txt) + + + Text files + Textdateien - + File error Dateifehler - + An error occurred while saving the file. Beim Speichern der Datei ist ein Fehler aufgetreten. @@ -2915,8 +3081,8 @@ Bitte beachten Sie, dass Sie mit Ihrer PUK lediglich Ihren Online-Ausweis entspe - - + + Version: %1 Version: %1 @@ -2977,17 +3143,17 @@ Bitte beachten Sie, dass Sie mit Ihrer PUK lediglich Ihren Online-Ausweis entspe d. MMMM yyyy, hh:mm:ss AP - d. MMMM yyyy, HH:mm:ss Uhr + d. MMMM yyyy, HH:mm:ss 'Uhr' - - + + Vendor: %1 Hersteller: %1 - - + + File path: %1 Dateipfad: %1 @@ -3024,11 +3190,6 @@ Bitte beachten Sie, dass Sie mit Ihrer PUK lediglich Ihren Online-Ausweis entspe The program received an unexpected message from the server. Die Anwendung hat eine nicht erwartete Nachricht vom Server erhalten. - - - After three wrong entries your PIN is blocked. Using the online identification function is no longer possible. - Nach dreimaliger Falscheingabe ist Ihre PIN gesperrt. Die Nutzung der Online-Ausweisfunktion ist nun nicht mehr möglich. - Pre-verification failed. @@ -3099,6 +3260,11 @@ Bitte beachten Sie, dass Sie mit Ihrer PUK lediglich Ihren Online-Ausweis entspe Cannot start authentication. An operation is already in progress. Die Authentisierung kann nicht gestartet werden. Es läuft bereits eine Operation. + + + After three wrong entries your PIN is blocked. Please use the PIN management in this app to unblock it with the help of your PUK. + Ihre PIN ist nach dreimaliger Fehleingabe gesperrt. Verwenden Sie die PIN-Verwaltung dieser App, um diese mit Ihrer PUK zu entsperren. + Using the developer mode is only allowed in a test environment. @@ -3296,8 +3462,8 @@ Bitte beachten Sie, dass Sie mit Ihrer PUK lediglich Ihren Online-Ausweis entspe - Remote reader connection request does not contain any supported API level. - Die Verbindungsanforderung zum entfernten Kartenlesegerät enthält keine unterstützte API-Version. + Your remote reader version is incompatible with the local version. Please install the latest AusweisApp2 version on both your smartphone and your computer. + Die Version Ihres Smartphones als Kartenlesegerätes ist inkompatibel. Bitte aktualisieren Sie Ihre Installation. @@ -3333,62 +3499,62 @@ Bitte beachten Sie, dass Sie mit Ihrer PUK lediglich Ihren Online-Ausweis entspe governikus::GuiUtils - + Wrong card access number (CAN) Falsche Zugangsnummer (CAN) - + The given card access number (CAN) is not correct. You have one more try to enter the correct PIN. Please mind that you have to acknowledge this last try with your card access number (CAN). Die eingegebene Zugangsnummer (CAN) ist nicht korrekt. Sie haben noch eine weitere Möglichkeit die korrekte PIN einzugeben. Beachten Sie, dass Sie diesen letzten Versuch mit der Zugangsnummer (CAN) bestätigen müssen. - + Wrong PUK Falsche PUK - + PUK is inoperative PUK ist außer Betrieb - + Please enter your PUK again. Bitte geben Sie Ihre PUK erneut ein. - + You have correctly entered the PUK ten times and have thus reached the maximum count. The PUK is now inoperative and can no longer be used for unblocking the PIN. Please address your competent authority that has issued your ID card for unblocking your PIN. Sie haben die PUK zehn Mal korrekt eingegeben und damit die maximale Anzahl erreicht. Die PUK ist daher außer Betrieb und kann nicht mehr zum Entsperren der PIN verwendet werden. Bitte wenden Sie sich zum Entsperren der PIN an die zuständige Behörde, die Ihr Ausweisdokument ausgegeben hat. - + Wrong PIN Falsche PIN - + After three wrong entries your PIN is blocked. Using the online identification function is no longer possible. </p><p>You can unblock your PIN in the following dialog. The program supports you with the steps now required. Ihre PIN ist nach dreimaliger Fehleingabe gesperrt. Die Nutzung der Online-Ausweisfunktion ist in diesem Zustand nicht mehr möglich.</p><p>Sie können die PIN im folgenden Dialog entsperren. Die Anwendung unterstützt Sie in den nun notwendigen Schritten. - + The given PIN is not correct. You have one more try to enter the correct PIN. Please mind that you have to acknowledge this last try with your card access number (CAN). Die eingegebene PIN ist nicht korrekt. Sie haben noch eine weitere Möglichkeit die korrekte PIN einzugeben. Beachten Sie, dass Sie diesen letzten Versuch mit der Zugangsnummer (CAN) bestätigen müssen. - + The given PIN is not correct. You have %1 tries to enter the correct PIN. Die eingegebene PIN ist nicht korrekt. Sie haben noch %1 weitere Möglichkeiten die korrekte PIN einzugeben. - + PIN blocked PIN gesperrt - + After three wrong entries your PIN is blocked. Using the online identification function is no longer possible. <br/>You can unblock the PIN as follows:<ol><li> Select the "Settings" function.</li><li>Select the "PIN Management" tab. </li><li>Follow the instructions on the screen.</li></ol>Note: You will find the PUK in the letter you received during the application for the ID card in the "Unblocking key PUK" section. Further information is available on the site <a href="http://www.personalausweisportal.de">http://www.personalausweisportal.de</a>.<br>Do you want to unblock the PIN now? Sie haben Ihre PIN dreimal falsch eingegeben. Die Online-Ausweisfunktion ist jetzt blockiert. Die Blockierung können Sie mit Ihrer Entsperrnummer (PUK) aufheben. Sie finden Ihre PUK in dem Schreiben, das Sie nach Beantragung Ihres Ausweisdokuments von der für die Ausgabe Ihres Ausweisdokuments zuständigen Behörde erhalten haben. Bitte beachten Sie: Sie können mit Ihrer PUK lediglich Ihren Online-Ausweis entsperren. Sollten Sie Ihre PIN vergessen haben, können Sie von der für die Ausgabe Ihres Ausweisdokuments zuständigen Behörde eine neue PIN setzen lassen.<br>Wollen Sie die Blockierung nun aufheben? @@ -3439,17 +3605,18 @@ Bitte beachten Sie, dass Sie mit Ihrer PUK lediglich Ihren Online-Ausweis entspe Daten - + AusweisApp2.History.%1.pdf AusweisApp2.Verlauf.%1.pdf - + Save Speichern - + + PDF Documents PDF-Dokumente @@ -3482,27 +3649,27 @@ Bitte beachten Sie, dass Sie mit Ihrer PUK lediglich Ihren Online-Ausweis entspe Die Datei ist größer als 3MB und kann nicht angezeigt werden: - + Delete log files Protokolle löschen - + Do you really want to delete all old log files? Wolle Sie wirklich alle alten Protokolle löschen? - + Save Speichern - + File error Dateifehler - + An error occurred while saving the file. Beim Speichern der Datei ist ein Fehler aufgetreten. @@ -3518,27 +3685,27 @@ Bitte beachten Sie, dass Sie mit Ihrer PUK lediglich Ihren Online-Ausweis entspe governikus::NumberModel - + The given PIN is not correct. You have 2 tries to enter the correct PIN. Die eingegebene PIN ist nicht korrekt. Sie haben noch 2 weitere Möglichkeiten die korrekte PIN einzugeben. - + You have entered the wrong PIN twice. Prior to a third attempt, you have to enter your six-digit card access number first. You can find your card access number on the front of your ID card. Sie haben Ihre PIN zweimal falsch eingegeben. Für einen dritten Versuch müssen Sie vorher Ihre 6-stellige Zugangsnummer eingeben. Sie finden Ihre Zugangsnummer auf der Vorderseite Ihres Ausweises. - + You have entered a wrong PIN three times. Your PIN is now blocked. You have to enter the PUK now for unblocking. Sie haben Ihre PIN dreimal falsch eingegeben. Ihre PIN ist jetzt gesperrt. Zum Entsperren geben Sie bitte Ihre PUK ein. - + You have entered a wrong CAN, please try again. Sie haben eine falsche CAN eingegeben. Bitte versuchen Sie es erneut. - + You have entered a wrong PUK. Please try again. Sie haben eine falsche PUK eingegeben. Bitte versuchen Sie es erneut. @@ -3547,8 +3714,8 @@ Bitte beachten Sie, dass Sie mit Ihrer PUK lediglich Ihren Online-Ausweis entspe governikus::PdfCreator - AusweisApp2 is a product of Governikus GmbH & Co. KG - on behalf of the Bundesministerium des Innern (Federal Ministry of the Interior). - Die AusweisApp2 ist ein Produkt der Governikus GmbH & Co. KG - im Auftrag des Bundesministeriums des Innern. + AusweisApp2 is a product of Governikus GmbH & Co. KG - on behalf of the Federal Ministry of the Interior, Building and Community. + Die AusweisApp2 ist ein Produkt der Governikus GmbH & Co. KG - im Auftrag des Bundesministeriums des Innern, für Bau und Heimat. @@ -3634,44 +3801,43 @@ Bitte beachten Sie, dass Sie mit Ihrer PUK lediglich Ihren Online-Ausweis entspe governikus::PinSettingsWidget - - - - - + + + + + Only digits (0-9) are allowed. Es sind nur Ziffern (0-9) erlaubt. - + Enter PUK PUK eingeben - + Change PIN PIN ändern - + The PIN in the field "%1" does not match the PIN in the field "%2". Die PIN im Feld "%1" stimmt nicht mit der PIN im Feld "%2" überein. - - + PIN correct. Die PIN stimmt überein. - - Card reader icon - Icon des Kartenlesegeräts + + card inserted + karte aufgelegt - - Empty card reader icon - Kein Kartenlesegerät icon + + no card inserted + karte nicht aufgelegt @@ -3720,12 +3886,12 @@ Bitte beachten Sie, dass Sie mit Ihrer PUK lediglich Ihren Online-Ausweis entspe governikus::ProviderWidget - + Name Name - + Address Adresse @@ -3757,32 +3923,48 @@ Bitte beachten Sie, dass Sie mit Ihrer PUK lediglich Ihren Online-Ausweis entspe governikus::ReaderDeviceWidget - + + online help + Is embedded in a sentence. + Online-Hilfe + + + + No smartphone with enabled remote service found. See %1 for details of use. + Kein Smartphone mit aktiviertem Fernzugriff gefunden. Informationen zur Verwendung befinden sich unter %1. + + + + No connected card reader found. See %1 for installation of card readers. + Es konnte kein verbundenes Kartelesegerät gefunden werden. Informationen zur Installation von Kartenlesegeräten befinden sich unter %1. + + + No card reader detected Kein Kartenlesegerät erkannt - + Select a device to display more information about it Wählen Sie ein Kartenlesegerät aus, um mehr Informationen zu erhalten - + hh:mm:ss AP HH:mm:ss - + The list of card readers was last updated at %1. Die Liste der Kartenlesegeräte wurde zuletzt um %1 aktualisiert. - + Start the pairing mode on the other device if it is not already started. Aktivieren Sie den Kopplungsmodus auf dem anderen Gerät wenn er noch nicht aktiviert sein sollte. - + Pairing Kopplung @@ -3828,37 +4010,47 @@ Bitte beachten Sie, dass Sie mit Ihrer PUK lediglich Ihren Online-Ausweis entspe governikus::RemoteDeviceModel - + Not connected Nicht verbunden - + Paired and available Gekoppelt und verfügbar - - Paired and not available - Gekoppelt aber nicht verfügbar + + Paired, but unsupported + Gekoppelt, aber nicht unterstützt - + + Paired, but unavailable + Gekoppelt, aber nicht verfügbar + + + + Unsupported version + Nicht unterstützte Version + + + Not paired Nicht gekoppelt - + Device Gerät - + Status Status - + dd.MM.YYYY hh:mm AP dd.MM.yyyy HH:mm @@ -3879,17 +4071,17 @@ Bitte beachten Sie, dass Sie mit Ihrer PUK lediglich Ihren Online-Ausweis entspe governikus::RemoteServiceModel - + NFC is not available on your device. NFC ist auf Ihrem Gerät nicht verfügbar. - + Please enable NFC to use the remote service. Bitte aktivieren Sie NFC, um den Fernzugriff zu benutzen. - + Please connect your WiFi to use the remote service. Bitte verbinden Sie sich mit Ihrem WLAN, um den Fernzugriff zu benutzen. @@ -4097,27 +4289,28 @@ Bitte beachten Sie, dass Sie mit Ihrer PUK lediglich Ihren Online-Ausweis entspe governikus::SelfInfoWidget - + Save as PDF... Als PDF speichern... - + save id card data as pdf Daten des Ausweisdokuments als PDF speichern - + AusweisApp2.Information.%1.pdf AusweisApp2.Selbstauskunft.%1.pdf - + Save Speichern - + + PDF Documents PDF-Dokumente @@ -4125,7 +4318,7 @@ Bitte beachten Sie, dass Sie mit Ihrer PUK lediglich Ihren Online-Ausweis entspe governikus::SelfInformationWidget - + Test environment Testumgebung @@ -4133,27 +4326,27 @@ Bitte beachten Sie, dass Sie mit Ihrer PUK lediglich Ihren Online-Ausweis entspe governikus::SettingsWidget - + Apply Übernehmen - + Developer Settings Entwicklereinstellungen - + Apply settings? Einstellungen übernehmen? - + Do you want to apply the changes? Möchten Sie die Änderungen übernehmen? - + OK OK @@ -4161,83 +4354,73 @@ Bitte beachten Sie, dass Sie mit Ihrer PUK lediglich Ihren Online-Ausweis entspe governikus::SetupAssistantWizard - + Welcome to the AusweisApp2 setup assistant. This assistant will guide you through the setup process in %1 steps. The setup assistant can be cancelled at any time and can be started again later from the Help menu. Willkommen zum Einrichtungsassistenten der AusweisApp2. Sie werden in %1 Schritten durch die Einrichtung geführt. Sie können diesen Einrichtungsassistenten jederzeit abbrechen und später über das Hilfe-Menü erneut starten. - + Change PIN PIN ändern - - The Firefox browser extension NoScript was found on your computer. The configuration of this extension may block authentication requests from being passed to %1. Refer to the online help for further details. - Die Firefox-Erweiterung NoScript wurde auf Ihrem System gefunden. Die Konfiguration dieser Erweiterung kann Authentisierungs-Aufrufe für die %1 blockieren. Weitere Informationen erhalten Sie in der Online-Hilfe. - - - + setup assistant Einrichtungsassistent + - Step %1 of %2 Schritt %1 von %2 - + Introduction Einleitung - + History Verlauf - + AusweisApp2 offers saving the course of your authentications in a history. Subsequently you can activate this option. Die AusweisApp2 bietet Ihnen die Möglichkeit, durchgeführte Authentisierungen in einem Verlauf zu speichern. Nachfolgend haben Sie die Möglichkeit, diese Option zu aktivieren. - + save speichern - + save history Verlauf speichern - + Card Readers Kartenlesegeräte - - Firefox extension NoScript - Firefox-Erweiterung NoScript - - - + Almost done! Fast fertig! - + Personal 6 - digit PIN Persönliche 6-stellige PIN - + Prior to the first use of the online identification function you have to replace the transport PIN by an individual 6-digit PIN. The AusweisApp's PIN management offers this function. For replacing the transport PIN you need the letter sent to you by your competent authority. Vor der ersten Nutzung der Online-Ausweisfunktion müssen Sie die Transport-PIN durch eine persönliche 6-stellige PIN ersetzen. Die PIN-Verwaltung der AusweisApp2 bietet Ihnen dazu die Möglichkeit. Für das Ersetzen der Transport-PIN benötigen Sie den PIN-Brief, welcher Ihnen von der für die Ausgabe Ihres Ausweisdokuments zuständigen Behörde zugesandt wurde. - + AusweisApp2 is now ready for use. You can further configure AusweisApp2 via the "Settings" dialog from the navigation section. AusweisApp2 uses the proxy settings configured in your system. This setup assistant can be started at any time from the "Help" menu. The "Finish" button closes the setup assistant. Sie können die AusweisApp2 nun verwenden. Weitere Einstellungen können Sie über die Funktion "Einstellungen" im Navigationsbereich vornehmen. Die AusweisApp2 verwendet die in Ihrem System konfigurierten Proxy-Einstellungen. Sie können diesen Einrichtungsassistenten jederzeit über das Menü "Hilfe" erneut starten. Die Schaltfläche "Abschließen" schließt den Einrichtungsassistenten und öffnet die Dialogseite "Einstellungen". @@ -4304,8 +4487,7 @@ Bitte beachten Sie, dass Sie mit Ihrer PUK lediglich Ihren Online-Ausweis entspe %1 - %2 - - + Only digits (0-9) are permitted. Es sind nur Ziffern (0-9) erlaubt. @@ -4333,8 +4515,8 @@ Bitte beachten Sie, dass Sie mit Ihrer PUK lediglich Ihren Online-Ausweis entspe - + Identify now Jetzt ausweisen @@ -4349,22 +4531,22 @@ Bitte beachten Sie, dass Sie mit Ihrer PUK lediglich Ihren Online-Ausweis entspe OK - + Identify Ausweisen - + Identification successful Ausweisen erfolgreich - + The process was cancelled by the user Der Benutzer hat den Vorgang abgebrochen - + Result Ergebnis @@ -4404,23 +4586,28 @@ Bitte beachten Sie, dass Sie mit Ihrer PUK lediglich Ihren Online-Ausweis entspe Hier können Sie die Datenfelder an/abwählen, die ausgelesen werden sollen. Felder, die Sie nicht abwählen können, sind durch den Diensteanbieter als Pflichtfelder festgelegt worden. Diese Felder sind daher nicht abwählbar. - + Card access number (CAN): Zugangsnummer (CAN): - - - Open on screen password dialog - Öffnen Sie den Bildschirmtastatur-Passwortdialog + + + open on screen keyboard + öffne bildschirmtastatur + + + + please enter your can + bitte geben sie ihre zugangsnummer (can) ein - - More information with TAB - Weitere Informationen mit dem Tabulator + + please enter your pin + bitte geben sie ihre pin ein - + PIN: PIN: @@ -4448,71 +4635,71 @@ Bitte beachten Sie, dass Sie mit Ihrer PUK lediglich Ihren Online-Ausweis entspe Einstellungen - + No card reader detected. Please make sure that a card reader is connected. Es wurde kein Kartenlesegerät erkannt. Bitte stellen Sie sicher, dass ein Kartenlesegerät angeschlossen ist. - - If you would like to set up a local or remote card reader, click on the "Settings" button to cancel the current operation and open the reader settings. - Wenn Sie ein lokales oder entferntes Kartenlesegerät einrichten wollen, klicken Sie auf die Schaltfläche "Einstellungen", um den laufenden Vorgang abzubrechen und die Einstellungen für das Kartenlesegerät zu öffnen. + + If you would like to set up a local or remote card reader, click on the "Settings" button to open the reader settings. + Wenn Sie ein lokales oder entferntes Kartenlesegerät einrichten wollen, klicken Sie auf die Schaltfläche "Einstellungen", um die Einstellungen für das Kartenlesegerät zu öffnen. - + If you need help or have problems with your card reader click on the "Diagnosis" button for further information. Wenn Sie Hilfe benötigen oder Probleme mit Ihrem Kartenlesegerät haben, klicken Sie auf die Schaltfläche "Diagnose" für weitere Informationen. - - + + Extended Length is not supported. Extended Length wird nicht überstützt. - + Your remote reader does not meet the technical requirements (Extended Length not supported). Ihr entferntes Kartenlesegerät erfüllt leider nicht die technischen Voraussetzungen (Extended Length wird nicht unterstützt). - + At least one of your card readers does not meet the technical requirements (Extended Length not supported). Please place the ID card on a different card reader. Mindestens eines Ihrer Kartenlesegeräte erfüllt leider nicht die technischen Voraussetzungen (Extended Length wird nicht unterstützt). Bitte platzieren Sie Ihren Ausweis auf einem anderen Kartenlesegerät. - + + Connected to following remote readers: %1. + Verbunden mit den folgenden entfernten Lesegeräten: %1. + + + Please place an ID card on the card reader. Bitte legen Sie ein Ausweisdokument auf. - + If you have already placed an ID card on your card reader, click on "Diagnosis" for further information. Sollten Sie bereits Ihr Ausweisdokument aufgelegt haben, klicken Sie auf die Schaltfläche "Diagnose" für weitere Informationen. - + Please place only one ID card on the card reader. Bitte legen Sie nur ein Ausweisdokument auf. - + Please make sure that only one card reader with an ID card on it is connected to your computer. If you have already placed an ID card on your card reader, click on "Diagnosis" for further information. Bitte stellen Sie sicher, dass an Ihrem Computer nur ein Kartenlesegerät mit aufliegendem Ausweisdokument angeschlossen ist. Sollten Sie bereits ein Ausweisdokument aufgelegt haben, klicken Sie auf die Schaltfläche "Diagnose" für weitere Informationen. - + Online identification function is disabled. Die Online-Ausweisfunktion ist deaktiviert. - + This action cannot be performed. The online identification function of your ID card is deactivated. Please contact the authority responsible for issuing your identification document to activate the online identification function. Diese Aktion kann leider nicht durchgeführt werden. Die Online-Ausweisfunktion Ihres Ausweisdokuments ist nicht aktiviert. Bitte wenden Sie sich an die Behörde, die Ihr Ausweisdokument ausgegeben hat, um die Online-Ausweisfunktion zu aktivieren. - - - The device %1 was unpaired because it does not react to connection attempts. Retry the pairing process if you want to use this device to authenticate yourself. - Das Gerät %1 wurde entkoppelt, da es nicht auf Verbindungsversuche reagiert hat. Versuchen Sie das Gerät erneut zu koppeln wenn sie es zur Selbstauthentifizierung verwenden möchten. - governikus::StepErrorGui @@ -4522,7 +4709,7 @@ Bitte beachten Sie, dass Sie mit Ihrer PUK lediglich Ihren Online-Ausweis entspe Entschuldigung, das hätte nicht passieren dürfen! Bitte kontaktieren Sie das Support Team. - + Error Fehler @@ -4758,22 +4945,22 @@ Bitte beachten Sie, dass Sie mit Ihrer PUK lediglich Ihren Online-Ausweis entspe governikus::WorkflowAuthenticateQtGui - + Identify Ausweisen - + Cancel Abbrechen - + <b>Do you really want to cancel?</b> <b>Wollen Sie wirklich abbrechen?</b> - + You can as well identity later by calling the service provider's Internet page again. Sie können sich auch später ausweisen, indem Sie erneut auf die Internetseite des Diensteanbieters gehen. @@ -4794,7 +4981,7 @@ Bitte beachten Sie, dass Sie mit Ihrer PUK lediglich Ihren Online-Ausweis entspe governikus::WorkflowSelfInfoQtGui - + Identify Ausweisen @@ -4802,9 +4989,9 @@ Bitte beachten Sie, dass Sie mit Ihrer PUK lediglich Ihren Online-Ausweis entspe main - - Press the back button twice to close the app. - Drücken Sie zweimal die Zurück-Taste, um die Anwendung zu schließen. + + To close the app, quickly press the back button twice. + Um die Anwendung zu schließen, drücken Sie zweimal schnell die Zurück-Taste. diff --git a/resources/travis/setup.sh b/resources/travis/setup.sh index 85676b37c..1da3ecd47 100755 --- a/resources/travis/setup.sh +++ b/resources/travis/setup.sh @@ -5,8 +5,8 @@ set -eu readonly CLONE_DIR="${CLONE_DIR:-$(pwd)}" -MINIROOTFS_VERSION="3.6.2" -MINIROOTFS_SHA="df4bf81fdafdc72b32ad455c23901935fdfe5815993612ba7a2df4bae79d97ca" +MINIROOTFS_VERSION="3.7.0" +MINIROOTFS_SHA="17e8275545aca7a6eaf4e43759a091d33bd9eb9cf11805118773dc940c8b94ac" MINIROOTFS="alpine-minirootfs-${MINIROOTFS_VERSION}-x86_64.tar.gz" MINIROOTFS_URI="http://dl-cdn.alpinelinux.org/alpine/v${MINIROOTFS_VERSION%.*}/releases/x86_64/$MINIROOTFS" diff --git a/resources/updatable-files/supported-providers.json b/resources/updatable-files/supported-providers.json index f904c8859..d6cfaf7f5 100644 --- a/resources/updatable-files/supported-providers.json +++ b/resources/updatable-files/supported-providers.json @@ -98,6 +98,7 @@ ], "provider": [ { + "mobileDesign": false, "shortName": {"" : ":::(bit)kasten"}, "longDescription": {"": "Der :::(bit)kasten ist ein elektronischer Briefkasten, in dem Sie Ihre Post elektronisch von teilnehmenden Unternehmen und Behörden zum Beispiel Rechnungen, Vertragsunterlagen oder Bescheide sicher und rechtsverbindlich empfangen. Ihre Post erhalten Sie wie bisher anhand Ihrer Postanschrift, nur eben digital. Sie müssen keine persönliche Daten an Dritte herausgeben, Ihre Postadresse reicht für den elektronischen Versand an den :::(bit)kasten aus.
Eine Registrierung für den :::(bit)kasten ist nicht zwingend erforderlich. Ob Sie sich ein Konto anlegen möchten, entscheiden Sie selbst. Nach Login mit Ihrer Online-Ausweisfunktion können Sie Ihre Post abrufen und verwalten.
Da Ihre Post nicht mehr als Papierpost verschickt werden muss, sparen Sie Zeit und senken den Papierverbrauch."}, "address": "https://www.bitkasten.de/", @@ -138,6 +139,22 @@ "tcTokenUrlInfo" : "TcToken URL contains dynamic request id but is accepted anyway.", "subjectUrls": ["https://npa.allianz.de"] }, + { + "shortName": {"": "eID-Mahnantrag"}, + "longName": {"": "Anträge im Mahnverfahren"}, + "shortDescription": {"": "Antragstellung im Mahnverfahren nach der ZPO"}, + "longDescription": {"": "Dienst zur Stellung von Anträgen und Abgabe von Erklärungen im Mahnverfahren nach der Zivilprozessordnung vor den bundesdeutschen Mahngerichten."}, + "address": "https://www.online-mahnantrag.de", + "homepage": "https://www.online-mahnantrag.de", + "phone": "", + "email": "poststelle@jum.bwl.de", + "postalAdress": "Ministerium der Justiz und für Europa
Koordinierungsstelle für das Automatisierte Mahnverfahren
Schillerplatz 4
70173 Stuttgart", + "image": "MahnantragJustizministeriumBaWue_image.jpg", + "icon": "MahnantragJustizministeriumBaWue_icon.png", + "category": "citizen", + "tcTokenUrlInfo" : "", + "subjectUrls": [] + }, { "exclude": ["ios"], "shortName": {"" : "Ausweis Auskunft des Bundes"}, @@ -145,7 +162,7 @@ "homepage": "https://www.buergerserviceportal.de/", "phone": "+49 180-1-33 33 33", "email": "eID_buergerservice@bmi.bund.de", - "postalAddress": "Bundesministerium des Innern
Alt-Moabit 101 D
10559 Berlin", + "postalAddress": "Bundesministerium des Innern, für Bau und Heimat
Alt-Moabit 101 D
10559 Berlin", "category": "citizen", "tcTokenUrl" : "https://www.buergerserviceportal.de:443/bund/ausweisapp/bspx_selbstauskunft/SamlAuthnRequestProvider", "subjectUrls": ["https://www.buergerserviceportal.de"] @@ -173,7 +190,7 @@ "shortDescription": {"": "BAföG und AFBG Online-Antragstellung Hessen"}, "longDescription": {"": "Mit Hilfe dieses Angebotes können Antragstellende, Ehegatten / eingetragene Lebenspartner und Eltern die erforderlichen Antragsformblätter online ausfüllen, mit Hilfe der eID rechtswirksam unterschreiben und papierlos dem zuständigen Amt übermitteln."}, "address": "https://www.bafoeg-hessen.de", - "homepage": "http://www.hmwk.hessen.de", + "homepage": "https://wissenschaft.hessen.de/", "phone": "+49 611 32 - 3551", "email": "hebav@hmwk.hessen.de", "postalAddress": "Hessisches Ministerium für Wissenschaft und Kunst
Rheinstraße 23-25
65185 Wiesbaden ", @@ -186,7 +203,7 @@ "exclude": ["ios"], "shortName": {"" : "BAföG Online"}, "address": "https://www.bafoegonline.bva.bund.de/", - "homepage": "http://www.bafoeg.bund.de/", + "homepage": "https://www.bva.bund.de/DE/Themen/Bildung/BAfoeG/bafoeg_node.html", "longDescription": {"": "Mit Ihrer Online-Ausweisfunktion können Sie sich beim Bundesverwaltungsamt für das BAföG-Rückzahlungsverfahren anmelden und sowohl Ihre persönlichen Daten als auch die erforderlichen Nachweise sicher und schnell elektronisch übermitteln. Sie müssen die Nachweise nicht mehr per Post senden.
Die Online-Ausweisfunktion vereinfacht und beschleunigt das BAföG-Rückzahlungsverfahren."}, "phone": "+49 22899358 - 4500", "email": "", @@ -246,8 +263,8 @@ { "exclude": ["ios"], "shortName": {"" : "BAföG Online Mecklenburg-Vorpommern"}, - "address": "http://www.bm.regierung-mv.de/bafoeg", - "homepage": "http://www.regierung-mv.de/", + "address": "https://www.regierung-mv.de/Landesregierung/bm/Wissenschaft/Studium/Studienfinanzierung%20(BafoeG)", + "homepage": "https://www.regierung-mv.de/", "phone": "", "email": "", "postalAddress": "Ministerium für Bildung, Wissenschaft und Kultur Mecklenburg-Vorpommern
Werderstraße 124
19055 Schwerin", @@ -303,7 +320,7 @@ "shortName": {"" : "Beantragung Schwerbehindertenausweis Bayern"}, "longDescription": {"": "Einen Schwerbehindertenantrag können Sie bei der Landesbehörde Zentrum Bayern Familie und Soziales (ZBFS) mit der Online-Ausweisfunktion komplett papierlos stellen.
Der papierlose Antrag ist ein bedeutender Schritt auf dem Weg zur digitalen Verwaltung – online, schnell und unkompliziert.
Das Online-Verfahren hat weitere Vorteile. Gerade für sehbehinderte Menschen ist die papiergebundene Schriftform ein Hindernis. Digitale Angebote bieten ihnen die Chance, Behördenangelegenheiten ein Stück weit selbständiger erledigen zu können.
Zu 100 Prozent digital – ein bisschen weniger lästiger Papierkram. Digitalisierung ist somit ein Beitrag zur Inklusion."}, "address": "https://www.schwerbehindertenantrag.bayern.de", - "homepage": "http://www.zbfs.bayern.de/", + "homepage": "https://www.zbfs.bayern.de/", "phone": "+49 921 605-03", "email": "poststelle@zbfs.bayern.de", "postalAddress": "Zentrum Bayern Familie und Soziales
95440 Bayreuth", @@ -314,7 +331,7 @@ "shortName": {"" : "Beantragung Schwerbehindertenausweis Saarland"}, "longDescription": {"": "Als erstes Bundesland bietet Ihnen das Saarland mit Schweb.NET Online die Möglichkeit, Ihren Erst- und Verschlimmerungsantrag auf Feststellung einer Behinderung nach dem Schwerbehindertenrecht online beim Landesamt für Soziales zu stellen.
Weite Wege werden dadurch vermieden. Bearbeitungszeiten und Arbeitsabläufe werden verkürzt.
Der Antrag ist selbsterklärend und nutzerfreundlich. "}, "address": "https://gatewaylas.saarland.de/FV/Onlineantrag", - "homepage": "http://www.saarland.de/index.htm", + "homepage": "https://www.saarland.de/index.htm", "phone": "+49 681/9978-2181", "email": "", "postalAddress": "Ministerium für Soziales, Gesundheit, Frauen und Familie
Franz-Josef-Röder-Straße 23
66119 Saarbrücken", @@ -341,7 +358,7 @@ "shortName": {"" : "Bundestag ePetition"}, "longDescription": {"": "Mit der Online-Ausweisfunktion des Personalausweises können Sie sich einfach und sicher am Petitionsportal des Deutschen Bundestages
- registrieren,
- eine Petition einreichen sowie
- eine Petition mitzeichnen."}, "address": "https://epetitionen.bundestag.de/epet/anmelden.html", - "homepage": "http://www.bundestag.de/", + "homepage": "https://www.bundestag.de/", "phone": "+49 30 227-35257", "email": "post.pet@bundestag.de", "postalAddress": "Sekretariat des Petitionsausschusses
Platz der Republik 1
11011 Berlin", @@ -354,7 +371,7 @@ "shortName": {"" : "Bürgerantrag Bremen"}, "longDescription": {"": "Mit der Online-Ausweisfunktion können Sie im Bundesland Bremen Bürgeranträge elektronisch mitzeichnen oder Unterschriften für Ihren eigenen Bürgerantrag sammeln. Mit nur 5.000 Mitzeichnerinnen und Mitzeichnern – egal ob online oder auf Papier – können Sie Anträge direkt in den Bremische Bürgerschaft (Landtag) einbringen. Für die Stadtbürgerschaft Bremen genügen sogar 4.000 Unterschriften."}, "address": "https://www.buergerantrag.bremen.de", - "homepage": "http://www.bremische-buergerschaft.de/", + "homepage": "https://www.bremische-buergerschaft.de/", "phone": "", "email": "webmaster@buergerschaft.bremen.de", "postalAddress": "", @@ -366,7 +383,7 @@ "shortName": {"" : "Bürgerdienste der Stadt Münster"}, "longDescription": {"": "Die Stadt Münster bietet auf ihrer Webseite eine Reihe von Online-Diensten an. Dort können Sie mit der Online-Ausweisfunktion unter anderem:
- eine Personenstandsurkunde bestellen,
- Ihr Wunschkennzeichen beantragen,
- geografische Karten bestellen,
- Elektroschrott zur Abholung anmelden,
- eine Erklärung zum Elterneinkommen für die Festsetzung des Elternbeitrags für die Kindertagesbetreuung abgeben,
- eine Sondernutzungserlaubnis für private Baumaßnahmen an öffentlichen Straßen beantragen,
- eine Großanlage mit zentraler Trinkwassererwärmung anzeigen,
- einen Fahrradfund melden,
- ein Reitkennzeichen beantragen,
- Mietspiegel-Broschüren bestellen."}, "address": "https://www.stadt-muenster.de/rathaus/online-dienste.html", - "homepage": "http://www.muenster.de/", + "homepage": "https://www.muenster.de/", "phone": "+49 251/4 92-0", "email": "stadtverwaltung@stadt-muenster.de", "postalAddress": "Stadt Münster
48127 Münster", @@ -378,7 +395,7 @@ "exclude": ["ios"], "shortName": {"" : "Bürgerportal Baden-Württemberg"}, "longDescription": {"": "Das Bürgerportal ,mein service-bw' bietet Bürgerinnen und Bürgern mit dem Personalausweis praktische Anwendungen für die Online-Ausweisfunktion. Das Portal bietet seinen Nutzern unter anderem:
- sicheres Registrieren und Anmelden, um Behördengänge im Internet zu erledigen
- verschlüsselte Ablage persönlicher Daten und Dateien in einem Datenspeicher im Internet, dem sogenannten Dokumentensafe
- orts- und zeitunabhängiger Zugang zu den Daten im Dokumentensafe sowie die Möglichkeit, diese elektronisch an Behörden weiterzuleiten (z. B. für eine Gewerbeanmeldung)."}, - "address": "http://service-bw.de/zfinder-bw-web/welcome.do?showMsbwDetails=1", + "address": "https://service-bw.de/zfinder-bw-web/welcome.do?showMsbwDetails=1", "homepage": "https://www.service-bw.de/", "phone": "", "email": "service-bw@im.bwl.de", @@ -390,8 +407,8 @@ { "shortName": {"" : "Bürgerportal Rheinland Pfalz"}, "longDescription": {"": "Über 80% der Meldebehörden und über 90% der Standesämter in Rheinland-Pfalz bieten Ihnen über das Portal www.rlpdirekt.de Verwaltungsleistungen mit der Online-Ausweisfunktion an, für die Sie nicht mehr zur Behörde gehen müssen, z. B.:
- Kfz abmelden
- Führungszeugnis beantragen,
- Meldebescheinigung beantragen,
- Aufenthaltsbescheinigung beantragen,
- Übermittlungssperre einrichten,
- Auskunft aus dem Gewerbezentralregister beantragen,
- Beurkundung im Personenstandswesen beantragen.
Welche Dienste in Ihrer Kommune mit der Online-Ausweisfunktion genutzt werden können, erfahren Sie, wenn Sie auf dem Portal unter \"Stadt/Ort\" Ihren Wohnort eingeben."}, - "address": "http://www.rlpdirekt.de/rheinland-pfalz", - "homepage": "http://www.rlpdirekt.de/rheinland-pfalz/", + "address": "https://www.rlpdirekt.de/rheinland-pfalz", + "homepage": "https://www.rlpdirekt.de/rheinland-pfalz/", "phone": "+49 6131 / 6277-0", "email": "support@kommwis.de", "postalAddress": "KommWis GmbH
Gesellschaft für Kommunikation und Wissenstransfer mbH
Hindenburgplatz 3
55118 Mainz", @@ -468,7 +485,7 @@ "shortName": {"" : "Bürgerservice-Portal Wiesbaden"}, "longDescription": {"": "In Wiesbaden können Sie mit der Online-Ausweisfunktion über das Bürgerservice-Portal
- Briefwahlunterlagen,
- Meldebestätigungen,
- Aufenthaltsbescheinigungen,
- Übermittlungssperren,
- Führungszeugnisse und
- Auskünfte aus dem Gewerbezentralregister beantragen."}, "address": "https://www.buergerserviceportal.de/hessen/wiesbaden", - "homepage": "http://www.wiesbaden.de/", + "homepage": "https://www.wiesbaden.de/", "phone": "+49 611 / 31 - 8300", "email": "buergeramt@wiesbaden.de", "postalAddress": "Postfach 3920
65029 Wiesbaden", @@ -481,7 +498,7 @@ "shortName": {"" : "Bürgerservice-Portale der bayerischen Kommunen"}, "longDescription": {"": "Das BayernPortal ist das zentrale Verwaltungsportal für den Freistaat Bayern und die bayerischen Kommunen.
Es bietet Ihnen eine einheitliche Anlaufstelle sowie einen einheitlichen Zugang zu den staatlichen und kommunalen Verwaltungsdienstleistungen in Bayern. Sie erreichen darüber mehr als 150 Online-Dienstleistungen, mehr als 2.000 Fachdatenbanken, über 2.500 Formulare und Merkblätter sowie mehr als 20.000 Ansprechpartnerinnen und Ansprechpartner bei Behörden.
Über das BayernPortal können Sie sich zudem ein Servicekonto einrichten, das BayernID genannt wird und mit dem Sie die Verwaltungsdienstleistungen aller angeschlossenen Kommunen und des Freistaats Bayern einfach und sicher nutzen können. Die Einrichtung Ihrer BayernID und die Anmeldung an diesem persönlichen Servicekonto können Sie auch mit der Online-Ausweisfunktion vornehmen.
Ihre in Ihrem Servicekonto gespeicherten Daten werden automatisch in Ihre Anträge übernommen. Dadurch sparen Sie Zeit und erleichtern der Behörde die Bearbeitung Ihres Anliegens.
In Verbindung mit dem Bayerischen E-Government Gesetz bietet Ihnen die BayernID die Möglichkeit, die in vielen Fällen erforderliche Schriftform zu ersetzen und damit Ihre Anträge ohne handschriftliche Unterschrift, d. h. vollständig online abzuwickeln. Sie müssen nicht mehr zur Behörde gehen oder Unterlagen per Post senden."}, "address": "https://www.buergerserviceportal.de/bayern/classic/", - "homepage": "http://www.freistaat.bayern/", + "homepage": "https://www.freistaat.bayern/", "phone": "+49 (0)89 12 22 20", "email": "direkt@bayern.de", "postalAddress": "Postfach 22 00 03
80535 München", @@ -548,7 +565,7 @@ "shortName": {"" : "Deutsche Rentenversicherung"}, "longDescription": {"": "Mit der Online-Ausweisfunktion im neuen Personalausweis können Sie ...
- auf Informationen Ihres Rentenkontos im Kundenbereich ,eService' sicher zugreifen (z. B. Versicherungsverlauf und Beitragsrechnung),
- Ihre Rentenauskunft online abrufen,
- schnell und einfach Ihre persönlichen Daten ändern (z. B. Ihre Adresse und Bankverbindung)."}, "address": "https://www.eservice-drv.de/OnlineDiensteWeb/init.do?npa=true", - "homepage": "http://www.deutsche-rentenversicherung.de/", + "homepage": "https://www.deutsche-rentenversicherung.de/", "phone": "+49 800 100 048070", "email": "Online-Dienste@deutsche-rentenversicherung.de", "postalAddress": "Ruhrstraße 2
10709 Berlin", @@ -561,7 +578,7 @@ "shortName": {"" : "eAntrag der Investitionsbank Berlin (IBB)"}, "longDescription": {"": "Im Kundenportal der Investitionsbank Berlin können Sie verschiedene Förder-Produkte durchgängig elektronisch beantragen:
- Berlin Kapital
- IBB Familienbaudarlehen
- IBB Wohnraum modernisieren
- KMU-Fonds über 25.000 Euro
- Liquiditätshilfen BERLIN
- Mikrokredit aus dem KMU-Fonds
- Pro FIT (Projektvorschlagsphase)
- Pro FIT (Frühphasenfinanzierung)
Für die rechtsverbindliche, fristwahrende Antragstellung der Produkte
- GRW
- Innovationsassistent
- PFI - Gemeinschaft
- PFI - KMU
- PFI - Netzwerk
- ProFIT (Projektantragsphase)
gilt aus verwaltungsrechtlichen Anforderungen das Schriftformerfordernis: Die elektronische Antragstellung ist zwingend nachträglich schriftlich zu bestätigen.
Mit der Online-Ausweisfunktion können Sie sich bequem und sicher elektronisch legitimieren und müssen dadurch Ihre Identität weder per Postident-Verfahren noch persönlich vor Ort nachweisen.
Nach Ihrer Legitimierung können Sie über eine persönliche Dokumentenablage die rechtsverbindliche Kommunikation mit Ihrem IBB-Ansprechpartner online – und unabhängig von Öffnungszeiten oder Postwegen – über das Kundenportal erledigen."}, "address": "https://www.ibb.de/de/service/eantrag/eantrag.html", - "homepage": "http://www.ibb.de/", + "homepage": "https://www.ibb.de/", "phone": "+49 30 / 2125 - 0", "email": "info@ibb.de", "postalAddress": "Investitionsbank Berlin (IBB)
Bundesallee 210
10719 Berlin", @@ -572,8 +589,8 @@ { "exclude": ["ios"], "shortName": {"" : "easy Login - Der Zugang für Finanz- & Versicherungsvermittler"}, - "address": "http://www.easy-login.de", - "homepage": "http://www.easy-login.de", + "address": "https://www.easy-login.de", + "homepage": "https://www.easy-login.de", "phone": "+49 921 75758-555", "email": "info@easy-login.de", "postalAddress": "easy Login GmbH
Bindlacher Str. 4
95448 Bayreuth", @@ -598,21 +615,10 @@ "tcTokenUrlInfo" : "Registration required.", "subjectUrls": [] }, - { - "exclude": ["ios"], - "shortName": {"" : "ERGO Direkt Lebensversicherung AG"}, - "address": "https://ergodirekt.de/de/persoenlicherbereich.html#login", - "homepage": "https://ergodirekt.de", - "phone": "+49 800 / 444 1000", - "email": "beratung@ergodirekt.de", - "postalAddress": "Karl-Martell-Straße 60
90344 Nürnberg", - "category": "insurance", - "subjectUrls": ["https://ergodirekt.de"] - }, { "shortName": {"" : "Feinstaubplakette beantragen"}, "longDescription": {"": "In Berlin können Sie eine Feinstaubplakette für alle Kraftfahrzeuge mit der Online-Ausweisfunktion beantragen. Der Antrag ist unabhängig davon, ob Ihr Fahrzeug in Berlin, bei einer anderen deutschen Zulassungsbehörde, oder im Ausland zugelassen ist.
Ihre persönlichen Daten werden verschlüsselt übertragen. Sie müssen Ihre Angaben nicht per Hand eingeben und die Behörde erhält zuverlässig korrekte Informationen, die rasch weiterverarbeitet werden können.
Auf der Internet-Seite Umweltzonen und Feinstaubplaketten der Senatsverwaltung für Stadtentwicklung und Umwelt können Sie sich vorab informieren, welche Plakette Ihrem Fahrzeug zugeteilt werden kann."}, - "address": "http://www.berlin.de/labo/fahrzeuge/kfz-zulassung/feinstaubplakette/shop.85047.php", + "address": "https://www.berlin.de/labo/fahrzeuge/kfz-zulassung/feinstaubplakette/shop.85047.php", "homepage": "https://www.berlin.de", "phone": "+49 30 90269 – 0", "email": "", @@ -651,7 +657,7 @@ "shortName": {"" : "Hamburg Service Online-Bürgerdienste"}, "longDescription": {"": "Über das Portal ,HamburgService' finden Sie auf einen Blick alle Online-Dienste der Freien und Hansestadt Hamburg. Für die Dienste, die mit sensiblen Daten arbeiten (Dienste der Sicherheitsstufe 2), müssen Sie sich nach der Registrierung einmalig identifizieren. Sie können dazu die Online-Ausweisfunktion Ihres Personalausweises nutzen. Eine persönliche Identifizierung in einem Kundenzentrum der Stadt Hamburg ist dann nicht mehr nötig."}, "address": "https://gateway.hamburg.de/HamburgGateway/FVP/Application/Index.aspx", - "homepage": "http://www.hamburg.de/", + "homepage": "https://www.hamburg.de/", "phone": "", "email": "dataporthamburggateway-service@dataport.de", "postalAddress": "Bürgermeister Olaf Scholz
Rathausmarkt 1
20095 Hamburg", @@ -677,7 +683,7 @@ "shortName": {"" : "ID-Safe des Landkreis Kitzingen"}, "longDescription": {"": "Die Stadt Kitzingen bietet bei verschiedenen Bürgerdiensten die Nutzung der Online-Ausweisfunktion in Verbindung mit elektronischen Antragsformularen an:
- Gewerbeanmeldung
- Gewerbeummeldung
- Gewerbeabmeldung
- Fischereischein
- Verkehrsrechtliche Anordnung
- Sondernutzung
- Parkerleichterung
- Mängelmeldung"}, "address": "https://www.buergerservice.org/ID-Safe-Kitzingen", - "homepage": "http://www.kitzingen.de/", + "homepage": "https://www.kitzingen.de/", "phone": "+49 9321 / 928-0,", "email": "info@kitzingen.de", "postalAddress": "Landratsamt Kitzingen
Herr Thomas Langhojer
Kaiserstraße 4
97318 Kitzingen", @@ -702,7 +708,7 @@ "exclude": ["ios"], "shortName": {"" : "ID-Safe des Landkreis Würzburg"}, "address": "https://www.buergerservice.org/ID-Safe-Wuerzburg", - "homepage": "http://www.landkreis-wuerzburg.de/startseite.phtml", + "homepage": "https://www.landkreis-wuerzburg.de/startseite.phtml", "phone": "+49 931 8003-0 ", "email": "poststelle@lra-wue.bayern.de", "postalAddress": "Landratsamt Würzburg
Zeppelinstraße 15
97074 Würzburg", @@ -715,7 +721,7 @@ "shortName": {"" : "Kraftfahrt-Bundesamt - Registerauskunft"}, "longDescription": {"": "Mit der Online-Ausweisfunktion können Sie beim Kraftfahrt-Bundesamt einfach und schnell eine Auskunft über Ihren Punktestand und die zu Ihrer Person gespeicherten Eintragungen im Fahreignungsregister (FAER) beantragen. Die erforderlichen Daten werden dann von Ihrem Personalausweis ausgelesen. Die Auskunft erhalten Sie innerhalb weniger Tage per Post."}, "address": "https://www.kba-online.de/registerauskunft/app/registeranfrage.html", - "homepage": "http://www.kba.de/", + "homepage": "https://www.kba.de/", "phone": "+49 461 316-0", "email": "poststelle@kba.de", "postalAddress": "Kraftfahrt-Bundesamt
Fördestraße 16
24944 Flensburg", @@ -757,8 +763,8 @@ "exclude": ["ios"], "shortName": {"" : "LVM Versicherung - Kundenportal Meine LVM"}, "longDescription": {"": "Mit der Online-Ausweisfunktion im Personalausweis können Sie sich nach der Registrierung durch Ihre LVM-Agentur sicher am Kundenportal ,Meine LVM' anmelden. Ihre Versicherung können Sie nun selbst verwalten und beispielsweise sämtliche Vertragsdaten online einsehen. Darüber hinaus ist es möglich über das Portal Versicherungsbescheinigungen anzufordern sowie schnell und einfach Ihre persönlichen Daten wie Adresse oder Bankverbindung zu ändern."}, - "address": "http://www.lvm.de/personalausweis", - "homepage": "http://www.lvm.de/", + "address": "https://www.lvm.de/personalausweis", + "homepage": "https://www.lvm.de/", "phone": "+49 251 702-0", "email": "info@lvm.de", "postalAddress": "LVM Versicherung
48126 Münster", @@ -778,18 +784,6 @@ "tcTokenUrlInfo" : "TcToken URL requires valid dynamic request id.", "subjectUrls": ["https://www.fp-demail.de"] }, - { - "shortName": {"" : "OpenPGP-eID"}, - "longDescription": {"": "Durch die Verschlüsselung Ihrer Nachrichten mittels OpenPGP ist die Vertraulichkeit Ihrer Information gewährleistet. Aber kann ein Empfänger der Nachricht sicher sein, dass der Absender der ist, der er vorgibt zu sein? Die Antwortet lautet: Nein. Abhilfe schafft die Beglaubigung Ihres OpenPGP-Schlüssels durch eine Signatur. Sie benötigen hierfür einen Personalausweis bzw. elektronischen Aufenthaltstitel mit aktivierter Online-Ausweisfunktion. Diesen Dienst stellen wir im Auftrag des Bundesamtes für Sicherheit in der Informationstechnik (BSI) zur Verfügung."}, - "address": "https://pgp.governikus-eid.de/pgp/", - "homepage": "https://www.governikus.de/", - "phone": "+49 421 204 95-0", - "email": "kontakt@governikus.com", - "postalAddress": "Governikus GmbH & Co. KG
Am Fallturm 9
28359 Bremen", - "category": "other", - "tcTokenUrl" : "https://pgp.governikus-eid.de/pgp/EIDRequest", - "subjectUrls": ["https://pgp.governikus-eid.de"] - }, { "exclude": ["ios", "android"], "shortName": {"" : "Schufa – Auskunftsportal „Meine SCHUFA“"}, @@ -810,7 +804,7 @@ "homepage": "https://www.ausweisapp.bund.de/", "phone": "+49 1805 - 348743", "email": "support@ausweisapp.de", - "postalAddress": "Governikus GmbH & Co. KG
- im Auftrag des Bundesministeriums des Innern -
Am Fallturm 9
D-28359 Bremen", + "postalAddress": "Governikus GmbH & Co. KG
- im Auftrag des Bundesministeriums des Innern, für Bau und Heimat -
Am Fallturm 9
D-28359 Bremen", "image": "Selbstauskunft.jpg", "icon": "npa.svg", "category": "citizen", @@ -824,7 +818,7 @@ "shortDescription": {"": "Das Service-Portal bietet Online-Dienste rund um die KFZ-Zulassung."}, "longDescription": {"": "Im Service-Portal \"Auto\" können Sie Ihr Auto online abmelden. Weitere Angebote wie die komplette online KFZ-Wiederzulassung und -Zulassung sind im Aufbau."}, "address": "https://www.buergerserviceportal.nrw/krz/lkrlippe", - "homepage": "http://www.kreis-lippe.de/", + "homepage": "https://www.kreis-lippe.de/", "phone": "+49 5231/62-0", "email": "stva@kreis-lippe.de", "postalAddress": "Kreis Lippe
Felix-Fechenbach-Straße 5
32756 Detmold", @@ -850,8 +844,8 @@ { "shortName": {"" : "Stadt Nürnberg: Online-Bürgerdienste Service"}, "longDescription": {"": "Die Stadt Nürnberg bietet Ihnen mit ihrem Bürgerserviceportal ,Mein.Nürnberg' erstmals die Möglichkeit, Ihre Verwaltungsangelegenheiten komplett elektronisch abzuwickeln – von der Antragstellung bis zur Rückmeldung der Bescheide oder Schriftstücke in Ihren persönlichen Bereich auf dem Portal. Alle Online-Dienste der Stadt Nürnberg wurden zudem für die Nutzung mit mobilen Endgeräten optimiert.
Bei immer mehr Verfahren akzeptiert die Stadtverwaltung einen Unterschriftersatz durch die Online-Ausweisfunktion.
Jeder Online-Dienst der Stadt Nürnberg, der die Online-Ausweisfunktion nutzt, ist an dem Hinweis \"mit eID\" erkennbar. Derzeit sind dies z. B.:
- Aufenthaltstitel beantragen
- Gaststättenrechtliche Erlaubnis für den Ausschank von Alkohol beantragen
- Hunde – Negativzeugnis für Kampfhunde beantragen
- Kfz-Halterauskunft beantragen
- Melderegister – Widerspruch gegen Datenübermittlung
- Veranstaltung, Messe, Markt beantragen"}, - "address": "http://www.nuernberg.de/internet/onlinedienste", - "homepage": "http://www.nuernberg.de/", + "address": "https://www.nuernberg.de/internet/onlinedienste", + "homepage": "https://www.nuernberg.de/", "phone": "+49 9 11 / 2 31-8613", "email": "poststelle@stadt.nuernberg.de", "postalAddress": "Amt für Organisation, Informationsverarbeitung und Zentrale Dienste
E-Government-Büro
Rathausplatz 2
III. OG
90403 Nürnberg", @@ -913,8 +907,8 @@ "exclude": ["ios"], "shortName": {"" : "Urkundenservice Köln"}, "longDescription": {"": "Bei der Stadt Köln können Sie mit der Online-Ausweisfunktion folgende Urkunden beantragen:
- Geburtsurkunden
- Eheurkunden
- Lebenspartnerschaftsurkunden
- Sterbeurkunden
Dabei werden die Adressatenangaben in den Online-Formularen automatisch befüllt."}, - "address": "http://www.stadt-koeln.de/service/produkt/urkundenservice-des-standesamtes", - "homepage": "http://www.stadt-koeln.de/", + "address": "https://www.stadt-koeln.de/service/produkt/urkundenservice-des-standesamtes", + "homepage": "https://www.stadt-koeln.de/", "phone": "+49 221 / 221-26530", "email": "standesamt@stadt-koeln.de", "postalAddress": "Gülichplatz 1-3
50667 Köln", diff --git a/resources/updatable-files/supported-readers.json b/resources/updatable-files/supported-readers.json index f38fe84ec..97fc4210c 100644 --- a/resources/updatable-files/supported-readers.json +++ b/resources/updatable-files/supported-readers.json @@ -14,6 +14,14 @@ "Platforms": [{"os": "win"}, {"os": "mac"}, {"os": "unknown"}], "URL": "https://play.google.com/store/apps/details?id=com.governikus.ausweisapp2" } + ], + "Information": + [ + { + "Platforms": [{"os": "win"}, {"os": "mac"}, {"os": "unknown"}], + "DE": "Erfordert ein Android-Gerät mit aktiviertem Fernzugriff.", + "EN": "Requires an Android device with enabled remote access." + } ] }, @@ -38,6 +46,14 @@ "Platforms": [{"os": "unknown"}], "URL": "https://www.reiner-sct.com/support/support-anfrage/?os=Linux&productGroup=77304735&product=77304822&q=driver#choice5" } + ], + "Information": + [ + { + "Platforms": [{"os": "win"}, {"os": "mac"}, {"os": "unknown"}], + "DE": "Es ist notwendig die Treiber vom Hersteller zu installieren.", + "EN": "It is necessary to install the drivers from the manufacturer." + } ] }, @@ -62,6 +78,14 @@ "Platforms": [{"os": "unknown"}], "URL": "https://www.reiner-sct.com/support/support-anfrage/?os=Linux&productGroup=77304735&product=77304820&q=driver#choice5" } + ], + "Information": + [ + { + "Platforms": [{"os": "win"}, {"os": "mac"}, {"os": "unknown"}], + "DE": "Es ist notwendig die Treiber vom Hersteller zu installieren.", + "EN": "It is necessary to install the drivers from the manufacturer." + } ] }, @@ -178,6 +202,14 @@ "Platforms": [{"os": "unknown"}], "URL": "https://support.identiv.com/scl010-scl011/" } + ], + "Information": + [ + { + "Platforms": [{"os": "win", "min": "6.1", "max": "6.1"}], + "DE": "Weder der Windows Driver noch der Installer werden dem Kartenlesegerät zugeordnet. Erst eine manuelle Installation über den Gerätemanager, bei der der Hinweis ignoriert wird, dass es sich um den falschen Treiber handelt, führt zu einem Erfolg.", + "EN": "Neither the Windows driver nor the installer are assigned to the card reader. Only a manual installation via the device manager, ignoring the note that it is the wrong driver, leads to a success." + } ] }, @@ -357,6 +389,26 @@ ] }, + { + "VendorId": "0x076B", + "ProductId": "0x5321", + "Name": "OMNIKEY 5321 v2", + "Pattern": "OMNIKEY CardMan 5x21-CL|OMNIKEY CardMan \\(076B:5321\\) 5321", + "Icon": "img_HID_Global_OMNIKEY_5321_V2.png", + "IconWithNPA": "img_HID_Global_OMNIKEY_5321_V2_mit_ausweis.png", + "Drivers": + [ + { + "Platforms": [{"os": "win"}], + "URL": "https://www.hidglobal.de/Download-EULA?headless=®ionfree=&nid=29765" + }, + { + "Platforms": [{"os": "mac", "min": "10.11", "max": "10.11"}], + "URL": "https://www.hidglobal.de/drivers" + } + ] + }, + { "VendorId": "0x076B", "ProductId": "0x5421", @@ -401,7 +453,7 @@ "VendorId": "0x08E6", "ProductId": "0x5504", "Name": "Gemalto Prox-SU Contactless", - "Pattern": "Gemalto Prox( |-)SU", + "Pattern": "Gemalto Prox( |-)SU($| USB| Contactless_)", "Icon": "img_Gemalto_Prox_SU.png", "IconWithNPA": "img_Gemalto_Prox_SU_mit_ausweis.png", "Drivers": @@ -451,13 +503,31 @@ "URL": "http://www.cherry.de/cid/download.php" }, { - "Platforms": [{"os": "mac", "min": "10.11", "max": "10.11"}, {"os": "mac", "min": "10.13", "max": "10.13"}], + "Platforms": [{"os": "mac", "min": "10.11"}], "URL": "http://www.cherry.de/cid/download.php" }, { "Platforms": [{"os": "unknown"}], "URL": "http://www.cherry.de/cid/download.php" } + ], + "Information": + [ + { + "Platforms": [{"os": "win"}], + "DE": "Es ist notwendig, die Treiber vom Hersteller zu installieren.", + "EN": "It is necessary to install the drivers from the manufacturer." + }, + { + "Platforms": [{"os": "mac", "max": "10.10"}], + "DE": "Der Treiber vom Hersteller wird nicht unterstützt. Für die Funktion des Kartenlesegeräts muss der Treiber von macOS 10.12 installiert werden.", + "EN": "The driver from the manufacturer is not supported. For the function of the card reader the driver for macOS 10.12 must be installed." + }, + { + "Platforms": [{"os": "mac", "min": "10.11"}], + "DE": "Nach der Installation ist ein Neustart erforderlich.", + "EN": "A reboot is required after the installation of the driver." + } ] }, @@ -475,13 +545,31 @@ "URL": "http://www.cherry.de/cid/download.php" }, { - "Platforms": [{"os": "mac", "min": "10.11", "max": "10.11"}, {"os": "mac", "min": "10.13", "max": "10.13"}], + "Platforms": [{"os": "mac", "min": "10.11"}], "URL": "http://www.cherry.de/cid/download.php" }, { "Platforms": [{"os": "unknown"}], "URL": "http://www.cherry.de/cid/download.php" } + ], + "Information": + [ + { + "Platforms": [{"os": "win"}], + "DE": "Es ist notwendig, die Treiber vom Hersteller zu installieren.", + "EN": "It is necessary to install the drivers from the manufacturer." + }, + { + "Platforms": [{"os": "mac", "max": "10.10"}], + "DE": "Der Treiber vom Hersteller wird nicht unterstützt. Für die Funktion des Kartenlesegeräts muss der Treiber von macOS 10.12 installiert werden.", + "EN": "The driver from the manufacturer is not supported. For the function of the card reader the driver for macOS 10.12 must be installed." + }, + { + "Platforms": [{"os": "mac", "min": "10.11"}], + "DE": "Nach der Installation ist ein Neustart erforderlich.", + "EN": "A reboot is required after the installation of the driver." + } ] } ] diff --git a/src/CommandLineParser.cpp b/src/CommandLineParser.cpp index ea2de8744..e91104870 100644 --- a/src/CommandLineParser.cpp +++ b/src/CommandLineParser.cpp @@ -1,5 +1,5 @@ /* - * \copyright Copyright (c) 2014-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2014-2018 Governikus GmbH & Co. KG, Germany */ #include "CommandLineParser.h" diff --git a/src/CommandLineParser.h b/src/CommandLineParser.h index 70d2420f7..4a8d65efd 100644 --- a/src/CommandLineParser.h +++ b/src/CommandLineParser.h @@ -1,7 +1,7 @@ /* * \brief Provides and parses command line options. * - * \copyright Copyright (c) 2014-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2014-2018 Governikus GmbH & Co. KG, Germany */ #pragma once diff --git a/src/activation/base/ActivationContext.cpp b/src/activation/base/ActivationContext.cpp index 97ddcb288..fdd3587ac 100644 --- a/src/activation/base/ActivationContext.cpp +++ b/src/activation/base/ActivationContext.cpp @@ -1,5 +1,5 @@ /*! - * \copyright Copyright (c) 2016-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2016-2018 Governikus GmbH & Co. KG, Germany */ #include "ActivationContext.h" diff --git a/src/activation/base/ActivationContext.h b/src/activation/base/ActivationContext.h index 840cd8f80..88dbb0a65 100644 --- a/src/activation/base/ActivationContext.h +++ b/src/activation/base/ActivationContext.h @@ -1,5 +1,5 @@ /*! - * \copyright Copyright (c) 2016-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2016-2018 Governikus GmbH & Co. KG, Germany */ #pragma once diff --git a/src/activation/base/ActivationHandler.cpp b/src/activation/base/ActivationHandler.cpp index c27db2551..22f433e43 100644 --- a/src/activation/base/ActivationHandler.cpp +++ b/src/activation/base/ActivationHandler.cpp @@ -1,5 +1,5 @@ /*! - * \copyright Copyright (c) 2014-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2014-2018 Governikus GmbH & Co. KG, Germany */ #include "ActivationHandler.h" diff --git a/src/activation/base/ActivationHandler.h b/src/activation/base/ActivationHandler.h index 4d6f53777..a5798bceb 100644 --- a/src/activation/base/ActivationHandler.h +++ b/src/activation/base/ActivationHandler.h @@ -1,5 +1,5 @@ /*! - * \copyright Copyright (c) 2014-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2014-2018 Governikus GmbH & Co. KG, Germany */ #pragma once diff --git a/src/activation/customscheme/CustomSchemeActivationContext.cpp b/src/activation/customscheme/CustomSchemeActivationContext.cpp index db3ea5b36..1923bf60b 100644 --- a/src/activation/customscheme/CustomSchemeActivationContext.cpp +++ b/src/activation/customscheme/CustomSchemeActivationContext.cpp @@ -1,5 +1,5 @@ /*! - * \copyright Copyright (c) 2014-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2014-2018 Governikus GmbH & Co. KG, Germany */ #include "CustomSchemeActivationContext.h" diff --git a/src/activation/customscheme/CustomSchemeActivationContext.h b/src/activation/customscheme/CustomSchemeActivationContext.h index eb3ff007b..fa98f1f30 100644 --- a/src/activation/customscheme/CustomSchemeActivationContext.h +++ b/src/activation/customscheme/CustomSchemeActivationContext.h @@ -1,5 +1,5 @@ /*! - * \copyright Copyright (c) 2014-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2014-2018 Governikus GmbH & Co. KG, Germany */ #pragma once diff --git a/src/activation/customscheme/CustomSchemeActivationHandler.cpp b/src/activation/customscheme/CustomSchemeActivationHandler.cpp index 8e4a80338..15cb55677 100644 --- a/src/activation/customscheme/CustomSchemeActivationHandler.cpp +++ b/src/activation/customscheme/CustomSchemeActivationHandler.cpp @@ -1,5 +1,5 @@ /*! - * \copyright Copyright (c) 2014-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2014-2018 Governikus GmbH & Co. KG, Germany */ #include "CustomSchemeActivationHandler.h" diff --git a/src/activation/customscheme/CustomSchemeActivationHandler.h b/src/activation/customscheme/CustomSchemeActivationHandler.h index 10e35dd31..8a84f54fb 100644 --- a/src/activation/customscheme/CustomSchemeActivationHandler.h +++ b/src/activation/customscheme/CustomSchemeActivationHandler.h @@ -1,5 +1,5 @@ /*! - * \copyright Copyright (c) 2014-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2014-2018 Governikus GmbH & Co. KG, Germany */ #pragma once diff --git a/src/activation/intent/AusweisApp2Service.java b/src/activation/intent/AusweisApp2Service.java index 7c0f89037..af681f02a 100644 --- a/src/activation/intent/AusweisApp2Service.java +++ b/src/activation/intent/AusweisApp2Service.java @@ -1,28 +1,21 @@ /* - * \copyright Copyright (c) 2016-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2016-2018 Governikus GmbH & Co. KG, Germany */ package com.governikus.ausweisapp2; +import org.qtproject.qt5.android.bindings.QtService; + import android.content.Intent; -import android.nfc.Tag; -import android.os.BadParcelableException; -import android.os.Binder; import android.os.IBinder; -import android.os.Parcel; -import android.os.RemoteException; import android.util.Log; -import java.util.HashMap; -import java.util.Map; - -import org.qtproject.qt5.android.bindings.QtService; public class AusweisApp2Service extends QtService { - public final static String LOG_TAG = "AusweisApp2"; - private final AidlBinder mBinder = new AidlBinder(this); + public static final String LOG_TAG = "AusweisApp2"; + private final AidlBinder mBinder = new AidlBinder(); public AidlBinder getAidlBinder() { @@ -71,7 +64,7 @@ public void onDestroy() // "WARNING: QApplication was not created in the main() thread." and a crash on // first rebind. // This workaround is inspired by https://bugreports.qt.io/browse/QTBUG-54012 . - System.exit(0); + System.exit(0); // NOPMD see comment above } diff --git a/src/activation/intent/IntentActivationContext.cpp b/src/activation/intent/IntentActivationContext.cpp index 2d763259f..5e80d32fa 100644 --- a/src/activation/intent/IntentActivationContext.cpp +++ b/src/activation/intent/IntentActivationContext.cpp @@ -1,5 +1,5 @@ /*! - * \copyright Copyright (c) 2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2017-2018 Governikus GmbH & Co. KG, Germany */ #include "IntentActivationContext.h" diff --git a/src/activation/intent/IntentActivationContext.h b/src/activation/intent/IntentActivationContext.h index a5c410890..a63f5e2a6 100644 --- a/src/activation/intent/IntentActivationContext.h +++ b/src/activation/intent/IntentActivationContext.h @@ -2,7 +2,7 @@ * \brief Implementation of ActivationContext for Intent * based activation on Android systems. * - * \copyright Copyright (c) 2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2017-2018 Governikus GmbH & Co. KG, Germany */ #pragma once diff --git a/src/activation/intent/IntentActivationHandler.cpp b/src/activation/intent/IntentActivationHandler.cpp index b63feb892..ddbffa009 100644 --- a/src/activation/intent/IntentActivationHandler.cpp +++ b/src/activation/intent/IntentActivationHandler.cpp @@ -1,5 +1,5 @@ /*! - * \copyright Copyright (c) 2015-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2015-2018 Governikus GmbH & Co. KG, Germany */ #include "IntentActivationHandler.h" @@ -52,10 +52,10 @@ void IntentActivationHandler::onIntent(const QUrl& pUrl) bool IntentActivationHandler::start() { #ifdef Q_OS_ANDROID - const QString& initialIntent = QAndroidJniObject::callStaticObjectMethod("com/governikus/ausweisapp2/MainActivity", "getInitialIntent").toString(); - if (!initialIntent.isNull()) + const QString& intent = QAndroidJniObject::callStaticObjectMethod("com/governikus/ausweisapp2/MainActivity", "getStoredIntent").toString(); + if (!intent.isNull()) { - onIntent(initialIntent); + onIntent(intent); } return true; diff --git a/src/activation/intent/IntentActivationHandler.h b/src/activation/intent/IntentActivationHandler.h index 9d38f4fef..c5160f3e6 100644 --- a/src/activation/intent/IntentActivationHandler.h +++ b/src/activation/intent/IntentActivationHandler.h @@ -1,5 +1,5 @@ /*! - * \copyright Copyright (c) 2015-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2015-2018 Governikus GmbH & Co. KG, Germany */ #pragma once diff --git a/src/activation/intent/MainActivity.java b/src/activation/intent/MainActivity.java index 5f629b43d..aea91b80d 100644 --- a/src/activation/intent/MainActivity.java +++ b/src/activation/intent/MainActivity.java @@ -1,9 +1,11 @@ /* - * \copyright Copyright (c) 2014-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2014-2018 Governikus GmbH & Co. KG, Germany */ package com.governikus.ausweisapp2; +import org.qtproject.qt5.android.bindings.QtActivity; + import android.app.Activity; import android.app.PendingIntent; import android.content.Context; @@ -13,30 +15,25 @@ import android.content.res.Configuration; import android.nfc.NfcAdapter; import android.nfc.tech.IsoDep; -import android.nfc.Tag; import android.os.Bundle; import android.util.Log; -import android.view.Window; import android.view.WindowManager; -import android.view.WindowManager.LayoutParams; - -import org.qtproject.qt5.android.bindings.QtActivity; public class MainActivity extends QtActivity { - private static final String TAG = "AusweisApp2"; + private static final String LOG_TAG = AusweisApp2Service.LOG_TAG; - private static Intent INITIAL_INTENT = null; + private static Intent cIntent; private NfcForegroundDispatcher mNfcForegroundDispatcher; - private class NfcForegroundDispatcher + private static class NfcForegroundDispatcher { - private Activity mActivity; - private NfcAdapter mAdapter; - private PendingIntent mPendingIntent; - private IntentFilter[] mFilters; - private String[][] mTechLists; + private final Activity mActivity; + private final NfcAdapter mAdapter; + private final PendingIntent mPendingIntent; + private final IntentFilter[] mFilters; + private final String[][] mTechLists; NfcForegroundDispatcher(Activity pActivity) { @@ -78,26 +75,24 @@ void disable() // required by IntentActivationHandler -> MainActivityAccessor - public static String getInitialIntent() + public static String getStoredIntent() { - if (INITIAL_INTENT != null) + if (cIntent == null) { - return INITIAL_INTENT.getDataString(); - } - else - { - Log.e(TAG, "No initial intent available, returning null"); + Log.e(LOG_TAG, "No stored intent available, returning null"); return null; } + + return cIntent.getDataString(); } @Override public void onCreate(Bundle savedInstanceState) { - Log.d(TAG, "onCreate (initial invocation of application): " + getIntent()); + Log.d(LOG_TAG, "onCreate (initial invocation of application): " + getIntent()); super.onCreate(savedInstanceState); - INITIAL_INTENT = getIntent(); + cIntent = getIntent(); // register the broadcast receiver after loading the C++ library in super.onCreate() AndroidBluetoothReceiver.register(this); @@ -111,7 +106,7 @@ public void onCreate(Bundle savedInstanceState) @Override protected void onNewIntent(Intent newIntent) { - Log.d(TAG, "onNewIntent (subsequent invocation of application): " + newIntent); + Log.d(LOG_TAG, "onNewIntent (subsequent invocation of application): " + newIntent); super.onNewIntent(newIntent); triggerActivation(newIntent.getDataString()); @@ -137,7 +132,7 @@ public void onPause() @Override protected void onDestroy() { - Log.d(TAG, "onDestroy"); + Log.d(LOG_TAG, "onDestroy"); // unregister the broadcast receiver before unloading the C++ library in super.onDestroy() AndroidBluetoothReceiver.unregister(this); @@ -148,7 +143,7 @@ protected void onDestroy() public void keepScreenOn(boolean pActivate) { - Log.d(TAG, "Keep screen on: " + pActivate); + Log.d(LOG_TAG, "Keep screen on: " + pActivate); if (pActivate) { getWindow().addFlags(WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON); @@ -165,8 +160,8 @@ public boolean isTablet() { final Context context = getBaseContext(); final int screenLayout = context.getResources().getConfiguration().screenLayout; - final boolean xlarge = ((screenLayout & Configuration.SCREENLAYOUT_SIZE_MASK) == Configuration.SCREENLAYOUT_SIZE_XLARGE); - final boolean large = ((screenLayout & Configuration.SCREENLAYOUT_SIZE_MASK) == Configuration.SCREENLAYOUT_SIZE_LARGE); + final boolean xlarge = (screenLayout & Configuration.SCREENLAYOUT_SIZE_MASK) == Configuration.SCREENLAYOUT_SIZE_XLARGE; + final boolean large = (screenLayout & Configuration.SCREENLAYOUT_SIZE_MASK) == Configuration.SCREENLAYOUT_SIZE_LARGE; return xlarge || large; } diff --git a/src/activation/internal/InternalActivationContext.cpp b/src/activation/internal/InternalActivationContext.cpp index 7afbd0518..b51b43f15 100644 --- a/src/activation/internal/InternalActivationContext.cpp +++ b/src/activation/internal/InternalActivationContext.cpp @@ -1,5 +1,5 @@ /*! - * \copyright Copyright (c) 2016-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2016-2018 Governikus GmbH & Co. KG, Germany */ #include "InternalActivationContext.h" diff --git a/src/activation/internal/InternalActivationContext.h b/src/activation/internal/InternalActivationContext.h index f8c386415..210ad70ea 100644 --- a/src/activation/internal/InternalActivationContext.h +++ b/src/activation/internal/InternalActivationContext.h @@ -1,5 +1,5 @@ /*! - * \copyright Copyright (c) 2016-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2016-2018 Governikus GmbH & Co. KG, Germany */ #pragma once diff --git a/src/activation/internal/InternalActivationHandler.cpp b/src/activation/internal/InternalActivationHandler.cpp index 728d9bfd1..e5c7f41f7 100644 --- a/src/activation/internal/InternalActivationHandler.cpp +++ b/src/activation/internal/InternalActivationHandler.cpp @@ -1,5 +1,5 @@ /*! - * \copyright Copyright (c) 2016-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2016-2018 Governikus GmbH & Co. KG, Germany */ #include "InternalActivationHandler.h" diff --git a/src/activation/internal/InternalActivationHandler.h b/src/activation/internal/InternalActivationHandler.h index 6eef3146b..798c9c975 100644 --- a/src/activation/internal/InternalActivationHandler.h +++ b/src/activation/internal/InternalActivationHandler.h @@ -1,7 +1,7 @@ /*! * \brief ActivationHandler for Internal usage like JSON API. * - * \copyright Copyright (c) 2016-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2016-2018 Governikus GmbH & Co. KG, Germany */ #pragma once diff --git a/src/activation/webservice/Template.cpp b/src/activation/webservice/Template.cpp index c683b912e..805c899ba 100644 --- a/src/activation/webservice/Template.cpp +++ b/src/activation/webservice/Template.cpp @@ -1,5 +1,5 @@ /*! - * \copyright Copyright (c) 2016-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2016-2018 Governikus GmbH & Co. KG, Germany */ #include "Template.h" diff --git a/src/activation/webservice/Template.h b/src/activation/webservice/Template.h index ccc5f27ae..5fd4c1bf0 100644 --- a/src/activation/webservice/Template.h +++ b/src/activation/webservice/Template.h @@ -1,7 +1,7 @@ /*! * A simple template renderer. * - * \copyright Copyright (c) 2016-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2016-2018 Governikus GmbH & Co. KG, Germany */ #pragma once diff --git a/src/activation/webservice/WebserviceActivationContext.cpp b/src/activation/webservice/WebserviceActivationContext.cpp index 54abad958..c309dd9da 100644 --- a/src/activation/webservice/WebserviceActivationContext.cpp +++ b/src/activation/webservice/WebserviceActivationContext.cpp @@ -1,5 +1,5 @@ /*! - * \copyright Copyright (c) 2014-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2014-2018 Governikus GmbH & Co. KG, Germany */ #include "WebserviceActivationContext.h" diff --git a/src/activation/webservice/WebserviceActivationContext.h b/src/activation/webservice/WebserviceActivationContext.h index 1378cde15..6f45f9dc2 100644 --- a/src/activation/webservice/WebserviceActivationContext.h +++ b/src/activation/webservice/WebserviceActivationContext.h @@ -1,5 +1,5 @@ /*! - * \copyright Copyright (c) 2014-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2014-2018 Governikus GmbH & Co. KG, Germany */ #pragma once diff --git a/src/activation/webservice/WebserviceActivationHandler.cpp b/src/activation/webservice/WebserviceActivationHandler.cpp index 77639ce14..68e1ff256 100644 --- a/src/activation/webservice/WebserviceActivationHandler.cpp +++ b/src/activation/webservice/WebserviceActivationHandler.cpp @@ -1,5 +1,5 @@ /*! - * \copyright Copyright (c) 2014-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2014-2018 Governikus GmbH & Co. KG, Germany */ #include "WebserviceActivationHandler.h" @@ -202,7 +202,7 @@ QByteArray WebserviceActivationHandler::guessImageContentType(const QString& pFi { return QByteArrayLiteral("image/svg+xml"); } - qCWarning(activation) << "Unknown content type, returing default for image" << pFileName; + qCWarning(activation) << "Unknown content type, returning default for image" << pFileName; return QByteArrayLiteral("image"); } @@ -212,6 +212,7 @@ void WebserviceActivationHandler::handleStatusRequest(StatusFormat pStatusFormat qCDebug(activation) << "Create response with status format:" << pStatusFormat; HttpResponse response(HttpStatusCode::OK); + response.setHeader(QByteArrayLiteral("Access-Control-Allow-Origin"), QByteArrayLiteral("*")); switch (pStatusFormat) { case StatusFormat::PLAIN: diff --git a/src/activation/webservice/WebserviceActivationHandler.h b/src/activation/webservice/WebserviceActivationHandler.h index e60fc0274..2b9912fe5 100644 --- a/src/activation/webservice/WebserviceActivationHandler.h +++ b/src/activation/webservice/WebserviceActivationHandler.h @@ -1,5 +1,5 @@ /*! - * \copyright Copyright (c) 2014-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2014-2018 Governikus GmbH & Co. KG, Germany */ #pragma once diff --git a/src/aidl/AidlBinder.java b/src/aidl/AidlBinder.java index 4fc0c035b..7a11af4b2 100644 --- a/src/aidl/AidlBinder.java +++ b/src/aidl/AidlBinder.java @@ -1,9 +1,11 @@ /* - * \copyright Copyright (c) 2016-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2016-2018 Governikus GmbH & Co. KG, Germany */ package com.governikus.ausweisapp2; +import org.qtproject.qt5.android.QtNative; + import android.content.Intent; import android.nfc.NfcAdapter; import android.nfc.Tag; @@ -11,24 +13,12 @@ import android.os.IBinder; import android.util.Log; -import java.lang.Throwable; -import java.util.HashMap; -import java.util.Map; - -import org.qtproject.qt5.android.QtNative; class AidlBinder extends IAusweisApp2Sdk.Stub { - public final static String LOG_TAG = AusweisApp2Service.LOG_TAG; - private final AusweisApp2Service mService; - private IAusweisApp2SdkCallback mCallback = null; - private String mCallbackSessionId = null; - - public AidlBinder(AusweisApp2Service pService) - { - mService = pService; - } - + private static final String LOG_TAG = AusweisApp2Service.LOG_TAG; + private IAusweisApp2SdkCallback mCallback; + private String mCallbackSessionId; private void cleanUpDeadCallback() { @@ -61,12 +51,6 @@ public synchronized boolean connectSdk(IAusweisApp2SdkCallback pCallback) return false; } - if (pCallback == mCallback) - { - Log.i(LOG_TAG, "Android service: Supplied callback is already in use."); - return true; - } - cleanUpDeadCallback(); if (mCallback != null) { @@ -120,7 +104,7 @@ public synchronized boolean send(String pSessionId, String pMessageFromClient) { Log.d(LOG_TAG, "Android service: Received JSON from client"); - if (!isValidSessionId(mCallbackSessionId)) + if (!isValidSessionId(pSessionId)) { return false; } @@ -134,7 +118,7 @@ public synchronized boolean updateNfcTag(String pSessionId, Tag pTag) { Log.d(LOG_TAG, "Android service: Received nfc tag from client"); - if (!isValidSessionId(mCallbackSessionId)) + if (!isValidSessionId(pSessionId)) { return false; } diff --git a/src/aidl/PskManager.cpp b/src/aidl/PskManager.cpp index 3a79b4e4f..e0ff53fe8 100644 --- a/src/aidl/PskManager.cpp +++ b/src/aidl/PskManager.cpp @@ -1,5 +1,5 @@ /*! - * \copyright Copyright (c) 2016-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2016-2018 Governikus GmbH & Co. KG, Germany */ #include "PskManager.h" diff --git a/src/aidl/PskManager.h b/src/aidl/PskManager.h index fa41296ba..df1c44653 100644 --- a/src/aidl/PskManager.h +++ b/src/aidl/PskManager.h @@ -1,5 +1,5 @@ /*! - * \copyright Copyright (c) 2016-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2016-2018 Governikus GmbH & Co. KG, Germany */ #pragma once diff --git a/src/aidl/UIPlugInAidl.cpp b/src/aidl/UIPlugInAidl.cpp index 3f6eaf666..e23bc94f6 100644 --- a/src/aidl/UIPlugInAidl.cpp +++ b/src/aidl/UIPlugInAidl.cpp @@ -1,5 +1,5 @@ /*! - * \copyright Copyright (c) 2016-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2016-2018 Governikus GmbH & Co. KG, Germany */ #include "UIPlugInAidl.h" diff --git a/src/aidl/UIPlugInAidl.h b/src/aidl/UIPlugInAidl.h index 2139b0ff9..47c813c55 100644 --- a/src/aidl/UIPlugInAidl.h +++ b/src/aidl/UIPlugInAidl.h @@ -1,7 +1,7 @@ /*! * \brief UIPlugIn implementation of the AIDL UI. * - * \copyright Copyright (c) 2016-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2016-2018 Governikus GmbH & Co. KG, Germany */ #pragma once diff --git a/src/card/base/Apdu.cpp b/src/card/base/Apdu.cpp index 6c4ae430c..52b0dc0d8 100644 --- a/src/card/base/Apdu.cpp +++ b/src/card/base/Apdu.cpp @@ -1,5 +1,5 @@ /*! - * \copyright Copyright (c) 2014-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2014-2018 Governikus GmbH & Co. KG, Germany */ #include "Apdu.h" @@ -7,6 +7,7 @@ #include "Commands.h" #include +#include using namespace governikus; @@ -233,6 +234,15 @@ bool CommandApdu::isUpdateRetryCounter() const } +ResponseApdu::ResponseApdu(StatusCode pStatusCode) + : Apdu(QByteArray()) +{ + char buffer[2]; + qToBigEndian(Enum::getValue(pStatusCode), buffer); + setBuffer(QByteArray(buffer, 2)); +} + + ResponseApdu::ResponseApdu(const QByteArray& pBuffer) : Apdu(pBuffer) { @@ -330,4 +340,34 @@ char ResponseApdu::getSW2() const } +CardReturnCode ResponseApdu::getCardReturnCode() const +{ + switch (getReturnCode()) + { + case StatusCode::SUCCESS: + return CardReturnCode::OK; + + case StatusCode::INPUT_TIMEOUT: + return CardReturnCode::INPUT_TIME_OUT; + + case StatusCode::INPUT_CANCELLED: + return CardReturnCode::CANCELLATION_BY_USER; + + case StatusCode::PASSWORDS_DIFFER: + return CardReturnCode::NEW_PIN_MISMATCH; + + case StatusCode::PASSWORD_OUTOF_RANGE: + return CardReturnCode::NEW_PIN_INVALID_LENGTH; + + case StatusCode::PIN_BLOCKED: + return CardReturnCode::PIN_BLOCKED; + + default: + return CardReturnCode::PROTOCOL_ERROR; + } + + Q_UNREACHABLE(); +} + + #include "moc_Apdu.cpp" diff --git a/src/card/base/Apdu.h b/src/card/base/Apdu.h index f78bbc92b..e1241e012 100644 --- a/src/card/base/Apdu.h +++ b/src/card/base/Apdu.h @@ -1,10 +1,12 @@ /*! - * \copyright Copyright (c) 2014-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2014-2018 Governikus GmbH & Co. KG, Germany */ #pragma once +#include "CardReturnCode.h" #include "EnumHelper.h" + #include namespace governikus @@ -121,6 +123,7 @@ class ResponseApdu static const int RETURN_CODE_LENGTH = 2; public: + ResponseApdu(StatusCode pStatusCode); ResponseApdu(const QByteArray& pBuffer = QByteArray()); virtual ~ResponseApdu(); @@ -132,6 +135,7 @@ class ResponseApdu int getRetryCounter() const; SW1 getSW1() const; char getSW2() const; + CardReturnCode getCardReturnCode() const; }; } /* namespace governikus */ diff --git a/src/card/base/Card.cpp b/src/card/base/Card.cpp index 51abf04e5..e02c22e31 100644 --- a/src/card/base/Card.cpp +++ b/src/card/base/Card.cpp @@ -1,5 +1,5 @@ /*! - * \copyright Copyright (c) 2014-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2014-2018 Governikus GmbH & Co. KG, Germany */ #include "Card.h" @@ -40,9 +40,11 @@ CardReturnCode Card::destroyPaceChannel() } -CardReturnCode Card::setEidPin(quint8 pTimeoutSeconds) +CardReturnCode Card::setEidPin(quint8 pTimeoutSeconds, ResponseApdu& pResponseApdu) { Q_UNUSED(pTimeoutSeconds); + Q_UNUSED(pResponseApdu); qCWarning(card) << "Setting eID PIN is not supported"; + return CardReturnCode::COMMAND_FAILED; } diff --git a/src/card/base/Card.h b/src/card/base/Card.h index 352c5be8b..2ec64bf37 100644 --- a/src/card/base/Card.h +++ b/src/card/base/Card.h @@ -1,7 +1,7 @@ /*! * \brief Class representing a smart card * - * \copyright Copyright (c) 2014-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2014-2018 Governikus GmbH & Co. KG, Germany */ #pragma once @@ -63,7 +63,7 @@ class Card /*! * Sets a new eID PIN, i.e. the corresponding reader is no basic reader. */ - virtual CardReturnCode setEidPin(quint8 pTimeoutSeconds); + virtual CardReturnCode setEidPin(quint8 pTimeoutSeconds, ResponseApdu& pResponseApdu); }; diff --git a/src/card/base/CardConnection.cpp b/src/card/base/CardConnection.cpp index 13b4ac103..36b950fd3 100644 --- a/src/card/base/CardConnection.cpp +++ b/src/card/base/CardConnection.cpp @@ -1,5 +1,5 @@ /*! - * \copyright Copyright (c) 2014-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2014-2018 Governikus GmbH & Co. KG, Germany */ #include "CardConnection.h" @@ -89,7 +89,7 @@ void CardConnection::onReaderInfoChanged(const ReaderInfo& pReaderInfo) } -TransmitCommand* CardConnection::createTransmitCommand(const QVector& pInputApduInfos) +TransmitCommand* CardConnection::createTransmitCommand(const QVector& pInputApduInfos, const QString pSlotHandle) { - return new TransmitCommand(mCardConnectionWorker, pInputApduInfos); + return new TransmitCommand(mCardConnectionWorker, pInputApduInfos, pSlotHandle); } diff --git a/src/card/base/CardConnection.h b/src/card/base/CardConnection.h index 73c3ea5e7..2422099bb 100644 --- a/src/card/base/CardConnection.h +++ b/src/card/base/CardConnection.h @@ -1,7 +1,7 @@ /*! * \brief Contains a card connection object * - * \copyright Copyright (c) 2014-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2014-2018 Governikus GmbH & Co. KG, Germany */ #pragma once @@ -41,12 +41,12 @@ class CardConnection Q_OBJECT /*! - * The connection worker talks to the Card held by the Reader + * The connection worker talks to the Card held by the Reader. */ QSharedPointer mCardConnectionWorker; ReaderInfo mReaderInfo; - TransmitCommand* createTransmitCommand(const QVector& pInputApduInfos); + TransmitCommand* createTransmitCommand(const QVector& pInputApduInfos, const QString pSlotHandle); UpdateRetryCounterCommand* createUpdateRetryCounterCommand(); UnblockPinCommand* createUnblockPinCommand(const QString& pPuk); @@ -160,9 +160,9 @@ class CardConnection template QMetaObject::Connection callTransmitCommand(const typename QtPrivate::FunctionPointer::Object* pReceiver, T pFunc, - const QVector& pInputApduInfos) + const QVector& pInputApduInfos, const QString pSlotHandle = QString()) { - auto command = createTransmitCommand(pInputApduInfos); + auto command = createTransmitCommand(pInputApduInfos, pSlotHandle); return call(command, pReceiver, pFunc); } diff --git a/src/card/base/CardConnectionWorker.cpp b/src/card/base/CardConnectionWorker.cpp index a5c3f8235..f2b951ca6 100644 --- a/src/card/base/CardConnectionWorker.cpp +++ b/src/card/base/CardConnectionWorker.cpp @@ -1,5 +1,5 @@ /*! - * \copyright Copyright (c) 2014-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2014-2018 Governikus GmbH & Co. KG, Germany */ #include "CardConnectionWorker.h" @@ -232,7 +232,7 @@ CardReturnCode CardConnectionWorker::destroyPaceChannel() } -CardReturnCode CardConnectionWorker::setEidPin(const QString& pNewPin, quint8 pTimeoutSeconds) +CardReturnCode CardConnectionWorker::setEidPin(const QString& pNewPin, quint8 pTimeoutSeconds, ResponseApdu& pResponseApdu) { if (!hasCard()) { @@ -243,8 +243,7 @@ CardReturnCode CardConnectionWorker::setEidPin(const QString& pNewPin, quint8 pT { Q_ASSERT(!pNewPin.isEmpty()); ResetRetryCounterBuilder commandBuilder(pNewPin.toUtf8()); - ResponseApdu response; - if (transmit(commandBuilder.build(), response) != CardReturnCode::OK || response.getReturnCode() != StatusCode::SUCCESS) + if (transmit(commandBuilder.build(), pResponseApdu) != CardReturnCode::OK || pResponseApdu.getReturnCode() != StatusCode::SUCCESS) { qCWarning(card) << "Modify PIN failed"; return CardReturnCode::COMMAND_FAILED; @@ -254,7 +253,7 @@ CardReturnCode CardConnectionWorker::setEidPin(const QString& pNewPin, quint8 pT else { Q_ASSERT(pNewPin.isEmpty()); - return mReader->getCard()->setEidPin(pTimeoutSeconds); + return mReader->getCard()->setEidPin(pTimeoutSeconds, pResponseApdu); } } diff --git a/src/card/base/CardConnectionWorker.h b/src/card/base/CardConnectionWorker.h index 21eeeb352..df6692f2b 100644 --- a/src/card/base/CardConnectionWorker.h +++ b/src/card/base/CardConnectionWorker.h @@ -1,7 +1,7 @@ /*! * \brief Worker for \ref CardConnection that will do the job in \ref ReaderManagerWorker * - * \copyright Copyright (c) 2014-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2014-2018 Governikus GmbH & Co. KG, Germany */ #pragma once @@ -102,7 +102,7 @@ class CardConnectionWorker */ Q_INVOKABLE virtual bool stopSecureMessaging(); - virtual CardReturnCode setEidPin(const QString& pNewPin, quint8 pTimeoutSeconds); + virtual CardReturnCode setEidPin(const QString& pNewPin, quint8 pTimeoutSeconds, ResponseApdu& pResponseApdu); Q_SIGNALS: void fireReaderInfoChanged(const ReaderInfo& pReaderInfo); diff --git a/src/card/base/CardInfo.cpp b/src/card/base/CardInfo.cpp index 211ed9420..d48b7ec9a 100644 --- a/src/card/base/CardInfo.cpp +++ b/src/card/base/CardInfo.cpp @@ -1,7 +1,7 @@ /*! * \brief CardInfo holds smart card information, such as the type and some contained data structure (currently only the EF.CardAccess). * - * \copyright Copyright (c) 2014-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2014-2018 Governikus GmbH & Co. KG, Germany */ #include "CardInfo.h" diff --git a/src/card/base/CardInfo.h b/src/card/base/CardInfo.h index 16a7439ed..e61ebb3ab 100644 --- a/src/card/base/CardInfo.h +++ b/src/card/base/CardInfo.h @@ -1,7 +1,7 @@ /*! * \brief Contains the CardInfo and the CardInfoFactory * - * \copyright Copyright (c) 2014-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2014-2018 Governikus GmbH & Co. KG, Germany */ #pragma once diff --git a/src/card/base/CardOperationResult.h b/src/card/base/CardOperationResult.h index 007757232..c06ba5131 100644 --- a/src/card/base/CardOperationResult.h +++ b/src/card/base/CardOperationResult.h @@ -1,7 +1,7 @@ /*! * \brief Generic class representing the result of a card operation, or an error. * - * \copyright Copyright (c) 2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2017-2018 Governikus GmbH & Co. KG, Germany */ #pragma once diff --git a/src/card/base/Commands.cpp b/src/card/base/Commands.cpp index a5a900e98..4cc055f8f 100644 --- a/src/card/base/Commands.cpp +++ b/src/card/base/Commands.cpp @@ -1,5 +1,5 @@ /*! - * \copyright Copyright (c) 2014-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2014-2018 Governikus GmbH & Co. KG, Germany */ #include "Commands.h" @@ -356,192 +356,3 @@ CommandApdu ResetRetryCounterBuilder::build() // data: new PIN, when changing return CommandApdu(CommandApdu::CLA, INS, p1, 3, mPin); } - - -QByteArray PinModifyBuilder::createChangeEidPinCommandData(quint8 pTimeoutSeconds) const -{ - // According to ISO-7816-4, 7.5.10 RESET RETRY COUNTER command - QByteArray abData = QByteArrayLiteral("002C0203"); - - return createCommandData(pTimeoutSeconds, 0x00, 0x01, 0x02, QByteArray::fromHex(abData)); -} - - -QByteArray PinModifyBuilder::createCommandData(quint8 pTimeoutSeconds, char pMsgIndex1, char pMsgIndex2, char pMsgIndex3, const QByteArray& pAbData) const -{ - // as defined in PC/SC, Part 10 "IFDs with Secure PIN Entry Capabilities" - QByteArray command; - // bTimeOut (timeout in seconds) - command += static_cast(pTimeoutSeconds); - // bTimeOut2 (timeout in seconds after first key pressed) - command += static_cast(pTimeoutSeconds); - // bmFormatString (PIN format): system unit is bytes (0x80), ASCII format (0x02) - command += char(0x82); - // bmPINBlockString (PIN block size and length info): PIN not in APDU command - command += '\0'; - // bmPINLengthFormat (format of PIN length field in APDU command): PIN not in APDU command - command += '\0'; - // bInsertionOffsetOld (insertion position offset for old PIN) - command += '\0'; - // bInsertionOffsetNew BYTE (insertion position offset for new PIN) - command += '\0'; - // wPINMaxExtraDigit USHORT (0xXXYY, min (XX) and max (length) of new PIN) - command += 0x06; - command += 0x06; - // bConfirmPIN (PIN confirmation options): confirm new PIN (0x01) - command += 0x01; - // bEntryValidationCondition (new PIN validation options): validation key pressed (0x02) - command += 0x02; - // bNumberMessage (number of display messages to be sent) - command += 0x02; - // wLangId (language ID for display messages): German (0x0407) - command += 0x07; - command += 0x04; - // bMsgIndex1 (index (into reader table) of first message to display) - command += pMsgIndex1; - // bMsgIndex2 (index (into reader table) of second message to display) - command += pMsgIndex2; - // bMsgIndex3 (index (into reader table) of third message to display) - command += pMsgIndex3; - // bTeoPrologue (T1 only: I-block prologue field to use): fill with 0 - command += '\0'; - command += '\0'; - command += '\0'; - - if (pAbData.size() > 0xFF) - { - qCCritical(card) << "abData size bigger than 0xFF currently not supported."; - Q_ASSERT(pAbData.size() <= 0xFF); - return QByteArray(); - } - // ulDataLength (length of the APDU to be sent to ICC) - command += static_cast(pAbData.size()); - command += '\0'; - command += '\0'; - command += '\0'; - command += pAbData; - - return command; -} - - -CommandApdu PinModifyBuilder::createCommandDataCcid(quint8 pTimeoutSeconds) const -{ - // According to TR-03119 the command data has to be the full PC_to_RDR_Secure structure - // According to Reiner SCT the firmware is implemented in such a way, that the command - // data is expected as abPINOperationDataStucture - - // according to DWG_Smart-Card_CCID_Rev110.pdf - QByteArray abPINDataStructure; - - // bTimeOut (timeout in seconds) - abPINDataStructure += static_cast(pTimeoutSeconds); - // bmFormatString (PIN format): system unit is bytes (0x80), ASCII format (0x02) - abPINDataStructure += char(0x82); - // bmPINBlockString (PIN block size and length info): PIN not in APDU command - abPINDataStructure += '\0'; - // bmPINLengthFormat (format of PIN length field in APDU command): PIN not in APDU command - abPINDataStructure += '\0'; - // bInsertionOffsetOld (insertion position offset for old PIN) - abPINDataStructure += '\0'; - // bInsertionOffsetNew BYTE (insertion position offset for new PIN) - abPINDataStructure += '\0'; - // wPINMaxExtraDigit USHORT (0xXXYY, min (XX) and max (length) of new PIN) - abPINDataStructure += char(0x06); - abPINDataStructure += char(0x06); - // bConfirmPIN (PIN confirmation options): confirm new PIN (0x01) - abPINDataStructure += char(0x01); - // bEntryValidationCondition (new PIN validation options): validation key pressed (0x02) - abPINDataStructure += char(0x02); - // bNumberMessage (number of display messages to be sent) - abPINDataStructure += char(0x02); - // wLangId (language ID for display messages): German (0x0407) - abPINDataStructure += char(0x07); - abPINDataStructure += char(0x04); - // bMsgIndex1 (index (into reader table) of first message to display) - abPINDataStructure += char(0x01); - // bMsgIndex2 (index (into reader table) of second message to display) - abPINDataStructure += char(0x02); - // bMsgIndex3 (index (into reader table) of third message to display) - abPINDataStructure += '\0'; - // bTeoPrologue (T1 only: I-block prologue field to use): fill with 0 - abPINDataStructure += '\0'; - abPINDataStructure += '\0'; - abPINDataStructure += '\0'; - // abData (APDU to be sent to ICC) - abPINDataStructure += '\0'; // CLA: command - abPINDataStructure += char(0x2c); // INS: Reset Retry Counter - abPINDataStructure += char(0x02); // P1: new PIN/CAN - abPINDataStructure += char(0x03); // P2: PIN - QByteArray abPINOperationDataStucture; - abPINOperationDataStucture += char(0x01); //bPINOperation - abPINOperationDataStucture += abPINDataStructure; //abPINDataStructure - - // boxing command according to TR-03119 - return CommandApdu(char(0xFF), char(0x9A), 0x04, 0x10, abPINOperationDataStucture); -} - - -void PinModifyOutput::parse(const QByteArray& pData) -{ - if (pData.size() != 2) - { - mReturnCode = CardReturnCode::UNKNOWN; - } - - const int errorCode = static_cast(pData.at(0)) << 8 | static_cast(pData.at(1)); - switch (errorCode) - { - case 0x6400: - // operation timed out - mReturnCode = CardReturnCode::INPUT_TIME_OUT; - break; - - case 0x6401: - // operation canceled by "Cancel" button - mReturnCode = CardReturnCode::CANCELLATION_BY_USER; - break; - - case 0x6402: - // the two new PIN entries don't match - mReturnCode = CardReturnCode::NEW_PIN_MISMATCH; - break; - - case 0x6403: - // entered PIN too short/long - mReturnCode = CardReturnCode::NEW_PIN_INVALID_LENGTH; - break; - - case 0x6b80: - // invalid parameter in passed structure - mReturnCode = CardReturnCode::COMMAND_FAILED; - break; - - case 0x6982: - // terminal is not authorized to unblock or change the PIN - mReturnCode = CardReturnCode::UNKNOWN; - break; - - case 0x9000: - // success - mReturnCode = CardReturnCode::OK; - break; - - default: - qCDebug(card) << "unknown error:" << pData.toHex(); - mReturnCode = CardReturnCode::UNKNOWN; - break; - } -} - - -void PinModifyOutput::parseFromCcid(const QByteArray& pData) -{ - parse(pData); -} - - -CardReturnCode PinModifyOutput::getReturnCode() const -{ - return mReturnCode; -} diff --git a/src/card/base/Commands.h b/src/card/base/Commands.h index d02d4253c..12073f41f 100644 --- a/src/card/base/Commands.h +++ b/src/card/base/Commands.h @@ -1,5 +1,5 @@ /*! - * \copyright Copyright (c) 2014-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2014-2018 Governikus GmbH & Co. KG, Germany */ #pragma once @@ -185,30 +185,4 @@ class ResetRetryCounterBuilder QByteArray mPin; }; - -class PinModifyBuilder -{ - private: - QByteArray createCommandData(quint8 pTimeoutSeconds, char pMsgIndex1, char pMsgIndex2, char pMsgIndex3, const QByteArray& pAbData) const; - - public: - QByteArray createChangeEidPinCommandData(quint8 pTimeoutSeconds) const; - - /** - * According to DWG_Smart-Card_CCID_Rev110.pdf as mentioned in [TR-03110]. - */ - CommandApdu createCommandDataCcid(quint8 pTimeoutSeconds) const; -}; - -class PinModifyOutput -{ - private: - CardReturnCode mReturnCode; - - public: - void parse(const QByteArray& pData); - void parseFromCcid(const QByteArray& pData); - CardReturnCode getReturnCode() const; -}; - } /* namespace governikus */ diff --git a/src/card/base/DestroyPACEChannel.cpp b/src/card/base/DestroyPACEChannel.cpp index ad0e93615..8dd706201 100644 --- a/src/card/base/DestroyPACEChannel.cpp +++ b/src/card/base/DestroyPACEChannel.cpp @@ -1,5 +1,5 @@ /*! - * \copyright Copyright (c) 2015-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2015-2018 Governikus GmbH & Co. KG, Germany */ #include "DestroyPACEChannel.h" diff --git a/src/card/base/DestroyPACEChannel.h b/src/card/base/DestroyPACEChannel.h index 45b4aa6b6..c8da26f06 100644 --- a/src/card/base/DestroyPACEChannel.h +++ b/src/card/base/DestroyPACEChannel.h @@ -1,7 +1,7 @@ /*! * \brief Data object for creation of card command DestroyPACEChannel * - * \copyright Copyright (c) 2015-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2015-2018 Governikus GmbH & Co. KG, Germany */ #pragma once diff --git a/src/card/base/EstablishPACEChannel.cpp b/src/card/base/EstablishPACEChannel.cpp index 4007490d0..e0ae5c957 100644 --- a/src/card/base/EstablishPACEChannel.cpp +++ b/src/card/base/EstablishPACEChannel.cpp @@ -1,5 +1,5 @@ /*! - * \copyright Copyright (c) 2015-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2015-2018 Governikus GmbH & Co. KG, Germany */ #include "asn1/ASN1Util.h" diff --git a/src/card/base/EstablishPACEChannel.h b/src/card/base/EstablishPACEChannel.h index 95d0403d7..b452f92ef 100644 --- a/src/card/base/EstablishPACEChannel.h +++ b/src/card/base/EstablishPACEChannel.h @@ -1,7 +1,7 @@ /*! * \brief Data object for output of card command EstablishPACEChannel * - * \copyright Copyright (c) 2015-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2015-2018 Governikus GmbH & Co. KG, Germany */ #pragma once diff --git a/src/card/base/EstablishPACEChannelParser.cpp b/src/card/base/EstablishPACEChannelParser.cpp index 7f2871abb..d8694809d 100644 --- a/src/card/base/EstablishPACEChannelParser.cpp +++ b/src/card/base/EstablishPACEChannelParser.cpp @@ -1,5 +1,5 @@ /*! - * \copyright Copyright (c) 2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2017-2018 Governikus GmbH & Co. KG, Germany */ #include "EstablishPACEChannelParser.h" @@ -69,28 +69,28 @@ EstablishPACEChannelParser EstablishPACEChannelParser::fromCcid(const QByteArray Q_ASSERT(false); } - // With CAN and PUK mode there is no certificate description. + QByteArray chat; QByteArray certificateDescription; - Q_ASSERT(passwordId != PACE_PASSWORD_ID::PACE_PIN || channelInput->mCertificateDescription); - if (channelInput->mCertificateDescription) - { - certificateDescription = channelInput->mCertificateDescription->encode(); - } - else if (passwordId == PACE_PASSWORD_ID::PACE_PIN) + // Chat and certificate description are only available in PIN mode in an authentication. + if (passwordId == PACE_PASSWORD_ID::PACE_PIN) { - qCDebug(card) << "Decapsulation: No certificate description!"; - } + if (channelInput->mCertificateDescription) + { + certificateDescription = channelInput->mCertificateDescription->encode(); + } + else + { + qCDebug(card) << "Decapsulation: No certificate description"; + } - // With CAN and PUK mode there is no chat. - QByteArray chat; - Q_ASSERT(passwordId != PACE_PASSWORD_ID::PACE_PIN || channelInput->mCHAT); - if (channelInput->mCHAT) - { - chat = Asn1OctetStringUtil::getValue(channelInput->mCHAT); - } - else if (passwordId == PACE_PASSWORD_ID::PACE_PIN) - { - qCDebug(card) << "Decapsulation: No CHAT!"; + if (channelInput->mCHAT) + { + chat = Asn1OctetStringUtil::getValue(channelInput->mCHAT); + } + else + { + qCDebug(card) << "Decapsulation: No CHAT"; + } } return EstablishPACEChannelParser(passwordId, chat, certificateDescription, commandData); diff --git a/src/card/base/EstablishPACEChannelParser.h b/src/card/base/EstablishPACEChannelParser.h index e09b15e4e..650505354 100644 --- a/src/card/base/EstablishPACEChannelParser.h +++ b/src/card/base/EstablishPACEChannelParser.h @@ -1,7 +1,7 @@ /*! * \brief Parser to decapsulation EstablishPACEChannel * - * \copyright Copyright (c) 2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2017-2018 Governikus GmbH & Co. KG, Germany */ #pragma once diff --git a/src/card/base/FileRef.cpp b/src/card/base/FileRef.cpp index a4524dc6e..67aa182a2 100644 --- a/src/card/base/FileRef.cpp +++ b/src/card/base/FileRef.cpp @@ -1,5 +1,5 @@ /*! - * \copyright Copyright (c) 2014-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2014-2018 Governikus GmbH & Co. KG, Germany */ #include "Commands.h" diff --git a/src/card/base/FileRef.h b/src/card/base/FileRef.h index c58a31bbc..bf984acbc 100644 --- a/src/card/base/FileRef.h +++ b/src/card/base/FileRef.h @@ -1,7 +1,7 @@ /*! * \brief Reference information for files on smart cards. * - * \copyright Copyright (c) 2014-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2014-2018 Governikus GmbH & Co. KG, Germany */ #pragma once diff --git a/src/card/base/GeneralAuthenticateResponse.cpp b/src/card/base/GeneralAuthenticateResponse.cpp index 421eb462e..6c64344e5 100644 --- a/src/card/base/GeneralAuthenticateResponse.cpp +++ b/src/card/base/GeneralAuthenticateResponse.cpp @@ -1,5 +1,5 @@ /*! - * \copyright Copyright (c) 2015-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2015-2018 Governikus GmbH & Co. KG, Germany */ #include "asn1/ASN1Util.h" diff --git a/src/card/base/GeneralAuthenticateResponse.h b/src/card/base/GeneralAuthenticateResponse.h index 2c5c539ed..ad817713d 100644 --- a/src/card/base/GeneralAuthenticateResponse.h +++ b/src/card/base/GeneralAuthenticateResponse.h @@ -1,7 +1,7 @@ /*! * \brief Implementation of GeneralAuthenticate response APDUs. * - * \copyright Copyright (c) 2015-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2015-2018 Governikus GmbH & Co. KG, Germany */ #pragma once diff --git a/src/card/base/InputAPDUInfo.cpp b/src/card/base/InputAPDUInfo.cpp index bb3c366cc..3a3fcd251 100644 --- a/src/card/base/InputAPDUInfo.cpp +++ b/src/card/base/InputAPDUInfo.cpp @@ -1,5 +1,5 @@ /*! - * \copyright Copyright (c) 2014-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2014-2018 Governikus GmbH & Co. KG, Germany */ #include "InputAPDUInfo.h" diff --git a/src/card/base/InputAPDUInfo.h b/src/card/base/InputAPDUInfo.h index 9ab862a27..4029be1b4 100644 --- a/src/card/base/InputAPDUInfo.h +++ b/src/card/base/InputAPDUInfo.h @@ -1,7 +1,7 @@ /*! * \brief Holds the data of an InputAPDUInfo element. * - * \copyright Copyright (c) 2014-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2014-2018 Governikus GmbH & Co. KG, Germany */ #include "Apdu.h" diff --git a/src/card/base/PersoSimWorkaround.h b/src/card/base/PersoSimWorkaround.h index 1ae3b004a..eaafc1351 100644 --- a/src/card/base/PersoSimWorkaround.h +++ b/src/card/base/PersoSimWorkaround.h @@ -1,7 +1,7 @@ /*! * \brief This class is only to mark it as a workaround for working with the PersoSim. * - * \copyright Copyright (c) 2014-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2014-2018 Governikus GmbH & Co. KG, Germany */ #pragma once diff --git a/src/card/base/PinModify.cpp b/src/card/base/PinModify.cpp new file mode 100644 index 000000000..2ae40662f --- /dev/null +++ b/src/card/base/PinModify.cpp @@ -0,0 +1,130 @@ +/*! + * \copyright Copyright (c) 2014-2018 Governikus GmbH & Co. KG, Germany + */ + +#include "PinModify.h" + +#include +#include + + +using namespace governikus; + + +Q_DECLARE_LOGGING_CATEGORY(card) + + +PinModify::PinModify(quint8 pTimeoutSeconds) + : mTimeoutSeconds(pTimeoutSeconds) +{ +} + + +PinModify::PinModify(const QByteArray& pRemoteInputData) + : PinModify(0) +{ + if (pRemoteInputData.isEmpty()) + { + qCDebug(card) << "Parsing failed. Command data should contain at least 1 bytes"; + return; + } + + mTimeoutSeconds = static_cast(pRemoteInputData.at(0)); +} + + +QByteArray PinModify::createPinModificationDataStructure(ProtocolType pType) const +{ + // The documentation is available in: + // PC/SC, Part 10 "IFDs with Secure PIN Entry Capabilities", 2.5.3 "PIN_MODIFY" + // DWG_Smart-Card_CCID_Rev110.pdf as mentioned in [TR-03119] + + QByteArray abPINDataStructure; + // bTimeOut (timeout in seconds) + abPINDataStructure += static_cast(mTimeoutSeconds); + if (pType == ProtocolType::PCSC) + { + // bTimeOut2 (timeout in seconds) + abPINDataStructure += static_cast(mTimeoutSeconds); + } + // bmFormatString (PIN format): system unit is bytes (0x80), ASCII format (0x02) + abPINDataStructure += char(0x82); + // bmPINBlockString (PIN block size and length info): PIN not in APDU command + abPINDataStructure += '\0'; + // bmPINLengthFormat (format of PIN length field in APDU command): PIN not in APDU command + abPINDataStructure += '\0'; + // bInsertionOffsetOld (insertion position offset for old PIN) + abPINDataStructure += '\0'; + // bInsertionOffsetNew BYTE (insertion position offset for new PIN) + abPINDataStructure += '\0'; + // wPINMaxExtraDigit USHORT (0xXXYY, min (XX) and max (length) of new PIN) + abPINDataStructure += char(0x06); + abPINDataStructure += char(0x06); + // bConfirmPIN (PIN confirmation options): confirm new PIN (0x01) + abPINDataStructure += char(0x01); + // bEntryValidationCondition (new PIN validation options): validation key pressed (0x02) + abPINDataStructure += char(0x02); + // bNumberMessage (number of display messages to be sent) + abPINDataStructure += char(0x02); + // wLangId (language ID for display messages): German (0x0407) + abPINDataStructure += char(0x07); + abPINDataStructure += char(0x04); + // bMsgIndex1 (index (into reader table) of first message to display) + abPINDataStructure += char(0x00); + // bMsgIndex2 (index (into reader table) of second message to display) + abPINDataStructure += char(0x01); + // bMsgIndex3 (index (into reader table) of third message to display) + // WARNING: bMsgIndex3 should not be present for CCID because bNumberMessage != 3) + // We still need it, because Reiner SCT cyberJack wave is not working without. + abPINDataStructure += char(0x02); + // bTeoPrologue (T1 only: I-block prologue field to use): fill with 0 + abPINDataStructure += '\0'; + abPINDataStructure += '\0'; + abPINDataStructure += '\0'; + + // According to ISO-7816-4, 7.5.10 RESET RETRY COUNTER command + const QByteArray abData = QByteArray::fromHex(QByteArrayLiteral("002C0203")); + if (pType == ProtocolType::PCSC) + { + char buffer[4]; + qToLittleEndian(static_cast(abData.size()), buffer); + abPINDataStructure += QByteArray(buffer, 4); + } + // PCSC: abData / CCID: abPINApdu + abPINDataStructure += abData; + + return abPINDataStructure; +} + + +quint8 PinModify::getTimeoutSeconds() const +{ + return mTimeoutSeconds; +} + + +QByteArray PinModify::createCcidForPcsc() const +{ + return createPinModificationDataStructure(ProtocolType::PCSC); +} + + +QByteArray PinModify::createCcidForRemote() const +{ + return createCcidForPcsc(); +} + + +CommandApdu PinModify::createCcidForBluetooth() const +{ + // According to TR-03119 the command data has to be the full PC_to_RDR_Secure structure + // According to Reiner SCT the firmware is implemented in such a way, that the command + // data is expected as abPINOperationDataStucture (DWG_Smart-Card_CCID_Rev110.pdf). + + QByteArray abPINOperationDataStucture; + abPINOperationDataStucture += char(0x01); //bPINOperation + abPINOperationDataStucture += createPinModificationDataStructure(ProtocolType::BLUETOOTH); + + // Boxing command according to TR-03119 + return CommandApdu(char(0xFF), char(0x9A), 0x04, 0x10, abPINOperationDataStucture); +} diff --git a/src/card/base/PinModify.h b/src/card/base/PinModify.h new file mode 100644 index 000000000..2150223be --- /dev/null +++ b/src/card/base/PinModify.h @@ -0,0 +1,39 @@ +/*! + * \copyright Copyright (c) 2014-2018 Governikus GmbH & Co. KG, Germany + */ + +#pragma once + +#include "Apdu.h" + +#include + + +namespace governikus +{ + +class PinModify +{ + private: + enum class ProtocolType + { + PCSC, + BLUETOOTH + }; + + quint8 mTimeoutSeconds; + + QByteArray createPinModificationDataStructure(ProtocolType pType) const; + + public: + PinModify(quint8 pTimeoutSeconds); + PinModify(const QByteArray& pRemoteInputData); + + quint8 getTimeoutSeconds() const; + + QByteArray createCcidForPcsc() const; + QByteArray createCcidForRemote() const; + CommandApdu createCcidForBluetooth() const; +}; + +} /* namespace governikus */ diff --git a/src/card/base/PinModifyOutput.cpp b/src/card/base/PinModifyOutput.cpp new file mode 100644 index 000000000..9089c980d --- /dev/null +++ b/src/card/base/PinModifyOutput.cpp @@ -0,0 +1,83 @@ +/*! + * \copyright Copyright (c) 2014-2018 Governikus GmbH & Co. KG, Germany + */ + +#include "PinModifyOutput.h" + +#include +#include + + +using namespace governikus; + + +Q_DECLARE_LOGGING_CATEGORY(card) + + +PinModifyOutput::PinModifyOutput() + : mResponseApdu() +{ +} + + +PinModifyOutput::PinModifyOutput(const ResponseApdu& pResponseApdu) + : mResponseApdu(pResponseApdu) +{ +} + + +CardReturnCode PinModifyOutput::statusCodeToCardReturnCode(const QByteArray& pData) +{ + if (pData.size() != 2) + { + return CardReturnCode::UNKNOWN; + } + + const quint16 statusCode = qFromBigEndian(pData.data()); + const StatusCode errorCode = Enum::isValue(statusCode) ? StatusCode(statusCode) : StatusCode::INVALID; + switch (errorCode) + { + case StatusCode::INPUT_TIMEOUT: + return CardReturnCode::INPUT_TIME_OUT; + + case StatusCode::INPUT_CANCELLED: + return CardReturnCode::CANCELLATION_BY_USER; + + case StatusCode::PASSWORDS_DIFFER: + return CardReturnCode::NEW_PIN_MISMATCH; + + case StatusCode::PASSWORD_OUTOF_RANGE: + return CardReturnCode::NEW_PIN_INVALID_LENGTH; + + case StatusCode::INVALID_DATAFIELD: + return CardReturnCode::COMMAND_FAILED; + + case StatusCode::ACCESS_DENIED: + return CardReturnCode::UNKNOWN; + + case StatusCode::SUCCESS: + return CardReturnCode::OK; + + default: + qCDebug(card) << "unknown error:" << pData.toHex(); + return CardReturnCode::UNKNOWN; + } +} + + +QByteArray PinModifyOutput::toCcid() const +{ + return mResponseApdu.getBuffer(); +} + + +CardReturnCode PinModifyOutput::getReturnCode() const +{ + return statusCodeToCardReturnCode(mResponseApdu.getBuffer()); +} + + +const ResponseApdu& PinModifyOutput::getResponseApdu() const +{ + return mResponseApdu; +} diff --git a/src/card/base/PinModifyOutput.h b/src/card/base/PinModifyOutput.h new file mode 100644 index 000000000..ed279b990 --- /dev/null +++ b/src/card/base/PinModifyOutput.h @@ -0,0 +1,38 @@ +/*! + * \copyright Copyright (c) 2014-2018 Governikus GmbH & Co. KG, Germany + */ + +#pragma once + +#include "Apdu.h" +#include "CardReturnCode.h" + +#include + + +namespace governikus +{ + +class PinModifyOutput +{ + private: + ResponseApdu mResponseApdu; + + static CardReturnCode statusCodeToCardReturnCode(const QByteArray& pData); + + public: + PinModifyOutput(); + PinModifyOutput(const ResponseApdu& pResponseApdu); + + CardReturnCode getReturnCode() const; + const ResponseApdu& getResponseApdu() const; + + /** + * Defined in TR-03119 Section D.3 and DWG_Smart-Card_CCID_Rev110 + * Section 6.2.1 + */ + QByteArray toCcid() const; + +}; + +} /* namespace governikus */ diff --git a/src/card/base/Reader.cpp b/src/card/base/Reader.cpp index f80c02a42..64520b221 100644 --- a/src/card/base/Reader.cpp +++ b/src/card/base/Reader.cpp @@ -1,5 +1,5 @@ /*! - * \copyright Copyright (c) 2014-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2014-2018 Governikus GmbH & Co. KG, Germany */ diff --git a/src/card/base/Reader.h b/src/card/base/Reader.h index 19d7b0c4a..f275a225f 100644 --- a/src/card/base/Reader.h +++ b/src/card/base/Reader.h @@ -1,5 +1,5 @@ /*! - * \copyright Copyright (c) 2014-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2014-2018 Governikus GmbH & Co. KG, Germany */ #pragma once diff --git a/src/card/base/ReaderFilter.cpp b/src/card/base/ReaderFilter.cpp index b25e2a26c..cec2dd1d2 100644 --- a/src/card/base/ReaderFilter.cpp +++ b/src/card/base/ReaderFilter.cpp @@ -1,5 +1,5 @@ /*! - * \copyright Copyright (c) 2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2017-2018 Governikus GmbH & Co. KG, Germany */ #include "ReaderFilter.h" diff --git a/src/card/base/ReaderFilter.h b/src/card/base/ReaderFilter.h index 102cca884..73df75c3c 100644 --- a/src/card/base/ReaderFilter.h +++ b/src/card/base/ReaderFilter.h @@ -1,7 +1,7 @@ /*! * \brief A configured filter used to retrieve readers * - * \copyright Copyright (c) 2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2017-2018 Governikus GmbH & Co. KG, Germany */ #pragma once diff --git a/src/card/base/ReaderInfo.cpp b/src/card/base/ReaderInfo.cpp index 9e1baae41..66eae813b 100644 --- a/src/card/base/ReaderInfo.cpp +++ b/src/card/base/ReaderInfo.cpp @@ -1,5 +1,5 @@ /*! - * \copyright Copyright (c) 2014-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2014-2018 Governikus GmbH & Co. KG, Germany */ #include "ReaderInfo.h" diff --git a/src/card/base/ReaderInfo.h b/src/card/base/ReaderInfo.h index 3fe3dd15b..d2959a1ab 100644 --- a/src/card/base/ReaderInfo.h +++ b/src/card/base/ReaderInfo.h @@ -1,5 +1,5 @@ /*! - * \copyright Copyright (c) 2014-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2014-2018 Governikus GmbH & Co. KG, Germany */ #pragma once diff --git a/src/card/base/ReaderManager.cpp b/src/card/base/ReaderManager.cpp index db9062745..5d4a429b5 100644 --- a/src/card/base/ReaderManager.cpp +++ b/src/card/base/ReaderManager.cpp @@ -1,5 +1,5 @@ /*! - * \copyright Copyright (c) 2014-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2014-2018 Governikus GmbH & Co. KG, Germany */ #include "ReaderManager.h" @@ -94,7 +94,7 @@ void ReaderManager::shutdown() } -void ReaderManager::startScan(ReaderManagerPlugInType pType) +void ReaderManager::startScan(ReaderManagerPlugInType pType, bool pAutoConnect) { if (!mThread.isRunning()) { @@ -102,15 +102,15 @@ void ReaderManager::startScan(ReaderManagerPlugInType pType) return; } - QMetaObject::invokeMethod(mWorker.data(), "startScan", Qt::QueuedConnection, Q_ARG(ReaderManagerPlugInType, pType)); + QMetaObject::invokeMethod(mWorker.data(), "startScan", Qt::QueuedConnection, Q_ARG(ReaderManagerPlugInType, pType), Q_ARG(bool, pAutoConnect)); } -void ReaderManager::startScanAll() +void ReaderManager::startScanAll(bool pAutoConnect) { for (const auto& plugInType : Enum::getList()) { - startScan(plugInType); + startScan(plugInType, pAutoConnect); } } diff --git a/src/card/base/ReaderManager.h b/src/card/base/ReaderManager.h index ce2bd786d..8d839ec0e 100644 --- a/src/card/base/ReaderManager.h +++ b/src/card/base/ReaderManager.h @@ -1,5 +1,5 @@ /*! - * \copyright Copyright (c) 2014-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2014-2018 Governikus GmbH & Co. KG, Germany */ #pragma once @@ -42,12 +42,12 @@ class ReaderManager /*! * Starts a scan for all device types. */ - void startScanAll(); + void startScanAll(bool pAutoConnect = true); /*! * Starts a scan for devices if registered plugin don't scan anytime. */ - void startScan(ReaderManagerPlugInType pType); + void startScan(ReaderManagerPlugInType pType, bool pAutoConnect = true); /*! * Stops scan for all device types. diff --git a/src/card/base/ReaderManagerPlugIn.cpp b/src/card/base/ReaderManagerPlugIn.cpp index a114e2bd3..bf1424c95 100644 --- a/src/card/base/ReaderManagerPlugIn.cpp +++ b/src/card/base/ReaderManagerPlugIn.cpp @@ -1,5 +1,5 @@ /*! - * \copyright Copyright (c) 2014-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2014-2018 Governikus GmbH & Co. KG, Germany */ #include "ReaderManagerPlugIn.h" diff --git a/src/card/base/ReaderManagerPlugIn.h b/src/card/base/ReaderManagerPlugIn.h index d5478779b..60d3e913a 100644 --- a/src/card/base/ReaderManagerPlugIn.h +++ b/src/card/base/ReaderManagerPlugIn.h @@ -2,7 +2,7 @@ * \brief PlugIn to control different kinds of reader managers that will be used in \ref ReaderManager. * If you implement a class of this PlugIn you need to register it in \ref ReaderManager, otherwise it won't be used. * - * \copyright Copyright (c) 2014-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2014-2018 Governikus GmbH & Co. KG, Germany */ #pragma once @@ -48,6 +48,16 @@ class ReaderManagerPlugIn } + void setReaderInfoResponding(bool pResponding) + { + if (mInfo.isResponding() != pResponding) + { + mInfo.setResponding(pResponding); + Q_EMIT fireStatusChanged(mInfo); + } + } + + void setReaderInfoValue(ReaderManagerPlugInInfo::Key pKey, const QVariant& pValue) { mInfo.setValue(pKey, pValue); diff --git a/src/card/base/ReaderManagerPlugInInfo.cpp b/src/card/base/ReaderManagerPlugInInfo.cpp index b3027b7f8..2f0cd5c7d 100644 --- a/src/card/base/ReaderManagerPlugInInfo.cpp +++ b/src/card/base/ReaderManagerPlugInInfo.cpp @@ -1,5 +1,5 @@ /*! - * \copyright Copyright (c) 2014-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2014-2018 Governikus GmbH & Co. KG, Germany */ #include "ReaderManagerPlugInInfo.h" @@ -19,6 +19,7 @@ ReaderManagerPlugInInfo::ReaderManagerPlugInInfo(ReaderManagerPlugInType pType, , mValues() , mEnabled(pEnabled) , mAvailable(pAvailable) + , mResponding(true) { } diff --git a/src/card/base/ReaderManagerPlugInInfo.h b/src/card/base/ReaderManagerPlugInInfo.h index c5ba2766c..40fc3fdfb 100644 --- a/src/card/base/ReaderManagerPlugInInfo.h +++ b/src/card/base/ReaderManagerPlugInInfo.h @@ -1,7 +1,7 @@ /*! * \brief Data object providing information about a reader manager plug-in. * - * \copyright Copyright (c) 2014-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2014-2018 Governikus GmbH & Co. KG, Germany */ #pragma once @@ -86,11 +86,24 @@ class ReaderManagerPlugInInfo } + bool isResponding() const + { + return mResponding; + } + + + void setResponding(bool pResponding) + { + mResponding = pResponding; + } + + private: ReaderManagerPlugInType mType; QMap mValues; bool mEnabled; bool mAvailable; + bool mResponding; }; } /* namespace governikus */ diff --git a/src/card/base/ReaderManagerWorker.cpp b/src/card/base/ReaderManagerWorker.cpp index cd860600e..bbcd20c68 100644 --- a/src/card/base/ReaderManagerWorker.cpp +++ b/src/card/base/ReaderManagerWorker.cpp @@ -1,5 +1,5 @@ /*! - * \copyright Copyright (c) 2015-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2015-2018 Governikus GmbH & Co. KG, Germany */ #include "ReaderManagerWorker.h" @@ -103,7 +103,7 @@ void ReaderManagerWorker::registerPlugIn(ReaderManagerPlugIn* pPlugIn) } -void ReaderManagerWorker::startScan(ReaderManagerPlugInType pType) +void ReaderManagerWorker::startScan(ReaderManagerPlugInType pType, bool pAutoConnect) { Q_ASSERT(thread() == QThread::currentThread()); @@ -112,7 +112,7 @@ void ReaderManagerWorker::startScan(ReaderManagerPlugInType pType) if (plugin->getInfo().getPlugInType() == pType) { qCDebug(card) << "Start scan on plugin:" << plugin->metaObject()->className(); - plugin->setConnectToKnownReaders(true); + plugin->setConnectToKnownReaders(pAutoConnect); plugin->startScan(); } } diff --git a/src/card/base/ReaderManagerWorker.h b/src/card/base/ReaderManagerWorker.h index 7378e2b6b..485454bfc 100644 --- a/src/card/base/ReaderManagerWorker.h +++ b/src/card/base/ReaderManagerWorker.h @@ -1,7 +1,7 @@ /*! * \brief Worker implementation of ReaderManger thread * - * \copyright Copyright (c) 2015-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2015-2018 Governikus GmbH & Co. KG, Germany */ #pragma once @@ -37,7 +37,7 @@ class ReaderManagerWorker ReaderManagerWorker(const QSharedPointer& pRemoteClient); ~ReaderManagerWorker(); - Q_INVOKABLE void startScan(ReaderManagerPlugInType pType); + Q_INVOKABLE void startScan(ReaderManagerPlugInType pType, bool pAutoConnect); Q_INVOKABLE void stopScan(ReaderManagerPlugInType pType); Q_INVOKABLE QVector getPlugInInfos() const; diff --git a/src/card/base/RemoteClient.cpp b/src/card/base/RemoteClient.cpp index 03dd12c18..7e2870f5e 100644 --- a/src/card/base/RemoteClient.cpp +++ b/src/card/base/RemoteClient.cpp @@ -1,5 +1,5 @@ /*! - * \copyright Copyright (c) 2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2017-2018 Governikus GmbH & Co. KG, Germany */ #include "RemoteClient.h" diff --git a/src/card/base/RemoteClient.h b/src/card/base/RemoteClient.h index 1540391ba..a108af454 100644 --- a/src/card/base/RemoteClient.h +++ b/src/card/base/RemoteClient.h @@ -2,7 +2,7 @@ * \brief An interface for RemoteClientImpl, meant to omit the * dependency between card_base and remote_device. * - * \copyright Copyright (c) 2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2017-2018 Governikus GmbH & Co. KG, Germany */ #pragma once diff --git a/src/card/base/RemoteDispatcher.cpp b/src/card/base/RemoteDispatcher.cpp index 6cae95b46..1c418295c 100644 --- a/src/card/base/RemoteDispatcher.cpp +++ b/src/card/base/RemoteDispatcher.cpp @@ -1,5 +1,5 @@ /*! - * \copyright Copyright (c) 2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2017-2018 Governikus GmbH & Co. KG, Germany */ #include "RemoteDispatcher.h" diff --git a/src/card/base/RemoteDispatcher.h b/src/card/base/RemoteDispatcher.h index 0c01d1c40..5725af311 100644 --- a/src/card/base/RemoteDispatcher.h +++ b/src/card/base/RemoteDispatcher.h @@ -3,7 +3,7 @@ * \brief An interface for RemoteHandleImpl, meant to omit the * dependency between card_base and remote_device. * - * \copyright Copyright (c) 2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2017-2018 Governikus GmbH & Co. KG, Germany */ #pragma once @@ -34,6 +34,7 @@ class RemoteDispatcher virtual const QString& getId() const = 0; virtual const QString& getContextHandle() const = 0; + virtual void close() = 0; Q_INVOKABLE virtual void send(const QSharedPointer& pMessage) = 0; Q_SIGNALS: diff --git a/src/card/base/SecureMessagingResponse.cpp b/src/card/base/SecureMessagingResponse.cpp index 3331576da..08015dc9a 100644 --- a/src/card/base/SecureMessagingResponse.cpp +++ b/src/card/base/SecureMessagingResponse.cpp @@ -1,5 +1,5 @@ /*! - * \copyright Copyright (c) 2015-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2015-2018 Governikus GmbH & Co. KG, Germany */ #include "asn1/ASN1Util.h" diff --git a/src/card/base/SecureMessagingResponse.h b/src/card/base/SecureMessagingResponse.h index bea143146..8d2e703f4 100644 --- a/src/card/base/SecureMessagingResponse.h +++ b/src/card/base/SecureMessagingResponse.h @@ -1,7 +1,7 @@ /*! * \brief Response APDU for SecureMessaging * - * \copyright Copyright (c) 2015-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2015-2018 Governikus GmbH & Co. KG, Germany */ #pragma once diff --git a/src/card/base/SmartCardDefinitions.cpp b/src/card/base/SmartCardDefinitions.cpp index 62a129d20..e714255f3 100644 --- a/src/card/base/SmartCardDefinitions.cpp +++ b/src/card/base/SmartCardDefinitions.cpp @@ -1,5 +1,5 @@ /*! - * \copyright Copyright (c) 2014-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2014-2018 Governikus GmbH & Co. KG, Germany */ #include "SmartCardDefinitions.h" diff --git a/src/card/base/SmartCardDefinitions.h b/src/card/base/SmartCardDefinitions.h index 55737f678..ad4294d73 100644 --- a/src/card/base/SmartCardDefinitions.h +++ b/src/card/base/SmartCardDefinitions.h @@ -1,5 +1,5 @@ /*! - * \copyright Copyright (c) 2014-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2014-2018 Governikus GmbH & Co. KG, Germany */ #pragma once diff --git a/src/card/base/asn1/ASN1TemplateUtil.h b/src/card/base/asn1/ASN1TemplateUtil.h index 9ee49f46c..4820a532c 100644 --- a/src/card/base/asn1/ASN1TemplateUtil.h +++ b/src/card/base/asn1/ASN1TemplateUtil.h @@ -1,7 +1,7 @@ /*! * \brief Utility template functions for encoding and decoding of ASN.1 types * - * \copyright Copyright (c) 2015-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2015-2018 Governikus GmbH & Co. KG, Germany */ #pragma once diff --git a/src/card/base/asn1/ASN1Util.cpp b/src/card/base/asn1/ASN1Util.cpp index 24d0d7e8a..b40c481bc 100644 --- a/src/card/base/asn1/ASN1Util.cpp +++ b/src/card/base/asn1/ASN1Util.cpp @@ -1,5 +1,5 @@ /* - * \copyright Copyright (c) 2014-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2014-2018 Governikus GmbH & Co. KG, Germany */ #include "asn1/ASN1Util.h" diff --git a/src/card/base/asn1/ASN1Util.h b/src/card/base/asn1/ASN1Util.h index 900728def..32aca02f9 100644 --- a/src/card/base/asn1/ASN1Util.h +++ b/src/card/base/asn1/ASN1Util.h @@ -1,7 +1,7 @@ /*! * \brief Utility functions, templates and other ASN.1 related helper stuff * - * \copyright Copyright (c) 2014-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2014-2018 Governikus GmbH & Co. KG, Germany */ #pragma once diff --git a/src/card/base/asn1/AccessRoleAndRight.cpp b/src/card/base/asn1/AccessRoleAndRight.cpp index 47a5383ca..25cf64d4d 100644 --- a/src/card/base/asn1/AccessRoleAndRight.cpp +++ b/src/card/base/asn1/AccessRoleAndRight.cpp @@ -1,5 +1,5 @@ /*! - * \copyright Copyright (c) 2015-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2015-2018 Governikus GmbH & Co. KG, Germany */ #include "AccessRoleAndRight.h" diff --git a/src/card/base/asn1/AccessRoleAndRight.h b/src/card/base/asn1/AccessRoleAndRight.h index 510c438b6..bb7a39d44 100644 --- a/src/card/base/asn1/AccessRoleAndRight.h +++ b/src/card/base/asn1/AccessRoleAndRight.h @@ -6,7 +6,7 @@ * or otherwise the complain about the qHash() function for AccessRight not being * found. * - * \copyright Copyright (c) 2014-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2014-2018 Governikus GmbH & Co. KG, Germany */ #pragma once diff --git a/src/card/base/asn1/AuthenticatedAuxiliaryData.cpp b/src/card/base/asn1/AuthenticatedAuxiliaryData.cpp index 675cf1c5c..bbf16b22f 100644 --- a/src/card/base/asn1/AuthenticatedAuxiliaryData.cpp +++ b/src/card/base/asn1/AuthenticatedAuxiliaryData.cpp @@ -1,5 +1,5 @@ /*! - * \copyright Copyright (c) 2014-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2014-2018 Governikus GmbH & Co. KG, Germany */ #include "AuthenticatedAuxiliaryData.h" diff --git a/src/card/base/asn1/AuthenticatedAuxiliaryData.h b/src/card/base/asn1/AuthenticatedAuxiliaryData.h index 2b93222f7..9f416f8a5 100644 --- a/src/card/base/asn1/AuthenticatedAuxiliaryData.h +++ b/src/card/base/asn1/AuthenticatedAuxiliaryData.h @@ -1,7 +1,7 @@ /*! * \brief Implementation of AuthenticatedAuxiliaryData. * - * \copyright Copyright (c) 2014-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2014-2018 Governikus GmbH & Co. KG, Germany */ #pragma once diff --git a/src/card/base/asn1/CVCertificate.cpp b/src/card/base/asn1/CVCertificate.cpp index 80d6bc828..cf4c4e0ca 100644 --- a/src/card/base/asn1/CVCertificate.cpp +++ b/src/card/base/asn1/CVCertificate.cpp @@ -1,5 +1,5 @@ /*! - * \copyright Copyright (c) 2014-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2014-2018 Governikus GmbH & Co. KG, Germany */ #include "ASN1TemplateUtil.h" diff --git a/src/card/base/asn1/CVCertificate.h b/src/card/base/asn1/CVCertificate.h index e70e6d935..3f10181cc 100644 --- a/src/card/base/asn1/CVCertificate.h +++ b/src/card/base/asn1/CVCertificate.h @@ -1,7 +1,7 @@ /*! * \brief Implementation of Card Verifiable Certificate, CVC. * - * \copyright Copyright (c) 2014-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2014-2018 Governikus GmbH & Co. KG, Germany */ #pragma once diff --git a/src/card/base/asn1/CVCertificateBody.cpp b/src/card/base/asn1/CVCertificateBody.cpp index ab6a1537c..a3fe04f04 100644 --- a/src/card/base/asn1/CVCertificateBody.cpp +++ b/src/card/base/asn1/CVCertificateBody.cpp @@ -1,5 +1,5 @@ /* - * \copyright Copyright (c) 2014-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2014-2018 Governikus GmbH & Co. KG, Germany */ #include "CVCertificateBody.h" diff --git a/src/card/base/asn1/CVCertificateBody.h b/src/card/base/asn1/CVCertificateBody.h index 57c726a00..2e05a946d 100644 --- a/src/card/base/asn1/CVCertificateBody.h +++ b/src/card/base/asn1/CVCertificateBody.h @@ -1,5 +1,5 @@ /*! - * \copyright Copyright (c) 2014-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2014-2018 Governikus GmbH & Co. KG, Germany */ #pragma once diff --git a/src/card/base/asn1/CVCertificateChain.cpp b/src/card/base/asn1/CVCertificateChain.cpp index 91327063c..8ee579043 100644 --- a/src/card/base/asn1/CVCertificateChain.cpp +++ b/src/card/base/asn1/CVCertificateChain.cpp @@ -1,5 +1,5 @@ /* - * \copyright Copyright (c) 2014-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2014-2018 Governikus GmbH & Co. KG, Germany */ #include "CVCertificateChain.h" diff --git a/src/card/base/asn1/CVCertificateChain.h b/src/card/base/asn1/CVCertificateChain.h index 7d01cbed4..a9b1c5776 100644 --- a/src/card/base/asn1/CVCertificateChain.h +++ b/src/card/base/asn1/CVCertificateChain.h @@ -5,7 +5,7 @@ * (The holder is equivalent to the Subject-DN, the authority reference * is equivalent to the Issuer-DN.) * - * \copyright Copyright (c) 2014-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2014-2018 Governikus GmbH & Co. KG, Germany */ #pragma once diff --git a/src/card/base/asn1/CVCertificateChainBuilder.cpp b/src/card/base/asn1/CVCertificateChainBuilder.cpp index 574546b20..4d586bcc3 100644 --- a/src/card/base/asn1/CVCertificateChainBuilder.cpp +++ b/src/card/base/asn1/CVCertificateChainBuilder.cpp @@ -1,5 +1,5 @@ /* - * \copyright Copyright (c) 2014-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2014-2018 Governikus GmbH & Co. KG, Germany */ #include "CVCertificateChainBuilder.h" diff --git a/src/card/base/asn1/CVCertificateChainBuilder.h b/src/card/base/asn1/CVCertificateChainBuilder.h index ec9729e72..f7b91a973 100644 --- a/src/card/base/asn1/CVCertificateChainBuilder.h +++ b/src/card/base/asn1/CVCertificateChainBuilder.h @@ -1,7 +1,7 @@ /*! * \brief Builder for CVC chains. * - * \copyright Copyright (c) 2014-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2014-2018 Governikus GmbH & Co. KG, Germany */ #pragma once diff --git a/src/card/base/asn1/CertificateDescription.cpp b/src/card/base/asn1/CertificateDescription.cpp index 62a7a23c3..64eddbcf0 100644 --- a/src/card/base/asn1/CertificateDescription.cpp +++ b/src/card/base/asn1/CertificateDescription.cpp @@ -1,5 +1,5 @@ /*! - * \copyright Copyright (c) 2014-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2014-2018 Governikus GmbH & Co. KG, Germany */ #include "CertificateDescription.h" diff --git a/src/card/base/asn1/CertificateDescription.h b/src/card/base/asn1/CertificateDescription.h index 6b93ac63e..cdf2ca1e9 100644 --- a/src/card/base/asn1/CertificateDescription.h +++ b/src/card/base/asn1/CertificateDescription.h @@ -1,7 +1,7 @@ /*! * \brief Implementation of ASN.1 type CertificateDescription with OpenSSL * - * \copyright Copyright (c) 2014-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2014-2018 Governikus GmbH & Co. KG, Germany */ #pragma once diff --git a/src/card/base/asn1/ChainBuilder.h b/src/card/base/asn1/ChainBuilder.h index d4609f4d9..edbf91e6e 100644 --- a/src/card/base/asn1/ChainBuilder.h +++ b/src/card/base/asn1/ChainBuilder.h @@ -5,7 +5,7 @@ * * All found chains are returned by the function /ref ChainBuilder::getChains(). * - * \copyright Copyright (c) 2015-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2015-2018 Governikus GmbH & Co. KG, Germany */ #pragma once diff --git a/src/card/base/asn1/Chat.cpp b/src/card/base/asn1/Chat.cpp index 041d31c3f..0947206e4 100644 --- a/src/card/base/asn1/Chat.cpp +++ b/src/card/base/asn1/Chat.cpp @@ -1,5 +1,5 @@ /*! - * \copyright Copyright (c) 2014-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2014-2018 Governikus GmbH & Co. KG, Germany */ #include "ASN1TemplateUtil.h" diff --git a/src/card/base/asn1/Chat.h b/src/card/base/asn1/Chat.h index 7cbfeeec6..6fc886fe7 100644 --- a/src/card/base/asn1/Chat.h +++ b/src/card/base/asn1/Chat.h @@ -1,7 +1,7 @@ /*! * \brief Implementation of Certificate Holder Authorization Template, CHAT. * - * \copyright Copyright (c) 2014-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2014-2018 Governikus GmbH & Co. KG, Germany */ #pragma once diff --git a/src/card/base/asn1/ChipAuthenticationInfo.cpp b/src/card/base/asn1/ChipAuthenticationInfo.cpp index df47a9a56..1ff509394 100644 --- a/src/card/base/asn1/ChipAuthenticationInfo.cpp +++ b/src/card/base/asn1/ChipAuthenticationInfo.cpp @@ -1,5 +1,5 @@ /*! - * \copyright Copyright (c) 2015-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2015-2018 Governikus GmbH & Co. KG, Germany */ #include "ASN1TemplateUtil.h" diff --git a/src/card/base/asn1/ChipAuthenticationInfo.h b/src/card/base/asn1/ChipAuthenticationInfo.h index 30f9fa703..db00554f0 100644 --- a/src/card/base/asn1/ChipAuthenticationInfo.h +++ b/src/card/base/asn1/ChipAuthenticationInfo.h @@ -1,7 +1,7 @@ /*! * \brief Implementation of ChipAuthenticationInfo * - * \copyright Copyright (c) 2015-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2015-2018 Governikus GmbH & Co. KG, Germany */ #pragma once diff --git a/src/card/base/asn1/EFCardSecurity.cpp b/src/card/base/asn1/EFCardSecurity.cpp index 34e7b8a4d..a41ebdea1 100644 --- a/src/card/base/asn1/EFCardSecurity.cpp +++ b/src/card/base/asn1/EFCardSecurity.cpp @@ -1,5 +1,5 @@ /*! - * \copyright Copyright (c) 2015-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2015-2018 Governikus GmbH & Co. KG, Germany */ #include "ASN1TemplateUtil.h" diff --git a/src/card/base/asn1/EFCardSecurity.h b/src/card/base/asn1/EFCardSecurity.h index b7f9193c5..3692e1445 100644 --- a/src/card/base/asn1/EFCardSecurity.h +++ b/src/card/base/asn1/EFCardSecurity.h @@ -1,7 +1,7 @@ /*! * \brief Implementation of EFCardSecurity * - * \copyright Copyright (c) 2015-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2015-2018 Governikus GmbH & Co. KG, Germany */ diff --git a/src/card/base/asn1/EcdsaPublicKey.cpp b/src/card/base/asn1/EcdsaPublicKey.cpp index a91d5d64e..bbcefd03c 100644 --- a/src/card/base/asn1/EcdsaPublicKey.cpp +++ b/src/card/base/asn1/EcdsaPublicKey.cpp @@ -1,5 +1,5 @@ /*! - * \copyright Copyright (c) 2014-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2014-2018 Governikus GmbH & Co. KG, Germany */ #include "ASN1TemplateUtil.h" diff --git a/src/card/base/asn1/EcdsaPublicKey.h b/src/card/base/asn1/EcdsaPublicKey.h index 9a10a580c..55f113b3d 100644 --- a/src/card/base/asn1/EcdsaPublicKey.h +++ b/src/card/base/asn1/EcdsaPublicKey.h @@ -1,5 +1,5 @@ /*! - * \copyright Copyright (c) 2014-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2014-2018 Governikus GmbH & Co. KG, Germany */ #pragma once diff --git a/src/card/base/asn1/KnownOIDs.cpp b/src/card/base/asn1/KnownOIDs.cpp index 27c15d3c1..3fd3c5e49 100644 --- a/src/card/base/asn1/KnownOIDs.cpp +++ b/src/card/base/asn1/KnownOIDs.cpp @@ -1,5 +1,5 @@ /*! - * \copyright Copyright (c) 2017 Governikus GmbH & Co. KG + * \copyright Copyright (c) 2017-2018 Governikus GmbH & Co. KG, Germany */ #include "KnownOIDs.h" diff --git a/src/card/base/asn1/KnownOIDs.h b/src/card/base/asn1/KnownOIDs.h index d7af50049..2381c2be7 100644 --- a/src/card/base/asn1/KnownOIDs.h +++ b/src/card/base/asn1/KnownOIDs.h @@ -1,5 +1,5 @@ /*! - * \copyright Copyright (c) 2014-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2014-2018 Governikus GmbH & Co. KG, Germany */ #pragma once diff --git a/src/card/base/asn1/PACEInfo.cpp b/src/card/base/asn1/PACEInfo.cpp index 910df5121..4739b3b67 100644 --- a/src/card/base/asn1/PACEInfo.cpp +++ b/src/card/base/asn1/PACEInfo.cpp @@ -1,5 +1,5 @@ /*! - * \copyright Copyright (c) 2015-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2015-2018 Governikus GmbH & Co. KG, Germany */ diff --git a/src/card/base/asn1/PACEInfo.h b/src/card/base/asn1/PACEInfo.h index a231db562..bf286605b 100644 --- a/src/card/base/asn1/PACEInfo.h +++ b/src/card/base/asn1/PACEInfo.h @@ -1,7 +1,7 @@ /*! * \brief Implementation of PACEInfo * - * \copyright Copyright (c) 2015-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2015-2018 Governikus GmbH & Co. KG, Germany */ #pragma once diff --git a/src/card/base/asn1/SecurityInfo.cpp b/src/card/base/asn1/SecurityInfo.cpp index 91938efd3..b0e893d46 100644 --- a/src/card/base/asn1/SecurityInfo.cpp +++ b/src/card/base/asn1/SecurityInfo.cpp @@ -1,5 +1,5 @@ /*! - * \copyright Copyright (c) 2014-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2014-2018 Governikus GmbH & Co. KG, Germany */ #include "ASN1TemplateUtil.h" diff --git a/src/card/base/asn1/SecurityInfo.h b/src/card/base/asn1/SecurityInfo.h index d033a945b..2d7289765 100644 --- a/src/card/base/asn1/SecurityInfo.h +++ b/src/card/base/asn1/SecurityInfo.h @@ -1,7 +1,7 @@ /*! * \brief Implementation of SecurityInfo * - * \copyright Copyright (c) 2014-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2014-2018 Governikus GmbH & Co. KG, Germany */ #pragma once diff --git a/src/card/base/asn1/SecurityInfos.cpp b/src/card/base/asn1/SecurityInfos.cpp index aecdb8f15..aa9f12ed2 100644 --- a/src/card/base/asn1/SecurityInfos.cpp +++ b/src/card/base/asn1/SecurityInfos.cpp @@ -1,5 +1,5 @@ /*! - * \copyright Copyright (c) 2014-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2014-2018 Governikus GmbH & Co. KG, Germany */ #include "ASN1TemplateUtil.h" diff --git a/src/card/base/asn1/SecurityInfos.h b/src/card/base/asn1/SecurityInfos.h index 80be31861..7f7b8a6a4 100644 --- a/src/card/base/asn1/SecurityInfos.h +++ b/src/card/base/asn1/SecurityInfos.h @@ -1,7 +1,7 @@ /*! * \brief Implementation of SecurityInfos * - * \copyright Copyright (c) 2014-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2014-2018 Governikus GmbH & Co. KG, Germany */ #pragma once diff --git a/src/card/base/asn1/SignatureChecker.cpp b/src/card/base/asn1/SignatureChecker.cpp index 6456a7ab2..8c181042f 100644 --- a/src/card/base/asn1/SignatureChecker.cpp +++ b/src/card/base/asn1/SignatureChecker.cpp @@ -1,5 +1,5 @@ /*! - * \copyright Copyright (c) 2014-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2014-2018 Governikus GmbH & Co. KG, Germany */ #include "asn1/SignatureChecker.h" diff --git a/src/card/base/asn1/SignatureChecker.h b/src/card/base/asn1/SignatureChecker.h index 94fe6fb9a..c55d6ecf0 100644 --- a/src/card/base/asn1/SignatureChecker.h +++ b/src/card/base/asn1/SignatureChecker.h @@ -1,5 +1,5 @@ /*! - * \copyright Copyright (c) 2014-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2014-2018 Governikus GmbH & Co. KG, Germany */ #pragma once diff --git a/src/card/base/command/BaseCardCommand.cpp b/src/card/base/command/BaseCardCommand.cpp index d43f50aa4..2416a0b34 100644 --- a/src/card/base/command/BaseCardCommand.cpp +++ b/src/card/base/command/BaseCardCommand.cpp @@ -1,5 +1,5 @@ /*! - * \copyright Copyright (c) 2014-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2014-2018 Governikus GmbH & Co. KG, Germany */ #include "BaseCardCommand.h" diff --git a/src/card/base/command/BaseCardCommand.h b/src/card/base/command/BaseCardCommand.h index 627267c84..4d95dde95 100644 --- a/src/card/base/command/BaseCardCommand.h +++ b/src/card/base/command/BaseCardCommand.h @@ -1,7 +1,7 @@ /*! * \brief Holds some basic card control commands * - * \copyright Copyright (c) 2014-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2014-2018 Governikus GmbH & Co. KG, Germany */ #pragma once diff --git a/src/card/base/command/CreateCardConnectionCommand.cpp b/src/card/base/command/CreateCardConnectionCommand.cpp index ca6bbccb4..1b36fa573 100644 --- a/src/card/base/command/CreateCardConnectionCommand.cpp +++ b/src/card/base/command/CreateCardConnectionCommand.cpp @@ -1,5 +1,5 @@ /*! - * \copyright Copyright (c) 2015-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2015-2018 Governikus GmbH & Co. KG, Germany */ #include "CreateCardConnectionCommand.h" diff --git a/src/card/base/command/CreateCardConnectionCommand.h b/src/card/base/command/CreateCardConnectionCommand.h index b946eb938..bd5bbaca3 100644 --- a/src/card/base/command/CreateCardConnectionCommand.h +++ b/src/card/base/command/CreateCardConnectionCommand.h @@ -1,7 +1,7 @@ /*! * \brief Command implementation for asynchronous CardConnection creation * - * \copyright Copyright (c) 2015-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2015-2018 Governikus GmbH & Co. KG, Germany */ #pragma once diff --git a/src/card/base/command/DestroyPaceChannelCommand.cpp b/src/card/base/command/DestroyPaceChannelCommand.cpp index aff3de9a3..7d16f8cc6 100644 --- a/src/card/base/command/DestroyPaceChannelCommand.cpp +++ b/src/card/base/command/DestroyPaceChannelCommand.cpp @@ -1,5 +1,5 @@ /*! - * \copyright Copyright (c) 2015-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2015-2018 Governikus GmbH & Co. KG, Germany */ #include "CardConnection.h" diff --git a/src/card/base/command/DestroyPaceChannelCommand.h b/src/card/base/command/DestroyPaceChannelCommand.h index 6df37449d..4f6b5e273 100644 --- a/src/card/base/command/DestroyPaceChannelCommand.h +++ b/src/card/base/command/DestroyPaceChannelCommand.h @@ -1,7 +1,7 @@ /*! * \brief Command to destroy a Pace channel. * - * \copyright Copyright (c) 2015-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2015-2018 Governikus GmbH & Co. KG, Germany */ #pragma once diff --git a/src/card/base/command/DidAuthenticateEAC1Command.cpp b/src/card/base/command/DidAuthenticateEAC1Command.cpp index 20760d929..6c0acca28 100644 --- a/src/card/base/command/DidAuthenticateEAC1Command.cpp +++ b/src/card/base/command/DidAuthenticateEAC1Command.cpp @@ -1,5 +1,5 @@ /*! - * \copyright Copyright (c) 2014-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2014-2018 Governikus GmbH & Co. KG, Germany */ #include "BaseCardCommand.h" diff --git a/src/card/base/command/DidAuthenticateEAC1Command.h b/src/card/base/command/DidAuthenticateEAC1Command.h index d7497ba53..4be0064b8 100644 --- a/src/card/base/command/DidAuthenticateEAC1Command.h +++ b/src/card/base/command/DidAuthenticateEAC1Command.h @@ -1,7 +1,7 @@ /*! * \brief Command to perform the DID Authenticate EAC1 process. * - * \copyright Copyright (c) 2014-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2014-2018 Governikus GmbH & Co. KG, Germany */ #pragma once diff --git a/src/card/base/command/DidAuthenticateEAC2Command.cpp b/src/card/base/command/DidAuthenticateEAC2Command.cpp index e0f85e7ec..ce66b0dd0 100644 --- a/src/card/base/command/DidAuthenticateEAC2Command.cpp +++ b/src/card/base/command/DidAuthenticateEAC2Command.cpp @@ -1,5 +1,5 @@ /*! - * \copyright Copyright (c) 2014-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2014-2018 Governikus GmbH & Co. KG, Germany */ #include "DidAuthenticateEAC2Command.h" diff --git a/src/card/base/command/DidAuthenticateEAC2Command.h b/src/card/base/command/DidAuthenticateEAC2Command.h index 873c0e4c9..1d2eb33b0 100644 --- a/src/card/base/command/DidAuthenticateEAC2Command.h +++ b/src/card/base/command/DidAuthenticateEAC2Command.h @@ -1,7 +1,7 @@ /*! * \brief Command to perform the DID Authenticate EAC2 process. * - * \copyright Copyright (c) 2014-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2014-2018 Governikus GmbH & Co. KG, Germany */ #pragma once diff --git a/src/card/base/command/EstablishPaceChannelCommand.cpp b/src/card/base/command/EstablishPaceChannelCommand.cpp index accb16639..0a4bbeab6 100644 --- a/src/card/base/command/EstablishPaceChannelCommand.cpp +++ b/src/card/base/command/EstablishPaceChannelCommand.cpp @@ -1,5 +1,5 @@ /*! - * \copyright Copyright (c) 2015-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2015-2018 Governikus GmbH & Co. KG, Germany */ #include "CardConnection.h" diff --git a/src/card/base/command/EstablishPaceChannelCommand.h b/src/card/base/command/EstablishPaceChannelCommand.h index 36b8ccdb7..1f4178ab5 100644 --- a/src/card/base/command/EstablishPaceChannelCommand.h +++ b/src/card/base/command/EstablishPaceChannelCommand.h @@ -1,7 +1,7 @@ /*! * \brief Command to change the PIN of a card. * - * \copyright Copyright (c) 2015-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2015-2018 Governikus GmbH & Co. KG, Germany */ #pragma once diff --git a/src/card/base/command/SetEidPinCommand.cpp b/src/card/base/command/SetEidPinCommand.cpp index afbab7775..121d2a584 100644 --- a/src/card/base/command/SetEidPinCommand.cpp +++ b/src/card/base/command/SetEidPinCommand.cpp @@ -1,5 +1,5 @@ /*! - * \copyright Copyright (c) 2015-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2015-2018 Governikus GmbH & Co. KG, Germany */ #include "CardConnection.h" @@ -14,6 +14,7 @@ SetEidPinCommand::SetEidPinCommand(QSharedPointer pCardCon : BaseCardCommand(pCardConnectionWorker) , mNewPin(pNewPin) , mTimeoutSeconds(pTimeoutSeconds) + , mResponseApdu() { } @@ -25,5 +26,11 @@ SetEidPinCommand::~SetEidPinCommand() void SetEidPinCommand::internalExecute() { - mReturnCode = mCardConnectionWorker->setEidPin(mNewPin, mTimeoutSeconds); + mReturnCode = mCardConnectionWorker->setEidPin(mNewPin, mTimeoutSeconds, mResponseApdu); +} + + +const ResponseApdu& SetEidPinCommand::getResponseApdu() const +{ + return mResponseApdu; } diff --git a/src/card/base/command/SetEidPinCommand.h b/src/card/base/command/SetEidPinCommand.h index b46fedd4c..10d90494f 100644 --- a/src/card/base/command/SetEidPinCommand.h +++ b/src/card/base/command/SetEidPinCommand.h @@ -1,7 +1,7 @@ /*! * \brief Command to set the Eid PIN of a card. * - * \copyright Copyright (c) 2015-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2015-2018 Governikus GmbH & Co. KG, Germany */ #pragma once @@ -21,6 +21,7 @@ class SetEidPinCommand private: QString mNewPin; quint8 mTimeoutSeconds; + ResponseApdu mResponseApdu; protected: virtual void internalExecute() override; @@ -29,6 +30,8 @@ class SetEidPinCommand public: SetEidPinCommand(QSharedPointer pCardConnectionWorker, const QString& pNewPin, quint8 pTimeoutSeconds); + + const ResponseApdu& getResponseApdu() const; }; } /* namespace governikus */ diff --git a/src/card/base/command/TransmitCommand.cpp b/src/card/base/command/TransmitCommand.cpp index 5d0b55eb1..1fe84a02f 100644 --- a/src/card/base/command/TransmitCommand.cpp +++ b/src/card/base/command/TransmitCommand.cpp @@ -1,5 +1,5 @@ /*! - * \copyright Copyright (c) 2014-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2014-2018 Governikus GmbH & Co. KG, Germany */ #include "TransmitCommand.h" @@ -17,10 +17,11 @@ using namespace governikus; TransmitCommand::TransmitCommand(QSharedPointer pCardConnectionWorker, - const QVector& pInputApduInfos) + const QVector& pInputApduInfos, + const QString pSlotHandle) : BaseCardCommand(pCardConnectionWorker) , mInputApduInfos(pInputApduInfos) - , mReaderName(pCardConnectionWorker->getReaderInfo().getName()) + , mSlotHandle(pSlotHandle) , mOutputApduAsHex() { } @@ -32,6 +33,26 @@ TransmitCommand::~TransmitCommand() } +bool TransmitCommand::isAcceptable(const InputAPDUInfo& pInputApduInfo, const ResponseApdu& pResponse) +{ + if (pInputApduInfo.getAcceptableStatusCodes().isEmpty()) + { + return true; + } + + for (const QByteArray& acceptableStatusCodeAsHex : pInputApduInfo.getAcceptableStatusCodes()) + { + // according to TR-03112-6 chapter 3.2.5 + if (pResponse.getReturnCodeAsHex().startsWith(acceptableStatusCodeAsHex)) + { + return true; + } + } + + return false; +} + + void TransmitCommand::internalExecute() { Q_ASSERT(!mInputApduInfos.isEmpty()); @@ -49,27 +70,14 @@ void TransmitCommand::internalExecute() } mOutputApduAsHex += response.getBuffer().toHex(); - if (!inputApduInfo.getAcceptableStatusCodes().isEmpty()) + if (isAcceptable(inputApduInfo, response)) { - bool isAcceptable = false; - - for (const QByteArray& acceptableStatusCodeAsHex : inputApduInfo.getAcceptableStatusCodes()) - { - // according to TR-03112-6 chapter 3.2.5 - if (response.getReturnCodeAsHex() == acceptableStatusCodeAsHex) - { - isAcceptable = true; - break; - } - } - - if (!isAcceptable) - { - qCWarning(card) << "Transmit unsuccessful. StatusCode does not start with acceptable status code" << inputApduInfo.getAcceptableStatusCodes(); - mReturnCode = CardReturnCode::UNEXPECTED_TRANSMIT_STATUS; - return; - } + continue; } + + qCWarning(card) << "Transmit unsuccessful. StatusCode does not start with acceptable status code" << inputApduInfo.getAcceptableStatusCodes(); + mReturnCode = CardReturnCode::UNEXPECTED_TRANSMIT_STATUS; + return; } qCDebug(card) << "transmit end"; mReturnCode = CardReturnCode::OK; diff --git a/src/card/base/command/TransmitCommand.h b/src/card/base/command/TransmitCommand.h index 854a0068a..1b6eacce7 100644 --- a/src/card/base/command/TransmitCommand.h +++ b/src/card/base/command/TransmitCommand.h @@ -1,7 +1,7 @@ /*! * \brief Command to transmit data to/from the card. * - * \copyright Copyright (c) 2014-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2014-2018 Governikus GmbH & Co. KG, Germany */ #pragma once @@ -9,6 +9,8 @@ #include "BaseCardCommand.h" #include "InputAPDUInfo.h" +class test_TransmitCommand; + namespace governikus { @@ -20,17 +22,22 @@ class TransmitCommand Q_OBJECT private: + friend class ::test_TransmitCommand; + const QVector mInputApduInfos; - const QString mReaderName; + const QString mSlotHandle; QByteArrayList mOutputApduAsHex; + static bool isAcceptable(const InputAPDUInfo& pInputApduInfo, const ResponseApdu& pResponse); + protected: virtual void internalExecute() override; virtual ~TransmitCommand() override; public: TransmitCommand(QSharedPointer pCardConnectionWorker, - const QVector& pInputApduInfos); + const QVector& pInputApduInfos, + const QString pSlotHandle); const QByteArrayList& getOutputApduAsHex() const { @@ -38,9 +45,9 @@ class TransmitCommand } - const QString& getReaderName() const + const QString& getSlotHandle() const { - return mReaderName; + return mSlotHandle; } diff --git a/src/card/base/command/UnblockPinCommand.cpp b/src/card/base/command/UnblockPinCommand.cpp index bdbd55807..708b3aa6b 100644 --- a/src/card/base/command/UnblockPinCommand.cpp +++ b/src/card/base/command/UnblockPinCommand.cpp @@ -1,5 +1,5 @@ /*! - * \copyright Copyright (c) 2014-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2014-2018 Governikus GmbH & Co. KG, Germany */ #include "CardConnection.h" diff --git a/src/card/base/command/UnblockPinCommand.h b/src/card/base/command/UnblockPinCommand.h index ad1f80891..ebb0c3646 100644 --- a/src/card/base/command/UnblockPinCommand.h +++ b/src/card/base/command/UnblockPinCommand.h @@ -1,7 +1,7 @@ /*! * \brief Command to unblock the PIN of a card. * - * \copyright Copyright (c) 2014-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2014-2018 Governikus GmbH & Co. KG, Germany */ #pragma once diff --git a/src/card/base/command/UpdateRetryCounterCommand.cpp b/src/card/base/command/UpdateRetryCounterCommand.cpp index 8e7c92f12..84594ddd0 100644 --- a/src/card/base/command/UpdateRetryCounterCommand.cpp +++ b/src/card/base/command/UpdateRetryCounterCommand.cpp @@ -1,5 +1,5 @@ /*! - * \copyright Copyright (c) 2014-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2014-2018 Governikus GmbH & Co. KG, Germany */ #include "CardConnection.h" diff --git a/src/card/base/command/UpdateRetryCounterCommand.h b/src/card/base/command/UpdateRetryCounterCommand.h index 1eaa326b2..084f0246f 100644 --- a/src/card/base/command/UpdateRetryCounterCommand.h +++ b/src/card/base/command/UpdateRetryCounterCommand.h @@ -1,7 +1,7 @@ /*! * \brief Command to update the retry counter of a card. * - * \copyright Copyright (c) 2014-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2014-2018 Governikus GmbH & Co. KG, Germany */ #pragma once diff --git a/src/card/base/pace/CipherMac.cpp b/src/card/base/pace/CipherMac.cpp index a0889ae71..3281a0156 100644 --- a/src/card/base/pace/CipherMac.cpp +++ b/src/card/base/pace/CipherMac.cpp @@ -1,5 +1,5 @@ /*! - * \copyright Copyright (c) 2014-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2014-2018 Governikus GmbH & Co. KG, Germany */ #include "asn1/KnownOIDs.h" diff --git a/src/card/base/pace/CipherMac.h b/src/card/base/pace/CipherMac.h index e328387ec..d60239e3b 100644 --- a/src/card/base/pace/CipherMac.h +++ b/src/card/base/pace/CipherMac.h @@ -1,7 +1,7 @@ /*! * \brief CMAC implementation to be used in PACE protocol. See TR 03110. * - * \copyright Copyright (c) 2014-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2014-2018 Governikus GmbH & Co. KG, Germany */ #pragma once diff --git a/src/card/base/pace/DomainParameterMapping.h b/src/card/base/pace/DomainParameterMapping.h index e7e77faba..9aef6fea7 100644 --- a/src/card/base/pace/DomainParameterMapping.h +++ b/src/card/base/pace/DomainParameterMapping.h @@ -1,7 +1,7 @@ /*! * \brief Mapping protocol for PACE domain parameters. For details see TR 03110. * - * \copyright Copyright (c) 2014-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2014-2018 Governikus GmbH & Co. KG, Germany */ #pragma once diff --git a/src/card/base/pace/EstablishPACEChannelCode.h b/src/card/base/pace/EstablishPACEChannelCode.h index 953a64da5..6524d999d 100644 --- a/src/card/base/pace/EstablishPACEChannelCode.h +++ b/src/card/base/pace/EstablishPACEChannelCode.h @@ -1,7 +1,7 @@ /*! * \brief EstablishPACEChannel error code definitions * - * \copyright Copyright (c) 2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2017-2018 Governikus GmbH & Co. KG, Germany */ #pragma once @@ -50,10 +50,10 @@ defineTypedEnumType(EstablishPACEChannelErrorCode, quint32, // 0xF000SW1SW2 // Read Binary EF.CardAccess // 0xF001SW1SW2 - // MSE: Set AT für PACE + // MSE: Set AT for PACE // 0xF002SW1SW2 // General Authenticate Step 1 - 4 - // 0xF003SW1SW2 – 0xF006SW1SW2 + // 0xF003SW1SW2 - 0xF006SW1SW2 // A specific case with "SW1 == 0x63 == warning" and a "dummy SW2". GeneralAuthenticateStep1_4_Warning diff --git a/src/card/base/pace/KeyAgreement.cpp b/src/card/base/pace/KeyAgreement.cpp index e42db44f6..d311bb30e 100644 --- a/src/card/base/pace/KeyAgreement.cpp +++ b/src/card/base/pace/KeyAgreement.cpp @@ -1,5 +1,5 @@ /*! - * \copyright Copyright (c) 2014-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2014-2018 Governikus GmbH & Co. KG, Germany */ diff --git a/src/card/base/pace/KeyAgreement.h b/src/card/base/pace/KeyAgreement.h index 988261951..aac6ca8d4 100644 --- a/src/card/base/pace/KeyAgreement.h +++ b/src/card/base/pace/KeyAgreement.h @@ -1,7 +1,7 @@ /*! * \brief the key agreement protocol use in PACE. For details see TR 03110. * - * \copyright Copyright (c) 2014-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2014-2018 Governikus GmbH & Co. KG, Germany */ #pragma once diff --git a/src/card/base/pace/KeyDerivationFunction.cpp b/src/card/base/pace/KeyDerivationFunction.cpp index 3ff1eebdb..8815f80a3 100644 --- a/src/card/base/pace/KeyDerivationFunction.cpp +++ b/src/card/base/pace/KeyDerivationFunction.cpp @@ -1,5 +1,5 @@ /*! - * \copyright Copyright (c) 2014-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2014-2018 Governikus GmbH & Co. KG, Germany */ #include "asn1/KnownOIDs.h" diff --git a/src/card/base/pace/KeyDerivationFunction.h b/src/card/base/pace/KeyDerivationFunction.h index bf065921f..5091dbe08 100644 --- a/src/card/base/pace/KeyDerivationFunction.h +++ b/src/card/base/pace/KeyDerivationFunction.h @@ -1,7 +1,7 @@ /*! * \brief Creates key according to TR 03110 Part 3 chapters A.2.3 ff. * - * \copyright Copyright (c) 2014-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2014-2018 Governikus GmbH & Co. KG, Germany */ #pragma once diff --git a/src/card/base/pace/PaceHandler.cpp b/src/card/base/pace/PaceHandler.cpp index ce3536702..dfbffe3d9 100644 --- a/src/card/base/pace/PaceHandler.cpp +++ b/src/card/base/pace/PaceHandler.cpp @@ -1,5 +1,5 @@ /*! - * \copyright Copyright (c) 2014-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2014-2018 Governikus GmbH & Co. KG, Germany */ #include "pace/PaceHandler.h" diff --git a/src/card/base/pace/PaceHandler.h b/src/card/base/pace/PaceHandler.h index be1b8f5a7..881c8f6b5 100644 --- a/src/card/base/pace/PaceHandler.h +++ b/src/card/base/pace/PaceHandler.h @@ -1,7 +1,7 @@ /*! * \brief Handler for the PACE protocol. See TR-03110. * - * \copyright Copyright (c) 2014-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2014-2018 Governikus GmbH & Co. KG, Germany */ #pragma once diff --git a/src/card/base/pace/SecureMessaging.cpp b/src/card/base/pace/SecureMessaging.cpp index f00580c1f..53000db0e 100644 --- a/src/card/base/pace/SecureMessaging.cpp +++ b/src/card/base/pace/SecureMessaging.cpp @@ -1,5 +1,5 @@ /*! - * \copyright Copyright (c) 2014-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2014-2018 Governikus GmbH & Co. KG, Germany */ #include "asn1/ASN1Util.h" diff --git a/src/card/base/pace/SecureMessaging.h b/src/card/base/pace/SecureMessaging.h index dfb162607..6ef1968c7 100644 --- a/src/card/base/pace/SecureMessaging.h +++ b/src/card/base/pace/SecureMessaging.h @@ -1,7 +1,7 @@ /*! * \brief Implements TR-03110 v2 part3 --> Secure Messaging. * - * \copyright Copyright (c) 2014-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2014-2018 Governikus GmbH & Co. KG, Germany */ #pragma once diff --git a/src/card/base/pace/SymmetricCipher.cpp b/src/card/base/pace/SymmetricCipher.cpp index ac9030552..f6cde06f5 100644 --- a/src/card/base/pace/SymmetricCipher.cpp +++ b/src/card/base/pace/SymmetricCipher.cpp @@ -1,5 +1,5 @@ /*! - * \copyright Copyright (c) 2014-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2014-2018 Governikus GmbH & Co. KG, Germany */ #include "asn1/KnownOIDs.h" diff --git a/src/card/base/pace/SymmetricCipher.h b/src/card/base/pace/SymmetricCipher.h index 89403e429..6bd681f2e 100644 --- a/src/card/base/pace/SymmetricCipher.h +++ b/src/card/base/pace/SymmetricCipher.h @@ -1,7 +1,7 @@ /*! * \brief Symmetric decryption method used for PACE. * - * \copyright Copyright (c) 2014-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2014-2018 Governikus GmbH & Co. KG, Germany */ #pragma once diff --git a/src/card/base/pace/ec/EcUtil.h b/src/card/base/pace/ec/EcUtil.h index c3392ff09..d09dc1195 100644 --- a/src/card/base/pace/ec/EcUtil.h +++ b/src/card/base/pace/ec/EcUtil.h @@ -1,7 +1,7 @@ /*! * \brief Elliptic curve utility. * - * \copyright Copyright (c) 2014-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2014-2018 Governikus GmbH & Co. KG, Germany */ #pragma once diff --git a/src/card/base/pace/ec/EcdhGenericMapping.cpp b/src/card/base/pace/ec/EcdhGenericMapping.cpp index 5bc484b50..a363d862f 100644 --- a/src/card/base/pace/ec/EcdhGenericMapping.cpp +++ b/src/card/base/pace/ec/EcdhGenericMapping.cpp @@ -1,5 +1,5 @@ /*! - * \copyright Copyright (c) 2014-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2014-2018 Governikus GmbH & Co. KG, Germany */ #include diff --git a/src/card/base/pace/ec/EcdhGenericMapping.h b/src/card/base/pace/ec/EcdhGenericMapping.h index 5e67edf80..45716b6c9 100644 --- a/src/card/base/pace/ec/EcdhGenericMapping.h +++ b/src/card/base/pace/ec/EcdhGenericMapping.h @@ -1,5 +1,5 @@ /*! - * \copyright Copyright (c) 2014-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2014-2018 Governikus GmbH & Co. KG, Germany */ #pragma once diff --git a/src/card/base/pace/ec/EcdhKeyAgreement.cpp b/src/card/base/pace/ec/EcdhKeyAgreement.cpp index f9705781f..0d245a7eb 100644 --- a/src/card/base/pace/ec/EcdhKeyAgreement.cpp +++ b/src/card/base/pace/ec/EcdhKeyAgreement.cpp @@ -1,5 +1,5 @@ /*! - * \copyright Copyright (c) 2014-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2014-2018 Governikus GmbH & Co. KG, Germany */ #include "asn1/KnownOIDs.h" diff --git a/src/card/base/pace/ec/EcdhKeyAgreement.h b/src/card/base/pace/ec/EcdhKeyAgreement.h index 7f0add6cb..345a96535 100644 --- a/src/card/base/pace/ec/EcdhKeyAgreement.h +++ b/src/card/base/pace/ec/EcdhKeyAgreement.h @@ -1,5 +1,5 @@ /*! - * \copyright Copyright (c) 2014-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2014-2018 Governikus GmbH & Co. KG, Germany */ #pragma once diff --git a/src/card/base/pace/ec/EllipticCurveFactory.cpp b/src/card/base/pace/ec/EllipticCurveFactory.cpp index aa381c880..2daa2ddfe 100644 --- a/src/card/base/pace/ec/EllipticCurveFactory.cpp +++ b/src/card/base/pace/ec/EllipticCurveFactory.cpp @@ -1,5 +1,5 @@ /*! - * \copyright Copyright (c) 2014-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2014-2018 Governikus GmbH & Co. KG, Germany */ #include diff --git a/src/card/base/pace/ec/EllipticCurveFactory.h b/src/card/base/pace/ec/EllipticCurveFactory.h index 80e0ac64a..6a67e5e6d 100644 --- a/src/card/base/pace/ec/EllipticCurveFactory.h +++ b/src/card/base/pace/ec/EllipticCurveFactory.h @@ -1,5 +1,5 @@ /*! - * \copyright Copyright (c) 2014-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2014-2018 Governikus GmbH & Co. KG, Germany */ #pragma once diff --git a/src/card/bluetooth/AndroidBluetoothAdapter.cpp b/src/card/bluetooth/AndroidBluetoothAdapter.cpp index 5c371faea..b06434138 100644 --- a/src/card/bluetooth/AndroidBluetoothAdapter.cpp +++ b/src/card/bluetooth/AndroidBluetoothAdapter.cpp @@ -1,5 +1,5 @@ /*! - * \copyright Copyright (c) 2015-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2015-2018 Governikus GmbH & Co. KG, Germany */ #include "AndroidBluetoothAdapter.h" diff --git a/src/card/bluetooth/AndroidBluetoothAdapter.h b/src/card/bluetooth/AndroidBluetoothAdapter.h index 7f1c8b9e5..a36fef212 100644 --- a/src/card/bluetooth/AndroidBluetoothAdapter.h +++ b/src/card/bluetooth/AndroidBluetoothAdapter.h @@ -1,7 +1,7 @@ /*! * \brief This class accesses the java class android.bluetooth.BluetoothAdapter * - * \copyright Copyright (c) 2015-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2015-2018 Governikus GmbH & Co. KG, Germany */ #pragma once diff --git a/src/card/bluetooth/AndroidBluetoothReceiver.java b/src/card/bluetooth/AndroidBluetoothReceiver.java index 50930b584..9971d493d 100644 --- a/src/card/bluetooth/AndroidBluetoothReceiver.java +++ b/src/card/bluetooth/AndroidBluetoothReceiver.java @@ -1,5 +1,5 @@ /* - * \copyright Copyright (c) 2015-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2015-2018 Governikus GmbH & Co. KG, Germany */ package com.governikus.ausweisapp2; @@ -12,7 +12,7 @@ import android.util.Log; -public class AndroidBluetoothReceiver extends BroadcastReceiver +public final class AndroidBluetoothReceiver extends BroadcastReceiver { public enum BluetoothAdapterState @@ -23,33 +23,42 @@ public enum BluetoothAdapterState STATE_TURNING_OFF(BluetoothAdapter.STATE_TURNING_OFF), STATE_TURNING_ON(BluetoothAdapter.STATE_TURNING_ON); - public int value; + private final int mValue; - private BluetoothAdapterState(int value) + BluetoothAdapterState(int pValue) { - this.value = value; + mValue = pValue; } - public static BluetoothAdapterState forInt(int value) + public static BluetoothAdapterState forInt(int pValue) { for (BluetoothAdapterState state : BluetoothAdapterState.values()) { - if (state.value == value) + if (state.getValue() == pValue) { return state; } } - Log.e(LOG_TAG, "Unknown state " + value); + + Log.e(AusweisApp2Service.LOG_TAG, "Unknown state " + pValue); return STATE_UNKNOWN; } - } + int getValue() + { + return mValue; + } - private static final String LOG_TAG = "AusweisApp2"; - private static final BroadcastReceiver singleInstance = new AndroidBluetoothReceiver(); + } + + private static final String LOG_TAG = AusweisApp2Service.LOG_TAG; + private static final class InstanceHolder + { + static final BroadcastReceiver INSTANCE = new AndroidBluetoothReceiver(); + } private AndroidBluetoothReceiver() { @@ -61,7 +70,7 @@ public static void register(Context context) { try { - context.registerReceiver(AndroidBluetoothReceiver.singleInstance, new IntentFilter(BluetoothAdapter.ACTION_STATE_CHANGED)); + context.registerReceiver(InstanceHolder.INSTANCE, new IntentFilter(BluetoothAdapter.ACTION_STATE_CHANGED)); } catch (Throwable t) { @@ -74,7 +83,7 @@ public static void unregister(Context context) { try { - context.unregisterReceiver(AndroidBluetoothReceiver.singleInstance); + context.unregisterReceiver(InstanceHolder.INSTANCE); } catch (Throwable t) { @@ -89,7 +98,7 @@ public void onReceive(Context context, Intent intent) BluetoothAdapterState currentState = BluetoothAdapterState.forInt(intent.getIntExtra(BluetoothAdapter.EXTRA_STATE, -1)); Log.d(LOG_TAG, "state changed " + previousState + " -> " + currentState); - bluetoothAdapterStateChanged(previousState.value, currentState.value); + bluetoothAdapterStateChanged(previousState.getValue(), currentState.getValue()); } diff --git a/src/card/bluetooth/BluetoothCard.cpp b/src/card/bluetooth/BluetoothCard.cpp index dfa99fc94..baa5b9928 100644 --- a/src/card/bluetooth/BluetoothCard.cpp +++ b/src/card/bluetooth/BluetoothCard.cpp @@ -1,13 +1,16 @@ /*! - * \copyright Copyright (c) 2015-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2015-2018 Governikus GmbH & Co. KG, Germany */ #include "BluetoothCard.h" + #include "DestroyPACEChannel.h" #include "messages/BluetoothMessageCreator.h" #include "messages/BluetoothMessageDisconnectResponse.h" #include "messages/BluetoothMessageSetTransportProtocolResponse.h" #include "messages/BluetoothMessageTransferApduResponse.h" +#include "PinModify.h" +#include "PinModifyOutput.h" #include "SynchronousBtCall.h" @@ -150,19 +153,17 @@ CardReturnCode BluetoothCard::destroyPaceChannel() } -CardReturnCode BluetoothCard::setEidPin(quint8 pTimeoutSeconds) +CardReturnCode BluetoothCard::setEidPin(quint8 pTimeoutSeconds, ResponseApdu& pResponseApdu) { - PinModifyBuilder builder; - CommandApdu command = builder.createCommandDataCcid(pTimeoutSeconds); + PinModify pinModify(pTimeoutSeconds); + CommandApdu command = pinModify.createCcidForBluetooth(); - ResponseApdu response; - CardReturnCode returnCode = transmit(command, response, pTimeoutSeconds); + CardReturnCode returnCode = transmit(command, pResponseApdu, pTimeoutSeconds); if (returnCode != CardReturnCode::OK) { return returnCode; } - PinModifyOutput output; - output.parseFromCcid(response.getBuffer()); + PinModifyOutput output(pResponseApdu); return output.getReturnCode(); } diff --git a/src/card/bluetooth/BluetoothCard.h b/src/card/bluetooth/BluetoothCard.h index ebefc5f8e..64fd8f5bb 100644 --- a/src/card/bluetooth/BluetoothCard.h +++ b/src/card/bluetooth/BluetoothCard.h @@ -1,7 +1,7 @@ /*! * \brief Implementation of Card object for Bluetooth * - * \copyright Copyright (c) 2015-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2015-2018 Governikus GmbH & Co. KG, Germany */ #pragma once @@ -38,7 +38,7 @@ class BluetoothCard CardReturnCode destroyPaceChannel() override; - CardReturnCode setEidPin(quint8 pTimeoutSeconds) override; + CardReturnCode setEidPin(quint8 pTimeoutSeconds, ResponseApdu& pResponseApdu) override; }; } /* namespace governikus */ diff --git a/src/card/bluetooth/BluetoothDebug.cpp b/src/card/bluetooth/BluetoothDebug.cpp index e67772250..cca29c7bd 100644 --- a/src/card/bluetooth/BluetoothDebug.cpp +++ b/src/card/bluetooth/BluetoothDebug.cpp @@ -1,5 +1,5 @@ /*! - * \copyright Copyright (c) 2015-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2015-2018 Governikus GmbH & Co. KG, Germany */ #include "BluetoothDebug.h" diff --git a/src/card/bluetooth/BluetoothDebug.h b/src/card/bluetooth/BluetoothDebug.h index 7a4049778..cf127ebc4 100644 --- a/src/card/bluetooth/BluetoothDebug.h +++ b/src/card/bluetooth/BluetoothDebug.h @@ -1,7 +1,7 @@ /*! * \brief Implementation of debug output for various Qt Bluetooth classes. * - * \copyright Copyright (c) 2015-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2015-2018 Governikus GmbH & Co. KG, Germany */ #pragma once diff --git a/src/card/bluetooth/BluetoothDeviceUtil.h b/src/card/bluetooth/BluetoothDeviceUtil.h index e23f2dd24..d36763bdb 100644 --- a/src/card/bluetooth/BluetoothDeviceUtil.h +++ b/src/card/bluetooth/BluetoothDeviceUtil.h @@ -1,7 +1,7 @@ /*! * \brief Utility function for determination of unique Bluetooth device ids. * - * \copyright Copyright (c) 2015-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2015-2018 Governikus GmbH & Co. KG, Germany */ #pragma once diff --git a/src/card/bluetooth/BluetoothReader.cpp b/src/card/bluetooth/BluetoothReader.cpp index c03e1f92f..706820cf5 100644 --- a/src/card/bluetooth/BluetoothReader.cpp +++ b/src/card/bluetooth/BluetoothReader.cpp @@ -1,5 +1,5 @@ /*! - * \copyright Copyright (c) 2015-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2015-2018 Governikus GmbH & Co. KG, Germany */ #include "BluetoothCard.h" diff --git a/src/card/bluetooth/BluetoothReader.h b/src/card/bluetooth/BluetoothReader.h index 6327fdea1..d3fb46e5f 100644 --- a/src/card/bluetooth/BluetoothReader.h +++ b/src/card/bluetooth/BluetoothReader.h @@ -1,7 +1,7 @@ /*! * \brief Implementation of Reader object for Bluetooth based card reader. * - * \copyright Copyright (c) 2015-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2015-2018 Governikus GmbH & Co. KG, Germany */ #pragma once diff --git a/src/card/bluetooth/BluetoothReaderManagerPlugIn.cpp b/src/card/bluetooth/BluetoothReaderManagerPlugIn.cpp index e456c8572..437c09978 100644 --- a/src/card/bluetooth/BluetoothReaderManagerPlugIn.cpp +++ b/src/card/bluetooth/BluetoothReaderManagerPlugIn.cpp @@ -1,5 +1,5 @@ /*! - * \copyright Copyright (c) 2015-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2015-2018 Governikus GmbH & Co. KG, Germany */ #include "BluetoothReaderManagerPlugIn.h" @@ -145,6 +145,7 @@ void BluetoothReaderManagerPlugIn::onConnectToKnownReadersChanged() void BluetoothReaderManagerPlugIn::onDeviceDiscovered(const QBluetoothDeviceInfo& pInfo) { + setReaderInfoResponding(true); QString deviceId = BluetoothDeviceUtil::getDeviceId(pInfo); if (mReaders.contains(deviceId)) { @@ -258,6 +259,11 @@ void BluetoothReaderManagerPlugIn::onDeviceDiscoveryError(QBluetoothDeviceDiscov { qCCritical(bluetooth) << "Error on Bluetooth device discovery" << pError; + if (pError == QBluetoothDeviceDiscoveryAgent::InputOutputError) + { + setReaderInfoResponding(false); + } + Q_EMIT fireReaderDeviceError(pError == QBluetoothDeviceDiscoveryAgent::PoweredOffError ? DeviceError::DEVICE_POWERED_OFF : DeviceError::DEVICE_SCAN_ERROR); } diff --git a/src/card/bluetooth/BluetoothReaderManagerPlugIn.h b/src/card/bluetooth/BluetoothReaderManagerPlugIn.h index f69adf76f..c2be5338a 100644 --- a/src/card/bluetooth/BluetoothReaderManagerPlugIn.h +++ b/src/card/bluetooth/BluetoothReaderManagerPlugIn.h @@ -1,7 +1,7 @@ /*! * \brief Implements the ReaderManagerPlugIn with Qt'S Bluetooth API. * - * \copyright Copyright (c) 2015-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2015-2018 Governikus GmbH & Co. KG, Germany */ #pragma once diff --git a/src/card/bluetooth/BluetoothReaderManagerPlugIn_p.h b/src/card/bluetooth/BluetoothReaderManagerPlugIn_p.h index 12b92212a..8337d54b3 100644 --- a/src/card/bluetooth/BluetoothReaderManagerPlugIn_p.h +++ b/src/card/bluetooth/BluetoothReaderManagerPlugIn_p.h @@ -1,7 +1,7 @@ /*! * \brief Private implementation part of the ReaderManagerPlugIn with Qt'S Bluetooth API. * - * \copyright Copyright (c) 2015-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2015-2018 Governikus GmbH & Co. KG, Germany */ #pragma once diff --git a/src/card/bluetooth/BluetoothReaderManagerPlugIn_p_android.cpp b/src/card/bluetooth/BluetoothReaderManagerPlugIn_p_android.cpp index cbb8b3ec6..57a7ab1ac 100644 --- a/src/card/bluetooth/BluetoothReaderManagerPlugIn_p_android.cpp +++ b/src/card/bluetooth/BluetoothReaderManagerPlugIn_p_android.cpp @@ -1,5 +1,5 @@ /*! - * \copyright Copyright (c) 2015-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2015-2018 Governikus GmbH & Co. KG, Germany */ #include "AndroidBluetoothAdapter.h" diff --git a/src/card/bluetooth/BluetoothReaderManagerPlugIn_p_generic.cpp b/src/card/bluetooth/BluetoothReaderManagerPlugIn_p_generic.cpp index d03137e78..a5b0c2ba1 100644 --- a/src/card/bluetooth/BluetoothReaderManagerPlugIn_p_generic.cpp +++ b/src/card/bluetooth/BluetoothReaderManagerPlugIn_p_generic.cpp @@ -1,5 +1,5 @@ /*! - * \copyright Copyright (c) 2015-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2015-2018 Governikus GmbH & Co. KG, Germany */ #include "BluetoothReaderManagerPlugIn_p.h" diff --git a/src/card/bluetooth/BluetoothReaderManagerPlugIn_p_ios.mm b/src/card/bluetooth/BluetoothReaderManagerPlugIn_p_ios.mm index 1550cf655..e99c63b10 100644 --- a/src/card/bluetooth/BluetoothReaderManagerPlugIn_p_ios.mm +++ b/src/card/bluetooth/BluetoothReaderManagerPlugIn_p_ios.mm @@ -1,7 +1,7 @@ /*! * BluetoothReaderManagerPlugInPrivate_p_ios.mm * - * \copyright Copyright (c) 2015 Governikus GmbH & Co. KG + * \copyright Copyright (c) 2015-2018 Governikus GmbH & Co. KG, Germany */ #include "BluetoothReaderManagerPlugIn_p.h" diff --git a/src/card/bluetooth/CyberJackWaveDevice.cpp b/src/card/bluetooth/CyberJackWaveDevice.cpp index fac59f7af..e83208b86 100644 --- a/src/card/bluetooth/CyberJackWaveDevice.cpp +++ b/src/card/bluetooth/CyberJackWaveDevice.cpp @@ -1,5 +1,5 @@ /*! - * \copyright Copyright (c) 2015-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2015-2018 Governikus GmbH & Co. KG, Germany */ #include "BluetoothDebug.h" diff --git a/src/card/bluetooth/CyberJackWaveDevice.h b/src/card/bluetooth/CyberJackWaveDevice.h index 5cae105fa..9cca12415 100644 --- a/src/card/bluetooth/CyberJackWaveDevice.h +++ b/src/card/bluetooth/CyberJackWaveDevice.h @@ -1,7 +1,7 @@ /*! * \brief Implementation of a Reiner SCT cyberJack wave device. * - * \copyright Copyright (c) 2015-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2015-2018 Governikus GmbH & Co. KG, Germany */ #pragma once diff --git a/src/card/bluetooth/NotificationEnabler.cpp b/src/card/bluetooth/NotificationEnabler.cpp index a02678e9b..cbfa221c7 100644 --- a/src/card/bluetooth/NotificationEnabler.cpp +++ b/src/card/bluetooth/NotificationEnabler.cpp @@ -1,5 +1,5 @@ /*! - * \copyright Copyright (c) 2015-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2015-2018 Governikus GmbH & Co. KG, Germany */ #include "NotificationEnabler.h" diff --git a/src/card/bluetooth/NotificationEnabler.h b/src/card/bluetooth/NotificationEnabler.h index 50acd7114..3f5897be6 100644 --- a/src/card/bluetooth/NotificationEnabler.h +++ b/src/card/bluetooth/NotificationEnabler.h @@ -6,7 +6,7 @@ * * For details see the Qt documentation on QLowEnergyService and topic "Service Interaction". * - * \copyright Copyright (c) 2015-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2015-2018 Governikus GmbH & Co. KG, Germany */ #pragma once diff --git a/src/card/bluetooth/SynchronousBtCall.cpp b/src/card/bluetooth/SynchronousBtCall.cpp index 632d8f708..deb76c0f2 100644 --- a/src/card/bluetooth/SynchronousBtCall.cpp +++ b/src/card/bluetooth/SynchronousBtCall.cpp @@ -1,5 +1,5 @@ /*! - * \copyright Copyright (c) 2015-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2015-2018 Governikus GmbH & Co. KG, Germany */ #include "SynchronousBtCall.h" diff --git a/src/card/bluetooth/SynchronousBtCall.h b/src/card/bluetooth/SynchronousBtCall.h index 23ee24db8..51faf163a 100644 --- a/src/card/bluetooth/SynchronousBtCall.h +++ b/src/card/bluetooth/SynchronousBtCall.h @@ -2,7 +2,7 @@ * \brief Helper class to make a synchronous call to a Bluetooth device, i.e. * send the request data and wait for the response data to arrive. * - * \copyright Copyright (c) 2015-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2015-2018 Governikus GmbH & Co. KG, Germany */ #pragma once diff --git a/src/card/bluetooth/messages/BluetoothIDs.cpp b/src/card/bluetooth/messages/BluetoothIDs.cpp index 3cee50c29..35da8c3a9 100644 --- a/src/card/bluetooth/messages/BluetoothIDs.cpp +++ b/src/card/bluetooth/messages/BluetoothIDs.cpp @@ -1,5 +1,5 @@ /*! - * \copyright Copyright (c) 2015-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2015-2018 Governikus GmbH & Co. KG, Germany */ #include "BluetoothIDs.h" diff --git a/src/card/bluetooth/messages/BluetoothIDs.h b/src/card/bluetooth/messages/BluetoothIDs.h index d4ef58922..e18a5a167 100644 --- a/src/card/bluetooth/messages/BluetoothIDs.h +++ b/src/card/bluetooth/messages/BluetoothIDs.h @@ -1,7 +1,7 @@ /*! * \brief Add message and parameter types of bluetooth SIM ACCESS spec * - * \copyright Copyright (c) 2015-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2015-2018 Governikus GmbH & Co. KG, Germany */ #pragma once diff --git a/src/card/bluetooth/messages/BluetoothMessage.cpp b/src/card/bluetooth/messages/BluetoothMessage.cpp index f2802495a..3d63a0900 100644 --- a/src/card/bluetooth/messages/BluetoothMessage.cpp +++ b/src/card/bluetooth/messages/BluetoothMessage.cpp @@ -1,5 +1,5 @@ /*! - * \copyright Copyright (c) 2015-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2015-2018 Governikus GmbH & Co. KG, Germany */ #include "BluetoothMessage.h" diff --git a/src/card/bluetooth/messages/BluetoothMessage.h b/src/card/bluetooth/messages/BluetoothMessage.h index 8ff7642ad..bafd8eeab 100644 --- a/src/card/bluetooth/messages/BluetoothMessage.h +++ b/src/card/bluetooth/messages/BluetoothMessage.h @@ -1,7 +1,7 @@ /*! * \brief Implements a message of SIM ACCESS profile. * - * \copyright Copyright (c) 2015-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2015-2018 Governikus GmbH & Co. KG, Germany */ #pragma once diff --git a/src/card/bluetooth/messages/BluetoothMessageConnectResponse.cpp b/src/card/bluetooth/messages/BluetoothMessageConnectResponse.cpp index 64c55ea5a..0d0257b08 100644 --- a/src/card/bluetooth/messages/BluetoothMessageConnectResponse.cpp +++ b/src/card/bluetooth/messages/BluetoothMessageConnectResponse.cpp @@ -1,5 +1,5 @@ /*! - * \copyright Copyright (c) 2015-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2015-2018 Governikus GmbH & Co. KG, Germany */ #include "messages/BluetoothMessageConnectResponse.h" diff --git a/src/card/bluetooth/messages/BluetoothMessageConnectResponse.h b/src/card/bluetooth/messages/BluetoothMessageConnectResponse.h index b138291e7..ae4b2e5de 100644 --- a/src/card/bluetooth/messages/BluetoothMessageConnectResponse.h +++ b/src/card/bluetooth/messages/BluetoothMessageConnectResponse.h @@ -1,5 +1,5 @@ /*! - * \copyright Copyright (c) 2015-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2015-2018 Governikus GmbH & Co. KG, Germany */ #pragma once diff --git a/src/card/bluetooth/messages/BluetoothMessageCreator.cpp b/src/card/bluetooth/messages/BluetoothMessageCreator.cpp index 4e526d6e3..e0cb8d991 100644 --- a/src/card/bluetooth/messages/BluetoothMessageCreator.cpp +++ b/src/card/bluetooth/messages/BluetoothMessageCreator.cpp @@ -1,5 +1,5 @@ /*! - * \copyright Copyright (c) 2015-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2015-2018 Governikus GmbH & Co. KG, Germany */ diff --git a/src/card/bluetooth/messages/BluetoothMessageCreator.h b/src/card/bluetooth/messages/BluetoothMessageCreator.h index 83effa5a6..3c072f1dc 100644 --- a/src/card/bluetooth/messages/BluetoothMessageCreator.h +++ b/src/card/bluetooth/messages/BluetoothMessageCreator.h @@ -1,7 +1,7 @@ /*! * \brief Provides an easy to use API to create requests. * - * \copyright Copyright (c) 2015-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2015-2018 Governikus GmbH & Co. KG, Germany */ #pragma once diff --git a/src/card/bluetooth/messages/BluetoothMessageDisconnectResponse.cpp b/src/card/bluetooth/messages/BluetoothMessageDisconnectResponse.cpp index aee2d9267..0ae5e34fd 100644 --- a/src/card/bluetooth/messages/BluetoothMessageDisconnectResponse.cpp +++ b/src/card/bluetooth/messages/BluetoothMessageDisconnectResponse.cpp @@ -1,5 +1,5 @@ /*! - * \copyright Copyright (c) 2015-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2015-2018 Governikus GmbH & Co. KG, Germany */ #include "messages/BluetoothMessageDisconnectResponse.h" diff --git a/src/card/bluetooth/messages/BluetoothMessageDisconnectResponse.h b/src/card/bluetooth/messages/BluetoothMessageDisconnectResponse.h index dcd6775e3..831939d43 100644 --- a/src/card/bluetooth/messages/BluetoothMessageDisconnectResponse.h +++ b/src/card/bluetooth/messages/BluetoothMessageDisconnectResponse.h @@ -1,5 +1,5 @@ /*! - * \copyright Copyright (c) 2015-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2015-2018 Governikus GmbH & Co. KG, Germany */ #pragma once diff --git a/src/card/bluetooth/messages/BluetoothMessageParser.cpp b/src/card/bluetooth/messages/BluetoothMessageParser.cpp index 47ebb784d..06e117532 100644 --- a/src/card/bluetooth/messages/BluetoothMessageParser.cpp +++ b/src/card/bluetooth/messages/BluetoothMessageParser.cpp @@ -1,5 +1,5 @@ /*! - * \copyright Copyright (c) 2015-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2015-2018 Governikus GmbH & Co. KG, Germany */ #include "BluetoothMessageConnectResponse.h" diff --git a/src/card/bluetooth/messages/BluetoothMessageParser.h b/src/card/bluetooth/messages/BluetoothMessageParser.h index cdf7aa7d4..c5765e7c3 100644 --- a/src/card/bluetooth/messages/BluetoothMessageParser.h +++ b/src/card/bluetooth/messages/BluetoothMessageParser.h @@ -1,7 +1,7 @@ /*! * \brief Parses messages of bluetooth SIM ACCESS protocol. * - * \copyright Copyright (c) 2015-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2015-2018 Governikus GmbH & Co. KG, Germany */ #pragma once diff --git a/src/card/bluetooth/messages/BluetoothMessagePowerSimOffResponse.cpp b/src/card/bluetooth/messages/BluetoothMessagePowerSimOffResponse.cpp index f8e120711..a39537bcc 100644 --- a/src/card/bluetooth/messages/BluetoothMessagePowerSimOffResponse.cpp +++ b/src/card/bluetooth/messages/BluetoothMessagePowerSimOffResponse.cpp @@ -1,5 +1,5 @@ /*! - * \copyright Copyright (c) 2015-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2015-2018 Governikus GmbH & Co. KG, Germany */ #include "messages/BluetoothMessagePowerSimOffResponse.h" diff --git a/src/card/bluetooth/messages/BluetoothMessagePowerSimOffResponse.h b/src/card/bluetooth/messages/BluetoothMessagePowerSimOffResponse.h index 1b2a9635a..f08fa166a 100644 --- a/src/card/bluetooth/messages/BluetoothMessagePowerSimOffResponse.h +++ b/src/card/bluetooth/messages/BluetoothMessagePowerSimOffResponse.h @@ -1,5 +1,5 @@ /*! - * \copyright Copyright (c) 2015-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2015-2018 Governikus GmbH & Co. KG, Germany */ #pragma once diff --git a/src/card/bluetooth/messages/BluetoothMessagePowerSimOnResponse.cpp b/src/card/bluetooth/messages/BluetoothMessagePowerSimOnResponse.cpp index f0c03d3d6..bce1ad33a 100644 --- a/src/card/bluetooth/messages/BluetoothMessagePowerSimOnResponse.cpp +++ b/src/card/bluetooth/messages/BluetoothMessagePowerSimOnResponse.cpp @@ -1,5 +1,5 @@ /*! - * \copyright Copyright (c) 2015-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2015-2018 Governikus GmbH & Co. KG, Germany */ #include "BluetoothIDs.h" diff --git a/src/card/bluetooth/messages/BluetoothMessagePowerSimOnResponse.h b/src/card/bluetooth/messages/BluetoothMessagePowerSimOnResponse.h index 01da0607d..276c4b899 100644 --- a/src/card/bluetooth/messages/BluetoothMessagePowerSimOnResponse.h +++ b/src/card/bluetooth/messages/BluetoothMessagePowerSimOnResponse.h @@ -1,5 +1,5 @@ /*! - * \copyright Copyright (c) 2015-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2015-2018 Governikus GmbH & Co. KG, Germany */ #pragma once diff --git a/src/card/bluetooth/messages/BluetoothMessageResetSimResponse.cpp b/src/card/bluetooth/messages/BluetoothMessageResetSimResponse.cpp index ffe2cc63c..4e1621bfe 100644 --- a/src/card/bluetooth/messages/BluetoothMessageResetSimResponse.cpp +++ b/src/card/bluetooth/messages/BluetoothMessageResetSimResponse.cpp @@ -1,5 +1,5 @@ /*! - * \copyright Copyright (c) 2015-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2015-2018 Governikus GmbH & Co. KG, Germany */ #include "messages/BluetoothMessageResetSimResponse.h" diff --git a/src/card/bluetooth/messages/BluetoothMessageResetSimResponse.h b/src/card/bluetooth/messages/BluetoothMessageResetSimResponse.h index 09582aa14..b4fd33fc8 100644 --- a/src/card/bluetooth/messages/BluetoothMessageResetSimResponse.h +++ b/src/card/bluetooth/messages/BluetoothMessageResetSimResponse.h @@ -1,5 +1,5 @@ /*! - * \copyright Copyright (c) 2015-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2015-2018 Governikus GmbH & Co. KG, Germany */ #pragma once diff --git a/src/card/bluetooth/messages/BluetoothMessageSetTransportProtocolResponse.cpp b/src/card/bluetooth/messages/BluetoothMessageSetTransportProtocolResponse.cpp index 56f158f20..f048ab090 100644 --- a/src/card/bluetooth/messages/BluetoothMessageSetTransportProtocolResponse.cpp +++ b/src/card/bluetooth/messages/BluetoothMessageSetTransportProtocolResponse.cpp @@ -1,5 +1,5 @@ /*! - * \copyright Copyright (c) 2015-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2015-2018 Governikus GmbH & Co. KG, Germany */ #include "BluetoothMessageSetTransportProtocolResponse.h" diff --git a/src/card/bluetooth/messages/BluetoothMessageSetTransportProtocolResponse.h b/src/card/bluetooth/messages/BluetoothMessageSetTransportProtocolResponse.h index 0657d5805..c45ec59a7 100644 --- a/src/card/bluetooth/messages/BluetoothMessageSetTransportProtocolResponse.h +++ b/src/card/bluetooth/messages/BluetoothMessageSetTransportProtocolResponse.h @@ -1,7 +1,7 @@ /*! * \brief Store information of SetTransportProtocolResponse. * - * \copyright Copyright (c) 2015-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2015-2018 Governikus GmbH & Co. KG, Germany */ #pragma once diff --git a/src/card/bluetooth/messages/BluetoothMessageStatusInd.cpp b/src/card/bluetooth/messages/BluetoothMessageStatusInd.cpp index 6f042992d..6f823d7a0 100644 --- a/src/card/bluetooth/messages/BluetoothMessageStatusInd.cpp +++ b/src/card/bluetooth/messages/BluetoothMessageStatusInd.cpp @@ -1,5 +1,5 @@ /*! - * \copyright Copyright (c) 2015-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2015-2018 Governikus GmbH & Co. KG, Germany */ #include "BluetoothMessageStatusInd.h" diff --git a/src/card/bluetooth/messages/BluetoothMessageStatusInd.h b/src/card/bluetooth/messages/BluetoothMessageStatusInd.h index f13b39b63..4373f4f7d 100644 --- a/src/card/bluetooth/messages/BluetoothMessageStatusInd.h +++ b/src/card/bluetooth/messages/BluetoothMessageStatusInd.h @@ -1,7 +1,7 @@ /*! * \brief Implements special BluetoothMessage for StatusInd. * - * \copyright Copyright (c) 2015-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2015-2018 Governikus GmbH & Co. KG, Germany */ #pragma once diff --git a/src/card/bluetooth/messages/BluetoothMessageTransferApduResponse.cpp b/src/card/bluetooth/messages/BluetoothMessageTransferApduResponse.cpp index dd3f790bf..2e472b739 100644 --- a/src/card/bluetooth/messages/BluetoothMessageTransferApduResponse.cpp +++ b/src/card/bluetooth/messages/BluetoothMessageTransferApduResponse.cpp @@ -1,5 +1,5 @@ /*! - * \copyright Copyright (c) 2015-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2015-2018 Governikus GmbH & Co. KG, Germany */ #include "messages/BluetoothMessageTransferApduResponse.h" diff --git a/src/card/bluetooth/messages/BluetoothMessageTransferApduResponse.h b/src/card/bluetooth/messages/BluetoothMessageTransferApduResponse.h index e96275df5..507550363 100644 --- a/src/card/bluetooth/messages/BluetoothMessageTransferApduResponse.h +++ b/src/card/bluetooth/messages/BluetoothMessageTransferApduResponse.h @@ -1,5 +1,5 @@ /*! - * \copyright Copyright (c) 2015-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2015-2018 Governikus GmbH & Co. KG, Germany */ #pragma once diff --git a/src/card/bluetooth/messages/BluetoothMessageTransferCardReaderStatusResponse.cpp b/src/card/bluetooth/messages/BluetoothMessageTransferCardReaderStatusResponse.cpp index 542a4b342..04cf87bd2 100644 --- a/src/card/bluetooth/messages/BluetoothMessageTransferCardReaderStatusResponse.cpp +++ b/src/card/bluetooth/messages/BluetoothMessageTransferCardReaderStatusResponse.cpp @@ -1,5 +1,5 @@ /* - * \copyright Copyright (c) 2015-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2015-2018 Governikus GmbH & Co. KG, Germany */ #include "BluetoothMessageTransferCardReaderStatusResponse.h" diff --git a/src/card/bluetooth/messages/BluetoothMessageTransferCardReaderStatusResponse.h b/src/card/bluetooth/messages/BluetoothMessageTransferCardReaderStatusResponse.h index bbe050edc..b205ad1bf 100644 --- a/src/card/bluetooth/messages/BluetoothMessageTransferCardReaderStatusResponse.h +++ b/src/card/bluetooth/messages/BluetoothMessageTransferCardReaderStatusResponse.h @@ -1,5 +1,5 @@ /* - * \copyright Copyright (c) 2015-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2015-2018 Governikus GmbH & Co. KG, Germany */ #pragma once diff --git a/src/card/bluetooth/messages/BluetoothUtils.cpp b/src/card/bluetooth/messages/BluetoothUtils.cpp index 87d24b4f7..94289776a 100644 --- a/src/card/bluetooth/messages/BluetoothUtils.cpp +++ b/src/card/bluetooth/messages/BluetoothUtils.cpp @@ -1,5 +1,5 @@ /*! - * \copyright Copyright (c) 2015-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2015-2018 Governikus GmbH & Co. KG, Germany */ #include "BluetoothUtils.h" diff --git a/src/card/bluetooth/messages/BluetoothUtils.h b/src/card/bluetooth/messages/BluetoothUtils.h index 3d765229e..7eb356c51 100644 --- a/src/card/bluetooth/messages/BluetoothUtils.h +++ b/src/card/bluetooth/messages/BluetoothUtils.h @@ -1,7 +1,7 @@ /*! * \brief Some helper utils for bluetooth messages. * - * \copyright Copyright (c) 2015-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2015-2018 Governikus GmbH & Co. KG, Germany */ #pragma once diff --git a/src/card/bluetooth/messages/parameter/BluetoothMessageParameter.cpp b/src/card/bluetooth/messages/parameter/BluetoothMessageParameter.cpp index e34a33678..ceaa5fdaa 100644 --- a/src/card/bluetooth/messages/parameter/BluetoothMessageParameter.cpp +++ b/src/card/bluetooth/messages/parameter/BluetoothMessageParameter.cpp @@ -1,5 +1,5 @@ /*! - * \copyright Copyright (c) 2015-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2015-2018 Governikus GmbH & Co. KG, Germany */ #include "BluetoothMessageParameter.h" diff --git a/src/card/bluetooth/messages/parameter/BluetoothMessageParameter.h b/src/card/bluetooth/messages/parameter/BluetoothMessageParameter.h index 582a0a495..110639ab7 100644 --- a/src/card/bluetooth/messages/parameter/BluetoothMessageParameter.h +++ b/src/card/bluetooth/messages/parameter/BluetoothMessageParameter.h @@ -1,7 +1,7 @@ /*! * \brief Implements message parameter of SIM ACCESS spec. * - * \copyright Copyright (c) 2015-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2015-2018 Governikus GmbH & Co. KG, Germany */ #pragma once diff --git a/src/card/bluetooth/messages/parameter/BluetoothMessageParameterApduResponse.cpp b/src/card/bluetooth/messages/parameter/BluetoothMessageParameterApduResponse.cpp index 1e0ff2c88..02f252104 100644 --- a/src/card/bluetooth/messages/parameter/BluetoothMessageParameterApduResponse.cpp +++ b/src/card/bluetooth/messages/parameter/BluetoothMessageParameterApduResponse.cpp @@ -1,5 +1,5 @@ /*! - * \copyright Copyright (c) 2015-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2015-2018 Governikus GmbH & Co. KG, Germany */ #include "BluetoothMessageParameterApduResponse.h" diff --git a/src/card/bluetooth/messages/parameter/BluetoothMessageParameterApduResponse.h b/src/card/bluetooth/messages/parameter/BluetoothMessageParameterApduResponse.h index f45194d0e..cf453d279 100644 --- a/src/card/bluetooth/messages/parameter/BluetoothMessageParameterApduResponse.h +++ b/src/card/bluetooth/messages/parameter/BluetoothMessageParameterApduResponse.h @@ -1,7 +1,7 @@ /*! * \brief Implements special BluetoothMessageParameter for TransferApduResponse. * - * \copyright Copyright (c) 2015-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2015-2018 Governikus GmbH & Co. KG, Germany */ #pragma once diff --git a/src/card/bluetooth/messages/parameter/BluetoothMessageParameterCardReaderStatus.cpp b/src/card/bluetooth/messages/parameter/BluetoothMessageParameterCardReaderStatus.cpp index 626164969..5de8f4a3d 100644 --- a/src/card/bluetooth/messages/parameter/BluetoothMessageParameterCardReaderStatus.cpp +++ b/src/card/bluetooth/messages/parameter/BluetoothMessageParameterCardReaderStatus.cpp @@ -1,5 +1,5 @@ /* - * \copyright Copyright (c) 2015-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2015-2018 Governikus GmbH & Co. KG, Germany */ #include "messages/parameter/BluetoothMessageParameterCardReaderStatus.h" diff --git a/src/card/bluetooth/messages/parameter/BluetoothMessageParameterCardReaderStatus.h b/src/card/bluetooth/messages/parameter/BluetoothMessageParameterCardReaderStatus.h index fcb479967..e4b8b2c6c 100644 --- a/src/card/bluetooth/messages/parameter/BluetoothMessageParameterCardReaderStatus.h +++ b/src/card/bluetooth/messages/parameter/BluetoothMessageParameterCardReaderStatus.h @@ -1,5 +1,5 @@ /* - * \copyright Copyright (c) 2015-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2015-2018 Governikus GmbH & Co. KG, Germany */ #pragma once diff --git a/src/card/bluetooth/messages/parameter/BluetoothMessageParameterConnectionStatus.cpp b/src/card/bluetooth/messages/parameter/BluetoothMessageParameterConnectionStatus.cpp index f5f3ac30c..aa9dfd922 100644 --- a/src/card/bluetooth/messages/parameter/BluetoothMessageParameterConnectionStatus.cpp +++ b/src/card/bluetooth/messages/parameter/BluetoothMessageParameterConnectionStatus.cpp @@ -1,5 +1,5 @@ /*! - * \copyright Copyright (c) 2015-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2015-2018 Governikus GmbH & Co. KG, Germany */ #include "BluetoothMessageParameterConnectionStatus.h" diff --git a/src/card/bluetooth/messages/parameter/BluetoothMessageParameterConnectionStatus.h b/src/card/bluetooth/messages/parameter/BluetoothMessageParameterConnectionStatus.h index fdf9b5c4f..fd367cb77 100644 --- a/src/card/bluetooth/messages/parameter/BluetoothMessageParameterConnectionStatus.h +++ b/src/card/bluetooth/messages/parameter/BluetoothMessageParameterConnectionStatus.h @@ -1,7 +1,7 @@ /*! * \brief Implements special BluetoothMessageParameter for ConnectionStatus. * - * \copyright Copyright (c) 2015-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2015-2018 Governikus GmbH & Co. KG, Germany */ #pragma once diff --git a/src/card/bluetooth/messages/parameter/BluetoothMessageParameterMaxMsgSize.cpp b/src/card/bluetooth/messages/parameter/BluetoothMessageParameterMaxMsgSize.cpp index c0de551f6..48d63e4b7 100644 --- a/src/card/bluetooth/messages/parameter/BluetoothMessageParameterMaxMsgSize.cpp +++ b/src/card/bluetooth/messages/parameter/BluetoothMessageParameterMaxMsgSize.cpp @@ -1,5 +1,5 @@ /*! - * \copyright Copyright (c) 2015-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2015-2018 Governikus GmbH & Co. KG, Germany */ #include "BluetoothMessageParameterMaxMsgSize.h" diff --git a/src/card/bluetooth/messages/parameter/BluetoothMessageParameterMaxMsgSize.h b/src/card/bluetooth/messages/parameter/BluetoothMessageParameterMaxMsgSize.h index ec791a732..025e10fbc 100644 --- a/src/card/bluetooth/messages/parameter/BluetoothMessageParameterMaxMsgSize.h +++ b/src/card/bluetooth/messages/parameter/BluetoothMessageParameterMaxMsgSize.h @@ -1,7 +1,7 @@ /*! * \brief Implements special BluetoothMessageParameter for MaxMsgSize. * - * \copyright Copyright (c) 2015-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2015-2018 Governikus GmbH & Co. KG, Germany */ #pragma once diff --git a/src/card/bluetooth/messages/parameter/BluetoothMessageParameterResultCode.cpp b/src/card/bluetooth/messages/parameter/BluetoothMessageParameterResultCode.cpp index 7bcc2223e..538b044a4 100644 --- a/src/card/bluetooth/messages/parameter/BluetoothMessageParameterResultCode.cpp +++ b/src/card/bluetooth/messages/parameter/BluetoothMessageParameterResultCode.cpp @@ -1,5 +1,5 @@ /*! - * \copyright Copyright (c) 2015-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2015-2018 Governikus GmbH & Co. KG, Germany */ #include "BluetoothMessageParameterResultCode.h" diff --git a/src/card/bluetooth/messages/parameter/BluetoothMessageParameterResultCode.h b/src/card/bluetooth/messages/parameter/BluetoothMessageParameterResultCode.h index 4b511a36c..5be6da22b 100644 --- a/src/card/bluetooth/messages/parameter/BluetoothMessageParameterResultCode.h +++ b/src/card/bluetooth/messages/parameter/BluetoothMessageParameterResultCode.h @@ -1,7 +1,7 @@ /*! * \brief Implements special BluetoothMessageParameter for ResultCode. * - * \copyright Copyright (c) 2015-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2015-2018 Governikus GmbH & Co. KG, Germany */ #pragma once diff --git a/src/card/bluetooth/messages/parameter/BluetoothMessageParameterStatusChange.cpp b/src/card/bluetooth/messages/parameter/BluetoothMessageParameterStatusChange.cpp index cb8ae11a6..dfbd7ed9c 100644 --- a/src/card/bluetooth/messages/parameter/BluetoothMessageParameterStatusChange.cpp +++ b/src/card/bluetooth/messages/parameter/BluetoothMessageParameterStatusChange.cpp @@ -1,5 +1,5 @@ /*! - * \copyright Copyright (c) 2015-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2015-2018 Governikus GmbH & Co. KG, Germany */ #include "BluetoothMessageParameterStatusChange.h" diff --git a/src/card/bluetooth/messages/parameter/BluetoothMessageParameterStatusChange.h b/src/card/bluetooth/messages/parameter/BluetoothMessageParameterStatusChange.h index 7ef2f8072..4c1707b4a 100644 --- a/src/card/bluetooth/messages/parameter/BluetoothMessageParameterStatusChange.h +++ b/src/card/bluetooth/messages/parameter/BluetoothMessageParameterStatusChange.h @@ -1,7 +1,7 @@ /*! * \brief Implements special BluetoothMessageParameter for StatusChange. * - * \copyright Copyright (c) 2015-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2015-2018 Governikus GmbH & Co. KG, Germany */ #pragma once diff --git a/src/card/drivers/ReaderDetector.cpp b/src/card/drivers/ReaderDetector.cpp index 7e4af67b3..24600b1ca 100644 --- a/src/card/drivers/ReaderDetector.cpp +++ b/src/card/drivers/ReaderDetector.cpp @@ -1,5 +1,5 @@ /*! - * \copyright Copyright (c) 2015-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2015-2018 Governikus GmbH & Co. KG, Germany */ #include "ReaderDetector.h" diff --git a/src/card/drivers/ReaderDetector.h b/src/card/drivers/ReaderDetector.h index 7ce69a895..8b78d8e9c 100644 --- a/src/card/drivers/ReaderDetector.h +++ b/src/card/drivers/ReaderDetector.h @@ -2,7 +2,7 @@ * \brief Interface specifying classes that can detect the attached card reader * devices on a specific platform. * - * \copyright Copyright (c) 2015-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2015-2018 Governikus GmbH & Co. KG, Germany */ #pragma once diff --git a/src/card/drivers/ReaderDetector_generic.cpp b/src/card/drivers/ReaderDetector_generic.cpp index 649fa91e6..9a8c8afcd 100644 --- a/src/card/drivers/ReaderDetector_generic.cpp +++ b/src/card/drivers/ReaderDetector_generic.cpp @@ -1,5 +1,5 @@ /*! - * \copyright Copyright (c) 2016-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2016-2018 Governikus GmbH & Co. KG, Germany */ #include "ReaderDetector.h" diff --git a/src/card/drivers/ReaderDetector_linux.cpp b/src/card/drivers/ReaderDetector_linux.cpp index dc71c3a70..479a64a1d 100644 --- a/src/card/drivers/ReaderDetector_linux.cpp +++ b/src/card/drivers/ReaderDetector_linux.cpp @@ -1,5 +1,5 @@ /*! - * \copyright Copyright (c) 2016-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2016-2018 Governikus GmbH & Co. KG, Germany */ #include "ReaderDetector.h" diff --git a/src/card/drivers/ReaderDetector_osx.cpp b/src/card/drivers/ReaderDetector_osx.cpp index c9cc77999..99b83c919 100644 --- a/src/card/drivers/ReaderDetector_osx.cpp +++ b/src/card/drivers/ReaderDetector_osx.cpp @@ -1,5 +1,5 @@ /*! - * \copyright Copyright (c) 2016-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2016-2018 Governikus GmbH & Co. KG, Germany */ #include "ReaderDetector.h" diff --git a/src/card/drivers/ReaderDetector_win.cpp b/src/card/drivers/ReaderDetector_win.cpp index a7810aedb..90ef0d363 100644 --- a/src/card/drivers/ReaderDetector_win.cpp +++ b/src/card/drivers/ReaderDetector_win.cpp @@ -1,5 +1,5 @@ /*! - * \copyright Copyright (c) 2016-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2016-2018 Governikus GmbH & Co. KG, Germany */ #include "ReaderDetector.h" diff --git a/src/card/nfc/NfcCard.cpp b/src/card/nfc/NfcCard.cpp index ce1507138..63e359f7e 100644 --- a/src/card/nfc/NfcCard.cpp +++ b/src/card/nfc/NfcCard.cpp @@ -1,5 +1,5 @@ /*! - * \copyright Copyright (c) 2015-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2015-2018 Governikus GmbH & Co. KG, Germany */ #include "NfcCard.h" diff --git a/src/card/nfc/NfcCard.h b/src/card/nfc/NfcCard.h index 830aa915d..9a81cdf62 100644 --- a/src/card/nfc/NfcCard.h +++ b/src/card/nfc/NfcCard.h @@ -1,7 +1,7 @@ /*! * \brief Implementation of \ref Card for NFC. * - * \copyright Copyright (c) 2015-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2015-2018 Governikus GmbH & Co. KG, Germany */ #pragma once diff --git a/src/card/nfc/NfcReader.cpp b/src/card/nfc/NfcReader.cpp index 22ee7003a..6f1d8093f 100644 --- a/src/card/nfc/NfcReader.cpp +++ b/src/card/nfc/NfcReader.cpp @@ -1,5 +1,5 @@ /*! - * \copyright Copyright (c) 2015-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2015-2018 Governikus GmbH & Co. KG, Germany */ #include "CardConnectionWorker.h" diff --git a/src/card/nfc/NfcReader.h b/src/card/nfc/NfcReader.h index dc8e007ed..adcc700b6 100644 --- a/src/card/nfc/NfcReader.h +++ b/src/card/nfc/NfcReader.h @@ -1,7 +1,7 @@ /*! * \brief Implementation of \ref Reader for NFC. * - * \copyright Copyright (c) 2015-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2015-2018 Governikus GmbH & Co. KG, Germany */ #pragma once diff --git a/src/card/nfc/NfcReaderManagerPlugIn.cpp b/src/card/nfc/NfcReaderManagerPlugIn.cpp index df737056b..d50616b3c 100644 --- a/src/card/nfc/NfcReaderManagerPlugIn.cpp +++ b/src/card/nfc/NfcReaderManagerPlugIn.cpp @@ -1,5 +1,5 @@ /*! - * \copyright Copyright (c) 2015-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2015-2018 Governikus GmbH & Co. KG, Germany */ #include "NfcReader.h" diff --git a/src/card/nfc/NfcReaderManagerPlugIn.h b/src/card/nfc/NfcReaderManagerPlugIn.h index 113249681..ffb723900 100644 --- a/src/card/nfc/NfcReaderManagerPlugIn.h +++ b/src/card/nfc/NfcReaderManagerPlugIn.h @@ -1,7 +1,7 @@ /*! * \brief Implementation of \ref ReaderManagerPlugIn for NFC on Android. * - * \copyright Copyright (c) 2015-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2015-2018 Governikus GmbH & Co. KG, Germany */ #pragma once diff --git a/src/card/pcsc/PcscCard.cpp b/src/card/pcsc/PcscCard.cpp index 53f95b6c5..ec24545a5 100644 --- a/src/card/pcsc/PcscCard.cpp +++ b/src/card/pcsc/PcscCard.cpp @@ -1,10 +1,12 @@ /*! - * \copyright Copyright (c) 2014-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2014-2018 Governikus GmbH & Co. KG, Germany */ -#include "DestroyPACEChannel.h" #include "PcscCard.h" +#include "DestroyPACEChannel.h" +#include "PinModify.h" + #include #include #include @@ -381,7 +383,7 @@ PCSC_RETURNCODE PcscCard::control(PCSC_INT pCntrCode, const QByteArray& pCntrInp } -CardReturnCode PcscCard::setEidPin(uchar pTimeoutSeconds) +CardReturnCode PcscCard::setEidPin(quint8 pTimeoutSeconds, ResponseApdu& pResponseApdu) { if (!mReader->hasFeature(FeatureID::MODIFY_PIN_DIRECT)) { @@ -389,17 +391,15 @@ CardReturnCode PcscCard::setEidPin(uchar pTimeoutSeconds) } PCSC_INT cmdID = mReader->getFeatureValue(FeatureID::MODIFY_PIN_DIRECT); - PinModifyBuilder builder; + PinModify pinModify(pTimeoutSeconds); QByteArray controlRes; - PCSC_RETURNCODE pcscReturnCode = control(cmdID, builder.createChangeEidPinCommandData(pTimeoutSeconds), controlRes); + PCSC_RETURNCODE pcscReturnCode = control(cmdID, pinModify.createCcidForPcsc(), controlRes); if (pcscReturnCode != PcscUtils::Scard_S_Success) { qCWarning(card_pcsc) << "Modify PIN failed"; return CardReturnCode::COMMAND_FAILED; } - PinModifyOutput output; - output.parse(controlRes); - - return output.getReturnCode(); + pResponseApdu.setBuffer(controlRes); + return pResponseApdu.getCardReturnCode(); } diff --git a/src/card/pcsc/PcscCard.h b/src/card/pcsc/PcscCard.h index ec57db57a..7b0bb3f04 100644 --- a/src/card/pcsc/PcscCard.h +++ b/src/card/pcsc/PcscCard.h @@ -1,7 +1,7 @@ /*! * \brief Implementation of card object for PC/SC * * - * \copyright Copyright (c) 2014-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2014-2018 Governikus GmbH & Co. KG, Germany */ #pragma once @@ -58,7 +58,7 @@ class PcscCard virtual CardReturnCode destroyPaceChannel() override; - virtual CardReturnCode setEidPin(uchar pTimeoutSeconds) override; + virtual CardReturnCode setEidPin(quint8 pTimeoutSeconds, ResponseApdu& pResponseApdu) override; }; } /* namespace governikus */ diff --git a/src/card/pcsc/PcscReader.cpp b/src/card/pcsc/PcscReader.cpp index 165bb0828..e7ff9e728 100644 --- a/src/card/pcsc/PcscReader.cpp +++ b/src/card/pcsc/PcscReader.cpp @@ -1,5 +1,5 @@ /*! - * \copyright Copyright (c) 2014-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2014-2018 Governikus GmbH & Co. KG, Germany */ #include "PcscCard.h" diff --git a/src/card/pcsc/PcscReader.h b/src/card/pcsc/PcscReader.h index e33ff08d3..449de0451 100644 --- a/src/card/pcsc/PcscReader.h +++ b/src/card/pcsc/PcscReader.h @@ -1,7 +1,7 @@ /*! * \brief Implementation of \ref Reader for PCSC. * - * \copyright Copyright (c) 2014-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2014-2018 Governikus GmbH & Co. KG, Germany */ #pragma once diff --git a/src/card/pcsc/PcscReaderFeature.cpp b/src/card/pcsc/PcscReaderFeature.cpp index e56cad1cc..1260af4db 100644 --- a/src/card/pcsc/PcscReaderFeature.cpp +++ b/src/card/pcsc/PcscReaderFeature.cpp @@ -1,5 +1,5 @@ /*! - * \copyright Copyright (c) 2014-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2014-2018 Governikus GmbH & Co. KG, Germany */ #include "PcscReaderFeature.h" diff --git a/src/card/pcsc/PcscReaderFeature.h b/src/card/pcsc/PcscReaderFeature.h index 768d9eb46..ff2f2ea76 100644 --- a/src/card/pcsc/PcscReaderFeature.h +++ b/src/card/pcsc/PcscReaderFeature.h @@ -1,5 +1,5 @@ /*! - * \copyright Copyright (c) 2014-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2014-2018 Governikus GmbH & Co. KG, Germany */ #pragma once diff --git a/src/card/pcsc/PcscReaderManagerPlugIn.cpp b/src/card/pcsc/PcscReaderManagerPlugIn.cpp index 12de0bf36..f2dd55bfc 100644 --- a/src/card/pcsc/PcscReaderManagerPlugIn.cpp +++ b/src/card/pcsc/PcscReaderManagerPlugIn.cpp @@ -1,5 +1,5 @@ /*! - * \copyright Copyright (c) 2014-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2014-2018 Governikus GmbH & Co. KG, Germany */ #include "PcscReaderManagerPlugIn.h" diff --git a/src/card/pcsc/PcscReaderManagerPlugIn.h b/src/card/pcsc/PcscReaderManagerPlugIn.h index 48ad8521a..c254c7b62 100644 --- a/src/card/pcsc/PcscReaderManagerPlugIn.h +++ b/src/card/pcsc/PcscReaderManagerPlugIn.h @@ -1,7 +1,7 @@ /*! * \brief Implementation of \ref ReaderManagerPlugIn for PCSC. * - * \copyright Copyright (c) 2014-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2014-2018 Governikus GmbH & Co. KG, Germany */ #pragma once diff --git a/src/card/pcsc/PcscReaderPaceCapability.cpp b/src/card/pcsc/PcscReaderPaceCapability.cpp index 5be740c50..be3402d8b 100644 --- a/src/card/pcsc/PcscReaderPaceCapability.cpp +++ b/src/card/pcsc/PcscReaderPaceCapability.cpp @@ -1,5 +1,5 @@ /*! - * \copyright Copyright (c) 2014-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2014-2018 Governikus GmbH & Co. KG, Germany */ #include "PcscReaderPaceCapability.h" diff --git a/src/card/pcsc/PcscReaderPaceCapability.h b/src/card/pcsc/PcscReaderPaceCapability.h index 12885a236..6d9c63a28 100644 --- a/src/card/pcsc/PcscReaderPaceCapability.h +++ b/src/card/pcsc/PcscReaderPaceCapability.h @@ -1,5 +1,5 @@ /*! - * \copyright Copyright (c) 2014-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2014-2018 Governikus GmbH & Co. KG, Germany */ #pragma once diff --git a/src/card/pcsc/PcscUtils.cpp b/src/card/pcsc/PcscUtils.cpp index ea7f4c0fb..c82ec9a52 100644 --- a/src/card/pcsc/PcscUtils.cpp +++ b/src/card/pcsc/PcscUtils.cpp @@ -1,5 +1,5 @@ /*! - * \copyright Copyright (c) 2014-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2014-2018 Governikus GmbH & Co. KG, Germany */ #include "PcscUtils.h" diff --git a/src/card/pcsc/PcscUtils.h b/src/card/pcsc/PcscUtils.h index b29a46563..27d815931 100644 --- a/src/card/pcsc/PcscUtils.h +++ b/src/card/pcsc/PcscUtils.h @@ -2,7 +2,7 @@ * \brief toString method for PCSC_RETURNCODE and platform dependent * typedefs for PCSC types. * - * \copyright Copyright (c) 2014-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2014-2018 Governikus GmbH & Co. KG, Germany */ #pragma once diff --git a/src/card/remote/RemoteCard.cpp b/src/card/remote/RemoteCard.cpp index 3e6d28e50..9f031c97e 100644 --- a/src/card/remote/RemoteCard.cpp +++ b/src/card/remote/RemoteCard.cpp @@ -1,5 +1,5 @@ /*! - * \copyright Copyright (c) 2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2017-2018 Governikus GmbH & Co. KG, Germany */ #include "RemoteCard.h" @@ -8,10 +8,15 @@ #include "messages/IfdConnectResponse.h" #include "messages/IfdDisconnect.h" #include "messages/IfdDisconnectResponse.h" +#include "messages/IfdError.h" #include "messages/IfdEstablishPaceChannel.h" #include "messages/IfdEstablishPaceChannelResponse.h" +#include "messages/IfdModifyPin.h" +#include "messages/IfdModifyPinResponse.h" #include "messages/IfdTransmit.h" #include "messages/IfdTransmitResponse.h" +#include "PinModify.h" +#include "PinModifyOutput.h" #include #include @@ -58,7 +63,7 @@ void RemoteCard::onMessageReceived(const QSharedPointer& pM return; } - if (pMessage->getType() == mExpectedAnswerType) + if (pMessage->getType() == mExpectedAnswerType || pMessage->getType() == RemoteCardMessageType::IFDError) { mResponse = pMessage; mWaitingForAnswer = false; @@ -121,6 +126,7 @@ CardReturnCode RemoteCard::connect() if (!response->resultHasError()) { mConnected = true; + mSlotHandle = response->getSlotHandle(); return CardReturnCode::OK; } qCWarning(card_remote) << response->getResultMinor(); @@ -132,7 +138,7 @@ CardReturnCode RemoteCard::connect() CardReturnCode RemoteCard::disconnect() { - const QSharedPointer disconnectCmd(new IfdDisconnect(mReaderName)); + const QSharedPointer disconnectCmd(new IfdDisconnect(mSlotHandle)); if (sendMessage(disconnectCmd, RemoteCardMessageType::IFDDisconnectResponse, 5000)) { const QSharedPointer response = mResponse.dynamicCast(); @@ -158,7 +164,7 @@ bool RemoteCard::isConnected() CardReturnCode RemoteCard::transmit(const CommandApdu& pCommand, ResponseApdu& pResponse) { - QSharedPointer transmitCmd(new IfdTransmit(mReaderName, pCommand.getBuffer())); + QSharedPointer transmitCmd(new IfdTransmit(mSlotHandle, pCommand.getBuffer())); if (sendMessage(transmitCmd, RemoteCardMessageType::IFDTransmitResponse, 5000)) { const QSharedPointer response = mResponse.dynamicCast(); @@ -184,7 +190,7 @@ CardReturnCode RemoteCard::establishPaceChannel(PACE_PASSWORD_ID pPasswordId, co builder.setCertificateDescription(pCertificateDescription); const QByteArray inputData = builder.createCommandDataCcid().getBuffer(); - QSharedPointer message(new IfdEstablishPaceChannel(mReaderName, inputData)); + QSharedPointer message(new IfdEstablishPaceChannel(mSlotHandle, inputData)); if (sendMessage(message, RemoteCardMessageType::IFDEstablishPACEChannelResponse, pTimeoutSeconds * 1000)) { const QSharedPointer response = mResponse.dynamicCast(); @@ -197,3 +203,42 @@ CardReturnCode RemoteCard::establishPaceChannel(PACE_PASSWORD_ID pPasswordId, co return CardReturnCode::COMMAND_FAILED; } + + +CardReturnCode RemoteCard::setEidPin(quint8 pTimeoutSeconds, ResponseApdu& pResponseApdu) +{ + PinModify pinModify(pTimeoutSeconds); + const QByteArray inputData = pinModify.createCcidForRemote(); + + QSharedPointer message(new IfdModifyPin(mSlotHandle, inputData)); + if (sendMessage(message, RemoteCardMessageType::IFDModifyPINResponse, pTimeoutSeconds * 1000)) + { + const QSharedPointer response = mResponse.dynamicCast(); + if (response) + { + PinModifyOutput output(response->getOutputData()); + pResponseApdu.setBuffer(output.getResponseApdu().getBuffer()); + if (response->resultHasError()) + { + return response->getReturnCode(); + } + else + { + return output.getReturnCode(); + } + } + + const QSharedPointer ifdError = mResponse.dynamicCast(); + if (ifdError) + { + if (ifdError->getResultMinor() == QLatin1String("http://www.bsi.bund.de/ecard/api/1.1/resultminor/al/common#unknownAPIFunction")) + { + return CardReturnCode::PROTOCOL_ERROR; + } + + return CardReturnCode::UNKNOWN; + } + } + + return CardReturnCode::COMMAND_FAILED; +} diff --git a/src/card/remote/RemoteCard.h b/src/card/remote/RemoteCard.h index 9a59ae9ce..f302567fb 100644 --- a/src/card/remote/RemoteCard.h +++ b/src/card/remote/RemoteCard.h @@ -1,7 +1,7 @@ /*! * \brief Implementation of \ref Card for remote reader. * - * \copyright Copyright (c) 2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2017-2018 Governikus GmbH & Co. KG, Germany */ #pragma once @@ -33,6 +33,7 @@ class RemoteCard QSharedPointer mResponse; const QSharedPointer mRemoteDispatcher; QString mReaderName; + QString mSlotHandle; bool mConnected; bool sendMessage(const QSharedPointer& pMessage, RemoteCardMessageType pExpectedAnswer, unsigned long pTimeout); @@ -56,6 +57,7 @@ class RemoteCard virtual CardReturnCode establishPaceChannel(PACE_PASSWORD_ID pPasswordId, const QByteArray& pChat, const QByteArray& pCertificateDescription, EstablishPACEChannelOutput& pChannelOutput, quint8 pTimeoutSeconds = 60) override; + virtual CardReturnCode setEidPin(quint8 pTimeoutSeconds, ResponseApdu& pResponseApdu) override; }; } /* namespace governikus */ diff --git a/src/card/remote/RemoteReader.cpp b/src/card/remote/RemoteReader.cpp index da8242cce..66c46d23e 100644 --- a/src/card/remote/RemoteReader.cpp +++ b/src/card/remote/RemoteReader.cpp @@ -1,5 +1,5 @@ /*! - * \copyright Copyright (c) 2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2017-2018 Governikus GmbH & Co. KG, Germany */ #include "RemoteReader.h" diff --git a/src/card/remote/RemoteReader.h b/src/card/remote/RemoteReader.h index 09382492a..83c6dd61a 100644 --- a/src/card/remote/RemoteReader.h +++ b/src/card/remote/RemoteReader.h @@ -1,7 +1,7 @@ /*! * \brief Implementation of \ref Reader for remote reader. * - * \copyright Copyright (c) 2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2017-2018 Governikus GmbH & Co. KG, Germany */ #pragma once diff --git a/src/card/remote/RemoteReaderManagerPlugIn.cpp b/src/card/remote/RemoteReaderManagerPlugIn.cpp index 373c88521..6bc6c89c9 100644 --- a/src/card/remote/RemoteReaderManagerPlugIn.cpp +++ b/src/card/remote/RemoteReaderManagerPlugIn.cpp @@ -1,5 +1,5 @@ /*! - * \copyright Copyright (c) 2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2017-2018 Governikus GmbH & Co. KG, Germany */ #include "RemoteReaderManagerPlugIn.h" @@ -90,30 +90,32 @@ void RemoteReaderManagerPlugIn::removeAllDispatchers() const auto& keys = mRemoteDispatchers.keys(); for (const auto& dispatcher : keys) { - removeDispatcher(dispatcher); + QMetaObject::invokeMethod(dispatcher.data(), "close", Qt::QueuedConnection); } } void RemoteReaderManagerPlugIn::connectToPairedReaders() { + if (mConnectionCheckInProgress) + { + return; + } if (!mRemoteClient.isNull()) { + mConnectionCheckInProgress = true; connect(mRemoteClient.data(), &RemoteClient::fireRemoteDevicesInfo, this, &RemoteReaderManagerPlugIn::continueConnectToPairedReaders); QMetaObject::invokeMethod(mRemoteClient.data(), "requestRemoteDevices", Qt::QueuedConnection); } } -void RemoteReaderManagerPlugIn::unexpectedMessage(const QSharedPointer& pMessage, const QSharedPointer& pRemoteDispatcher, bool pSendMessage) +void RemoteReaderManagerPlugIn::unexpectedMessage(const QSharedPointer& pMessage, const QSharedPointer& pRemoteDispatcher) { qCWarning(card_remote) << "Received an unexpected message of type:" << pMessage->getType(); - if (pSendMessage) - { - const QSharedPointer errorMessage(new IfdError(QString(), QStringLiteral("/al/common#unknownAPIFunction"))); - QMetaObject::invokeMethod(pRemoteDispatcher.data(), "send", Qt::QueuedConnection, Q_ARG(QSharedPointer, errorMessage)); - } + const QSharedPointer errorMessage(new IfdError(QString(), QStringLiteral("/al/common#unknownAPIFunction"))); + QMetaObject::invokeMethod(pRemoteDispatcher.data(), "send", Qt::QueuedConnection, Q_ARG(QSharedPointer, errorMessage)); } @@ -130,6 +132,11 @@ void RemoteReaderManagerPlugIn::continueConnectToPairedReaders(const QVector& remoteDevice : pRemoteDevices) { + if (!remoteDevice->getRemoteDeviceDescriptor().isSupported()) + { + continue; + } + const QString ifdId = remoteDevice->getRemoteDeviceDescriptor().getIfdId(); // If already connected: skip. @@ -145,6 +152,7 @@ void RemoteReaderManagerPlugIn::continueConnectToPairedReaders(const QVector, remoteDevice), Q_ARG(QString, QString())); } } + mConnectionCheckInProgress = false; } @@ -156,12 +164,13 @@ void RemoteReaderManagerPlugIn::onRemoteMessage(const QSharedPointergetType())) { - unexpectedMessage(pMessage, pRemoteDispatcher, true); + unexpectedMessage(pMessage, pRemoteDispatcher); return; } @@ -205,6 +214,7 @@ RemoteReaderManagerPlugIn::RemoteReaderManagerPlugIn() , mScanTimer() , mRemoteClient() , mReaderList() + , mConnectionCheckInProgress(false) { mScanTimer.setInterval(1000); connect(&mScanTimer, &QTimer::timeout, this, &RemoteReaderManagerPlugIn::checkRemoteDevices); @@ -243,7 +253,9 @@ void RemoteReaderManagerPlugIn::addRemoteDispatcher(const QSharedPointer establishContext(new IfdEstablishContext(QStringLiteral("IFDInterface_WebSocket_v0"), DeviceInfo::getName())); + RemoteServiceSettings& settings = Env::getSingleton()->getRemoteServiceSettings(); + + const QSharedPointer establishContext(new IfdEstablishContext(IfdVersion::latest(), settings.getServerName())); QMetaObject::invokeMethod(pRemoteDispatcher.data(), "send", Qt::QueuedConnection, Q_ARG(QSharedPointer, establishContext)); } @@ -259,21 +271,24 @@ void RemoteReaderManagerPlugIn::process(const QSharedPointer currentDispatcher = mRemoteToUpdate.toStrongRef(); + if (!currentDispatcher) { - RemoteServiceSettings& settings = AppSettings::getInstance().getRemoteServiceSettings(); - auto info = settings.getRemoteInfo(mRemoteToUpdate.data()->getId()); - if (info.getName().isEmpty()) - { - initialPairing = true; - } - info.setName(pMessage->getIfdName()); - settings.updateRemoteInfo(info); + return; + } + + RemoteServiceSettings& settings = AppSettings::getInstance().getRemoteServiceSettings(); + auto info = settings.getRemoteInfo(currentDispatcher->getId()); + if (info.getName().isEmpty()) + { + initialPairing = true; } + info.setName(pMessage->getIfdName()); + settings.updateRemoteInfo(info); if (initialPairing) { - removeDispatcher(mRemoteToUpdate); + QMetaObject::invokeMethod(currentDispatcher.data(), "close", Qt::QueuedConnection); } else { @@ -291,7 +306,7 @@ void RemoteReaderManagerPlugIn::process(const QSharedPointer& p void RemoteReaderManagerPlugIn::unprocessed(const QSharedPointer& pMessage) { - unexpectedMessage(pMessage); + Q_UNUSED(pMessage); } diff --git a/src/card/remote/RemoteReaderManagerPlugIn.h b/src/card/remote/RemoteReaderManagerPlugIn.h index d3f3acbe9..e4f74aeb5 100644 --- a/src/card/remote/RemoteReaderManagerPlugIn.h +++ b/src/card/remote/RemoteReaderManagerPlugIn.h @@ -1,7 +1,7 @@ /*! * \brief Implementation of \ref ReaderManagerPlugIn for remote reader. * - * \copyright Copyright (c) 2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2017-2018 Governikus GmbH & Co. KG, Germany */ #pragma once @@ -37,12 +37,13 @@ class RemoteReaderManagerPlugIn QWeakPointer mRemoteToUpdate; QMultiMap, QString> mRemoteDispatchers; QMap mReaderList; + bool mConnectionCheckInProgress; void updateReader(const IfdStatus& pIfdStatus); void removeDispatcher(const QSharedPointer& pRemoteDispatcher); void removeAllDispatchers(); void connectToPairedReaders(); - void unexpectedMessage(const QSharedPointer& pMessage, const QSharedPointer& pRemoteDispatcher = QSharedPointer(), bool pSendMessage = false); + void unexpectedMessage(const QSharedPointer& pMessage, const QSharedPointer& pRemoteDispatcher = QSharedPointer()); private Q_SLOTS: void onRemoteMessage(const QSharedPointer& pMessage, const QSharedPointer& pRemoteDispatcher); diff --git a/src/cli/ConsoleReader.cpp b/src/cli/ConsoleReader.cpp index 037d95525..89594013c 100644 --- a/src/cli/ConsoleReader.cpp +++ b/src/cli/ConsoleReader.cpp @@ -1,5 +1,5 @@ /*! - * \copyright Copyright (c) 2015-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2015-2018 Governikus GmbH & Co. KG, Germany */ #include "ConsoleReader.h" diff --git a/src/cli/ConsoleReader.h b/src/cli/ConsoleReader.h index fa77e1dc9..c8a401665 100644 --- a/src/cli/ConsoleReader.h +++ b/src/cli/ConsoleReader.h @@ -1,7 +1,7 @@ /*! * \brief Helper to read stdin in non-blocking mode. * - * \copyright Copyright (c) 2015-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2015-2018 Governikus GmbH & Co. KG, Germany */ #pragma once diff --git a/src/cli/UIPlugInCli.cpp b/src/cli/UIPlugInCli.cpp index d3dec7f10..2599ab5c3 100644 --- a/src/cli/UIPlugInCli.cpp +++ b/src/cli/UIPlugInCli.cpp @@ -1,5 +1,5 @@ /*! - * \copyright Copyright (c) 2015-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2015-2018 Governikus GmbH & Co. KG, Germany */ #include "UIPlugInCli.h" diff --git a/src/cli/UIPlugInCli.h b/src/cli/UIPlugInCli.h index ba358cef0..be48b3482 100644 --- a/src/cli/UIPlugInCli.h +++ b/src/cli/UIPlugInCli.h @@ -1,7 +1,7 @@ /*! * \brief UIPlugIn implementation of CLI. * - * \copyright Copyright (c) 2015-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2015-2018 Governikus GmbH & Co. KG, Germany */ #pragma once diff --git a/src/configuration/CallCost.cpp b/src/configuration/CallCost.cpp index 1d0c87296..11e6c7d4b 100644 --- a/src/configuration/CallCost.cpp +++ b/src/configuration/CallCost.cpp @@ -1,5 +1,5 @@ /*! - * \copyright Copyright (c) 2016-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2016-2018 Governikus GmbH & Co. KG, Germany */ #include "CallCost.h" diff --git a/src/configuration/CallCost.h b/src/configuration/CallCost.h index c7229d533..4f6c242a6 100644 --- a/src/configuration/CallCost.h +++ b/src/configuration/CallCost.h @@ -1,7 +1,7 @@ /*! * \brief Phone call cost representation * - * \copyright Copyright (c) 2016-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2016-2018 Governikus GmbH & Co. KG, Germany */ #pragma once diff --git a/src/configuration/LanguageString.cpp b/src/configuration/LanguageString.cpp index 94620ffa6..54296e1fa 100644 --- a/src/configuration/LanguageString.cpp +++ b/src/configuration/LanguageString.cpp @@ -1,5 +1,5 @@ /* - * \copyright Copyright (c) 2016-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2016-2018 Governikus GmbH & Co. KG, Germany */ #include "LanguageString.h" diff --git a/src/configuration/LanguageString.h b/src/configuration/LanguageString.h index 2eabac7d0..260b72849 100644 --- a/src/configuration/LanguageString.h +++ b/src/configuration/LanguageString.h @@ -1,5 +1,5 @@ /* - * \copyright Copyright (c) 2016-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2016-2018 Governikus GmbH & Co. KG, Germany */ #pragma once diff --git a/src/configuration/ProviderConfiguration.cpp b/src/configuration/ProviderConfiguration.cpp index 27e7e4a59..7b3493e00 100644 --- a/src/configuration/ProviderConfiguration.cpp +++ b/src/configuration/ProviderConfiguration.cpp @@ -1,5 +1,5 @@ /*! - * \copyright Copyright (c) 2014-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2014-2018 Governikus GmbH & Co. KG, Germany */ #include "ProviderConfiguration.h" diff --git a/src/configuration/ProviderConfiguration.h b/src/configuration/ProviderConfiguration.h index 6b22d437f..a55ccfd0c 100644 --- a/src/configuration/ProviderConfiguration.h +++ b/src/configuration/ProviderConfiguration.h @@ -1,7 +1,7 @@ /*! * \brief Provides information of provider json. * - * \copyright Copyright (c) 2014-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2014-2018 Governikus GmbH & Co. KG, Germany */ #pragma once diff --git a/src/configuration/ProviderConfigurationInfo.cpp b/src/configuration/ProviderConfigurationInfo.cpp index 5cc44dbf5..e2a70a95c 100644 --- a/src/configuration/ProviderConfigurationInfo.cpp +++ b/src/configuration/ProviderConfigurationInfo.cpp @@ -1,5 +1,5 @@ /*! - * \copyright Copyright (c) 2014-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2014-2018 Governikus GmbH & Co. KG, Germany */ #include "ProviderConfigurationInfo.h" diff --git a/src/configuration/ProviderConfigurationInfo.h b/src/configuration/ProviderConfigurationInfo.h index 41e5fa24b..e7f358353 100644 --- a/src/configuration/ProviderConfigurationInfo.h +++ b/src/configuration/ProviderConfigurationInfo.h @@ -1,7 +1,7 @@ /*! * \brief Class to provide information about providers. * - * \copyright Copyright (c) 2014-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2014-2018 Governikus GmbH & Co. KG, Germany */ #pragma once diff --git a/src/configuration/ProviderConfigurationParser.cpp b/src/configuration/ProviderConfigurationParser.cpp index 2a4fcd02f..e66c8ac6c 100644 --- a/src/configuration/ProviderConfigurationParser.cpp +++ b/src/configuration/ProviderConfigurationParser.cpp @@ -1,5 +1,5 @@ /*! - * \copyright Copyright (c) 2014-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2014-2018 Governikus GmbH & Co. KG, Germany */ #include "ProviderConfigurationParser.h" diff --git a/src/configuration/ProviderConfigurationParser.h b/src/configuration/ProviderConfigurationParser.h index fa16a318d..8d9b4fed3 100644 --- a/src/configuration/ProviderConfigurationParser.h +++ b/src/configuration/ProviderConfigurationParser.h @@ -1,7 +1,7 @@ /*! * \brief Parser for provider configuration files * - * \copyright Copyright (c) 2014-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2014-2018 Governikus GmbH & Co. KG, Germany */ #pragma once diff --git a/src/configuration/ReaderConfiguration.cpp b/src/configuration/ReaderConfiguration.cpp index 9f5ff800a..5b9db4317 100644 --- a/src/configuration/ReaderConfiguration.cpp +++ b/src/configuration/ReaderConfiguration.cpp @@ -1,5 +1,5 @@ /*! - * \copyright Copyright (c) 2015-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2015-2018 Governikus GmbH & Co. KG, Germany */ #include "ReaderConfiguration.h" @@ -120,26 +120,6 @@ const QVector ReaderConfiguration::getSupportedReaderCo } -#ifndef QT_NO_DEBUG -ReaderConfigurationInfo ReaderConfiguration::getReaderConfigurationInfo(const QString& pReaderName) const -{ - for (const auto& info : qAsConst(mReaderConfigurationInfos)) - { - const QString& pattern = info.getPattern(); - const QRegularExpression expression(pattern.isEmpty() ? info.getName() : pattern); - if (pReaderName.contains(expression)) - { - return info; - } - } - - return ReaderConfigurationInfo(pReaderName); -} - - -#endif - - ReaderConfigurationInfo ReaderConfiguration::getReaderConfigurationInfoById(const UsbId& pId) const { for (const auto& info : qAsConst(mReaderConfigurationInfos)) diff --git a/src/configuration/ReaderConfiguration.h b/src/configuration/ReaderConfiguration.h index 8546ba6c7..d129a8c83 100644 --- a/src/configuration/ReaderConfiguration.h +++ b/src/configuration/ReaderConfiguration.h @@ -1,7 +1,7 @@ /*! * \brief Class to store configuration data about available card readers. * - * \copyright Copyright (c) 2015-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2015-2018 Governikus GmbH & Co. KG, Germany */ #pragma once @@ -51,10 +51,6 @@ class ReaderConfiguration const QVector& getReaderConfigurationInfos() const; const QVector getSupportedReaderConfigurationInfos() const; -#ifndef QT_NO_DEBUG - // This function is only for use in testcases - ReaderConfigurationInfo getReaderConfigurationInfo(const QString& pReaderName) const; -#endif ReaderConfigurationInfo getReaderConfigurationInfoById(const UsbId& pId) const; Q_SIGNALS: diff --git a/src/configuration/ReaderConfigurationInfo.cpp b/src/configuration/ReaderConfigurationInfo.cpp index f1caa0f30..5b21aa537 100644 --- a/src/configuration/ReaderConfigurationInfo.cpp +++ b/src/configuration/ReaderConfigurationInfo.cpp @@ -1,5 +1,5 @@ /*! - * \copyright Copyright (c) 2015-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2015-2018 Governikus GmbH & Co. KG, Germany */ #include "ReaderConfigurationInfo.h" @@ -66,6 +66,15 @@ const QString& ReaderConfigurationInfo::getName() const const QString& ReaderConfigurationInfo::getUrl() const { +#ifndef QT_NO_DEBUG + if (QCoreApplication::applicationName() == QLatin1String("Test_configuration_ReaderConfiguration")) + { + // Make the reader available on all platforms + static const QString url = QLatin1String("https://www.governikus.de/"); + return url; + } +#endif + return d->mUrl; } diff --git a/src/configuration/ReaderConfigurationInfo.h b/src/configuration/ReaderConfigurationInfo.h index 4d5147b68..8919d24b4 100644 --- a/src/configuration/ReaderConfigurationInfo.h +++ b/src/configuration/ReaderConfigurationInfo.h @@ -1,7 +1,7 @@ /*! * \brief Class to provide information about available card readers. * - * \copyright Copyright (c) 2015-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2015-2018 Governikus GmbH & Co. KG, Germany */ #pragma once diff --git a/src/configuration/ReaderConfigurationParser.cpp b/src/configuration/ReaderConfigurationParser.cpp index 3cc766d49..d50e95ccd 100644 --- a/src/configuration/ReaderConfigurationParser.cpp +++ b/src/configuration/ReaderConfigurationParser.cpp @@ -1,5 +1,5 @@ /*! - * \copyright Copyright (c) 2015-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2015-2018 Governikus GmbH & Co. KG, Germany */ #include "ReaderConfigurationParser.h" diff --git a/src/configuration/ReaderConfigurationParser.h b/src/configuration/ReaderConfigurationParser.h index 14951de92..0eb445af5 100644 --- a/src/configuration/ReaderConfigurationParser.h +++ b/src/configuration/ReaderConfigurationParser.h @@ -1,7 +1,7 @@ /*! * \brief Parser for reader configuration files * - * \copyright Copyright (c) 2015-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2015-2018 Governikus GmbH & Co. KG, Germany */ #pragma once diff --git a/src/core/CertificateChecker.cpp b/src/core/CertificateChecker.cpp index 00034e84c..dcf9f24a2 100644 --- a/src/core/CertificateChecker.cpp +++ b/src/core/CertificateChecker.cpp @@ -1,5 +1,5 @@ /*! - * \copyright Copyright (c) 2014-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2014-2018 Governikus GmbH & Co. KG, Germany */ #include "CertificateChecker.h" diff --git a/src/core/CertificateChecker.h b/src/core/CertificateChecker.h index 876eec77c..2836c46b9 100644 --- a/src/core/CertificateChecker.h +++ b/src/core/CertificateChecker.h @@ -1,7 +1,7 @@ /*! * \brief Contains the definition of the CertificateChecker class. * - * \copyright Copyright (c) 2014-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2014-2018 Governikus GmbH & Co. KG, Germany */ #pragma once diff --git a/src/core/NoScriptFinder.cpp b/src/core/NoScriptFinder.cpp deleted file mode 100644 index 30ac1b9d8..000000000 --- a/src/core/NoScriptFinder.cpp +++ /dev/null @@ -1,130 +0,0 @@ -/*! - * \copyright Copyright (c) 2015-2017 Governikus GmbH & Co. KG, Germany - */ - -#include "NoScriptFinder.h" - -#include -#include -#include -#include -#include -#include - - -namespace governikus -{ - - -class NoScriptFinderPrivate -{ - Q_DECLARE_PUBLIC(NoScriptFinder) - - NoScriptFinder * const q_ptr; - bool mExtensionFound; - - - NoScriptFinderPrivate(NoScriptFinder* pPublic) - : q_ptr(pPublic) - , mExtensionFound(false) - { - QStringList profileIniFiles; -#if defined(Q_OS_LINUX) - profileIniFiles += QDir::homePath() + QStringLiteral("/.mozilla/firefox/profiles.ini"); -#elif defined(Q_OS_WIN) - profileIniFiles += QDir::homePath() + QStringLiteral("/AppData/Roaming/Mozilla/Firefox/profiles.ini"); -#elif defined(Q_OS_MACOS) - profileIniFiles += QDir::homePath() + QStringLiteral("/Library/Application Support/Firefox/profiles.ini"); - profileIniFiles += QDir::homePath() + QStringLiteral("/Library/Mozilla/Firefox/profiles.ini"); -#endif - init(profileIniFiles); - } - - - void init(const QStringList& pProfileIniFiles) - { - for (const QString& profileFileName : pProfileIniFiles) - { - QFileInfo profileFileInfo(profileFileName); - if (!profileFileInfo.exists()) - { - qWarning() << "profile file not found" << profileFileName; - continue; - } - - QSettings profileSettings(profileFileInfo.canonicalFilePath(), QSettings::Format::IniFormat); - const auto& filtered = profileSettings.childGroups().filter(QRegularExpression(QStringLiteral("Profile[0-9]*"))); - for (const auto& profileGroup : filtered) - { - profileSettings.beginGroup(profileGroup); - bool isRelative = profileSettings.value(QStringLiteral("IsRelative")).toBool(); - QString path = profileSettings.value(QStringLiteral("Path")).toString(); - - if (!path.isEmpty()) - { - QString extensionFile = isRelative ? profileFileInfo.canonicalPath() + QLatin1Char('/') + path : path; - extensionFile += QStringLiteral("/extensions.json"); - - if ((mExtensionFound = isNoScriptConfigured(extensionFile))) - { - qDebug() << "Extension NoScript found in extensions file" << extensionFile; - return; - } - else - { - qDebug() << "Extension NoScript not found in extensions file" << extensionFile; - } - } - - profileSettings.endGroup(); - } - } - } - - - bool isNoScriptConfigured(const QString& pExtensionsFile) - { - QFile file(pExtensionsFile); - if (file.exists()) - { - if (file.open(QIODevice::ReadOnly)) - { - bool found = file.readAll().contains("\"name\":\"NoScript\""); - file.close(); - return found; - } - - qDebug() << "Cannot open extensions file" << pExtensionsFile; - } - else - { - qWarning() << "Extensions file not found" << pExtensionsFile; - } - return false; - } - - -}; - - -NoScriptFinder::NoScriptFinder(QObject* pParent) - : QObject(pParent) - , d_ptr(new NoScriptFinderPrivate(this)) -{ -} - - -NoScriptFinder::~NoScriptFinder() -{ - delete d_ptr; -} - - -bool NoScriptFinder::isExtensionFound() -{ - Q_D(NoScriptFinder); - return d->mExtensionFound; -} - - -} /* namespace governikus */ diff --git a/src/core/NoScriptFinder.h b/src/core/NoScriptFinder.h deleted file mode 100644 index 4f1145e25..000000000 --- a/src/core/NoScriptFinder.h +++ /dev/null @@ -1,34 +0,0 @@ -/*! - * \brief Determines, if a Firefox browser with NoScript extension is installed - * - * \copyright Copyright (c) 2015-2017 Governikus GmbH & Co. KG, Germany - */ - -#pragma once - -#include - -namespace governikus -{ - - -class NoScriptFinderPrivate; - - -class NoScriptFinder - : public QObject -{ - Q_OBJECT - - Q_DECLARE_PRIVATE(NoScriptFinder) - NoScriptFinderPrivate * const d_ptr; - - public: - NoScriptFinder(QObject* pParent = nullptr); - ~NoScriptFinder(); - - bool isExtensionFound(); -}; - - -} /* namespace governikus */ diff --git a/src/core/SelfAuthenticationData.cpp b/src/core/SelfAuthenticationData.cpp index a88f3c21b..bcdd7ee1a 100644 --- a/src/core/SelfAuthenticationData.cpp +++ b/src/core/SelfAuthenticationData.cpp @@ -1,5 +1,5 @@ /*! - * \copyright Copyright (c) 2014-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2014-2018 Governikus GmbH & Co. KG, Germany */ #include "SelfAuthenticationData.h" diff --git a/src/core/SelfAuthenticationData.h b/src/core/SelfAuthenticationData.h index a42bf4fa4..56e98ec22 100644 --- a/src/core/SelfAuthenticationData.h +++ b/src/core/SelfAuthenticationData.h @@ -1,7 +1,7 @@ /*! * \brief Parses self authentication data from XML data and provides its content. * - * \copyright Copyright (c) 2014-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2014-2018 Governikus GmbH & Co. KG, Germany */ #pragma once diff --git a/src/core/SignalHandler.cpp b/src/core/SignalHandler.cpp index 34880d72e..c62c5691a 100644 --- a/src/core/SignalHandler.cpp +++ b/src/core/SignalHandler.cpp @@ -1,5 +1,5 @@ /* - * \copyright Copyright (c) 2014-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2014-2018 Governikus GmbH & Co. KG, Germany */ #include "SignalHandler.h" diff --git a/src/core/SignalHandler.h b/src/core/SignalHandler.h index 8e09f0bb4..b0e623d43 100644 --- a/src/core/SignalHandler.h +++ b/src/core/SignalHandler.h @@ -1,7 +1,7 @@ /* * \brief Implements signal handler for unix and windows. * - * \copyright Copyright (c) 2014-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2014-2018 Governikus GmbH & Co. KG, Germany */ #pragma once diff --git a/src/core/SignalHandler_bsd_linux_osx.cpp b/src/core/SignalHandler_bsd_linux_osx.cpp index 61477a107..0f3bbc59a 100644 --- a/src/core/SignalHandler_bsd_linux_osx.cpp +++ b/src/core/SignalHandler_bsd_linux_osx.cpp @@ -1,5 +1,5 @@ /* - * \copyright Copyright (c) 2016-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2016-2018 Governikus GmbH & Co. KG, Germany */ #include "SignalHandler.h" diff --git a/src/core/SignalHandler_win.cpp b/src/core/SignalHandler_win.cpp index 757c6b6f3..57d12582b 100644 --- a/src/core/SignalHandler_win.cpp +++ b/src/core/SignalHandler_win.cpp @@ -1,5 +1,5 @@ /* - * \copyright Copyright (c) 2016-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2016-2018 Governikus GmbH & Co. KG, Germany */ #include "SignalHandler.h" diff --git a/src/core/TcToken.cpp b/src/core/TcToken.cpp index b0ebd060c..b20497be3 100644 --- a/src/core/TcToken.cpp +++ b/src/core/TcToken.cpp @@ -1,5 +1,5 @@ /*! - * \copyright Copyright (c) 2014-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2014-2018 Governikus GmbH & Co. KG, Germany */ diff --git a/src/core/TcToken.h b/src/core/TcToken.h index 60b31dcff..3d63222f3 100644 --- a/src/core/TcToken.h +++ b/src/core/TcToken.h @@ -1,7 +1,7 @@ /*! * \brief Parses TCTokens from XML data and provides its content. * - * \copyright Copyright (c) 2014-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2014-2018 Governikus GmbH & Co. KG, Germany */ #pragma once diff --git a/src/core/context/AuthContext.cpp b/src/core/context/AuthContext.cpp index a79dbcf08..b543be408 100644 --- a/src/core/context/AuthContext.cpp +++ b/src/core/context/AuthContext.cpp @@ -1,5 +1,5 @@ /*! - * \copyright Copyright (c) 2014-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2014-2018 Governikus GmbH & Co. KG, Germany */ #include "AuthContext.h" @@ -47,6 +47,7 @@ AuthContext::AuthContext(const QSharedPointer& pActivationCon , mDvCvc() , mCvcChainBuilderProd() , mCvcChainBuilderTest() + , mSslSession() { } @@ -213,6 +214,18 @@ void AuthContext::setTerminalCvc(const QSharedPointer& pTer } +const QByteArray& AuthContext::getSslSession() const +{ + return mSslSession; +} + + +void AuthContext::setSslSession(const QByteArray& pSession) +{ + mSslSession = pSession; +} + + QByteArray AuthContext::encodeEffectiveChat() { Q_ASSERT(mTerminalCvc); diff --git a/src/core/context/AuthContext.h b/src/core/context/AuthContext.h index f35e4366b..b5e6614e5 100644 --- a/src/core/context/AuthContext.h +++ b/src/core/context/AuthContext.h @@ -1,7 +1,7 @@ /*! * \brief Authentication context. * - * \copyright Copyright (c) 2014-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2014-2018 Governikus GmbH & Co. KG, Germany */ #pragma once @@ -87,6 +87,7 @@ class AuthContext QMultiMap mCertificates; QSharedPointer mTerminalCvc, mDvCvc; CVCertificateChainBuilder mCvcChainBuilderProd, mCvcChainBuilderTest; + QByteArray mSslSession; void initializeChat(); bool removeForbiddenAccessRights(QSet& pSet); @@ -474,7 +475,8 @@ class AuthContext void setTerminalCvc(const QSharedPointer& pTerminalCvc); - + const QByteArray& getSslSession() const; + void setSslSession(const QByteArray& pSession); }; } /* namespace governikus */ diff --git a/src/core/context/ChangePinContext.cpp b/src/core/context/ChangePinContext.cpp index ea627492a..60d65ef35 100644 --- a/src/core/context/ChangePinContext.cpp +++ b/src/core/context/ChangePinContext.cpp @@ -1,5 +1,5 @@ /*! - * \copyright Copyright (c) 2015-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2015-2018 Governikus GmbH & Co. KG, Germany */ #include "ChangePinContext.h" diff --git a/src/core/context/ChangePinContext.h b/src/core/context/ChangePinContext.h index 0073b1987..f2b114c29 100644 --- a/src/core/context/ChangePinContext.h +++ b/src/core/context/ChangePinContext.h @@ -1,7 +1,7 @@ /*! * \brief Context for changing the Pin. * - * \copyright Copyright (c) 2015-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2015-2018 Governikus GmbH & Co. KG, Germany */ #pragma once diff --git a/src/core/context/DiagnosisContext.cpp b/src/core/context/DiagnosisContext.cpp index 3d4673340..062765218 100644 --- a/src/core/context/DiagnosisContext.cpp +++ b/src/core/context/DiagnosisContext.cpp @@ -1,5 +1,5 @@ /*! - * \copyright Copyright (c) 2014-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2014-2018 Governikus GmbH & Co. KG, Germany */ #include "DiagnosisContext.h" diff --git a/src/core/context/DiagnosisContext.h b/src/core/context/DiagnosisContext.h index c59f660ca..801c514f5 100644 --- a/src/core/context/DiagnosisContext.h +++ b/src/core/context/DiagnosisContext.h @@ -1,7 +1,7 @@ /*! * \brief Contains information collected by the diagnosis functionality. * - * \copyright Copyright (c) 2014-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2014-2018 Governikus GmbH & Co. KG, Germany */ #pragma once diff --git a/src/core/context/RemoteServiceContext.cpp b/src/core/context/RemoteServiceContext.cpp index d9c781a20..613d739b5 100644 --- a/src/core/context/RemoteServiceContext.cpp +++ b/src/core/context/RemoteServiceContext.cpp @@ -1,5 +1,5 @@ /*! - * \copyright Copyright (c) 2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2017-2018 Governikus GmbH & Co. KG, Germany */ #include "RemoteServiceContext.h" @@ -11,7 +11,9 @@ using namespace governikus; RemoteServiceContext::RemoteServiceContext() : mRemoteServer(Env::create()) + , mNewPin() , mEstablishPaceChannelMessage() + , mModifyPinMessage() { } @@ -35,6 +37,18 @@ bool RemoteServiceContext::isRunning() const } +const QString& RemoteServiceContext::getNewPin() const +{ + return mNewPin; +} + + +void RemoteServiceContext::setNewPin(const QString& pNewPin) +{ + mNewPin = pNewPin; +} + + void RemoteServiceContext::setEstablishPaceChannelMessage(const QSharedPointer& pMessage) { mEstablishPaceChannelMessage = pMessage; @@ -47,12 +61,26 @@ const QSharedPointer& RemoteServiceContext::getEs } +void RemoteServiceContext::setModifyPinMessage(const QSharedPointer& pMessage) +{ + mModifyPinMessage = pMessage; +} + + +const QSharedPointer& RemoteServiceContext::getModifyPinMessage() const +{ + return mModifyPinMessage; +} + + void RemoteServiceContext::onResetMessageHandler() { setCardConnection(QSharedPointer()); setCan(QString()); setPin(QString()); setPuk(QString()); + setNewPin(QString()); resetLastPaceResultAndRetryCounter(); mEstablishPaceChannelMessage = QSharedPointer(); + mModifyPinMessage = QSharedPointer(); } diff --git a/src/core/context/RemoteServiceContext.h b/src/core/context/RemoteServiceContext.h index 3e0384ea2..e682f5ec4 100644 --- a/src/core/context/RemoteServiceContext.h +++ b/src/core/context/RemoteServiceContext.h @@ -1,12 +1,13 @@ /*! * \brief Remote service context. * - * \copyright Copyright (c) 2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2017-2018 Governikus GmbH & Co. KG, Germany */ #pragma once #include "messages/IfdEstablishPaceChannel.h" +#include "messages/IfdModifyPin.h" #include "RemoteServer.h" #include "SelfAuthenticationData.h" #include "WorkflowContext.h" @@ -24,10 +25,12 @@ class RemoteServiceContext private: const QSharedPointer mRemoteServer; + QString mNewPin; QSharedPointer mEstablishPaceChannelMessage; + QSharedPointer mModifyPinMessage; Q_SIGNALS: - void fireCancelEstablishPaceChannel(); + void fireCancelPasswordRequest(); public: RemoteServiceContext(); @@ -36,9 +39,15 @@ class RemoteServiceContext const QSharedPointer& getRemoteServer() const; bool isRunning() const; + const QString& getNewPin() const; + void setNewPin(const QString& pNewPin); + void setEstablishPaceChannelMessage(const QSharedPointer& pMessage); const QSharedPointer& getEstablishPaceChannelMessage() const; + void setModifyPinMessage(const QSharedPointer& pMessage); + const QSharedPointer& getModifyPinMessage() const; + public Q_SLOTS: void onResetMessageHandler(); }; diff --git a/src/core/context/SelfAuthContext.cpp b/src/core/context/SelfAuthContext.cpp index 2155512ea..8c9d6fc85 100644 --- a/src/core/context/SelfAuthContext.cpp +++ b/src/core/context/SelfAuthContext.cpp @@ -1,5 +1,5 @@ /*! - * \copyright Copyright (c) 2015-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2015-2018 Governikus GmbH & Co. KG, Germany */ #include "SelfAuthContext.h" diff --git a/src/core/context/SelfAuthContext.h b/src/core/context/SelfAuthContext.h index dbe54725a..d16bca3e0 100644 --- a/src/core/context/SelfAuthContext.h +++ b/src/core/context/SelfAuthContext.h @@ -1,7 +1,7 @@ /*! * \brief Self authentication context. * - * \copyright Copyright (c) 2015-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2015-2018 Governikus GmbH & Co. KG, Germany */ #pragma once diff --git a/src/core/context/WorkflowContext.cpp b/src/core/context/WorkflowContext.cpp index d2330bf01..c4d8299f6 100644 --- a/src/core/context/WorkflowContext.cpp +++ b/src/core/context/WorkflowContext.cpp @@ -1,5 +1,5 @@ /*! - * \copyright Copyright (c) 2015-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2015-2018 Governikus GmbH & Co. KG, Germany */ #include "WorkflowContext.h" diff --git a/src/core/context/WorkflowContext.h b/src/core/context/WorkflowContext.h index bf8d8b72e..09433eb6a 100644 --- a/src/core/context/WorkflowContext.h +++ b/src/core/context/WorkflowContext.h @@ -1,7 +1,7 @@ /*! * \brief Workflow context. * - * \copyright Copyright (c) 2015-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2015-2018 Governikus GmbH & Co. KG, Germany */ #pragma once diff --git a/src/core/controller/AppController.cpp b/src/core/controller/AppController.cpp index e61a9b1f3..0419144cd 100644 --- a/src/core/controller/AppController.cpp +++ b/src/core/controller/AppController.cpp @@ -1,5 +1,5 @@ /*! - * \copyright Copyright (c) 2014-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2014-2018 Governikus GmbH & Co. KG, Germany */ #include "AppController.h" @@ -53,6 +53,7 @@ using namespace governikus; Q_DECLARE_LOGGING_CATEGORY(support) +Q_DECLARE_LOGGING_CATEGORY(system) WorkflowRequest::WorkflowRequest(Action pAction, @@ -107,6 +108,21 @@ AppController::~AppController() } +bool AppController::eventFilter(QObject* pObj, QEvent* pEvent) +{ +#ifdef Q_OS_MACOS + // This event gets send on reopen events in macOS (opening the app again while + // it is in the background). Currently the event handling is only needed on macOS. + if (pEvent && pEvent->type() == QEvent::ApplicationActivate) + { + qCDebug(system) << "Got an ApplicationActivate event, showing current UI Workflow."; + Q_EMIT fireShowUi(UiModule::CURRENT); + } +#endif + return QObject::eventFilter(pObj, pEvent); +} + + bool AppController::start() { ReaderManager::getInstance().init(QSharedPointer(Env::create())); @@ -135,6 +151,8 @@ bool AppController::start() qDebug() << "Successfully started activation handler:" << handler; } + QCoreApplication::instance()->installEventFilter(this); + return true; } @@ -245,9 +263,6 @@ void AppController::onSelfAuthenticationRequested() if (canStartNewAction()) { const QSharedPointer context(new SelfAuthContext()); - #ifndef QT_NO_NETWORKPROXY - connect(Env::getSingleton(), &NetworkManager::fireProxyAuthenticationRequired, this, &AppController::fireProxyAuthenticationRequired); - #endif startNewWorkflow(Action::SELF, context); } } @@ -259,11 +274,7 @@ void AppController::onAuthenticationRequest(const QSharedPointer authContext(new AuthContext(pActivationContext)); if (canStartNewAction()) { -#ifndef QT_NO_NETWORKPROXY - connect(Env::getSingleton(), &NetworkManager::fireProxyAuthenticationRequired, this, &AppController::fireProxyAuthenticationRequired); -#endif startNewWorkflow(Action::AUTH, authContext); - return; } diff --git a/src/core/controller/AppController.h b/src/core/controller/AppController.h index 4d9be436e..21bde262f 100644 --- a/src/core/controller/AppController.h +++ b/src/core/controller/AppController.h @@ -1,7 +1,7 @@ /*! * \brief Controller of the whole program. * - * \copyright Copyright (c) 2014-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2014-2018 Governikus GmbH & Co. KG, Germany */ #pragma once @@ -50,7 +50,9 @@ class AppController public: AppController(); - virtual ~AppController(); + virtual ~AppController() override; + + virtual bool eventFilter(QObject* pObj, QEvent* pEvent) override; bool start(); diff --git a/src/core/controller/AuthController.cpp b/src/core/controller/AuthController.cpp index 6be3894bd..f1b72cdb3 100644 --- a/src/core/controller/AuthController.cpp +++ b/src/core/controller/AuthController.cpp @@ -1,5 +1,5 @@ /*! - * \copyright Copyright (c) 2014-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2014-2018 Governikus GmbH & Co. KG, Germany */ #include "controller/AuthController.h" diff --git a/src/core/controller/AuthController.h b/src/core/controller/AuthController.h index f51c850a4..4c8edfe2e 100644 --- a/src/core/controller/AuthController.h +++ b/src/core/controller/AuthController.h @@ -1,7 +1,7 @@ /*! * \brief Controller for the authentication process. * - * \copyright Copyright (c) 2014-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2014-2018 Governikus GmbH & Co. KG, Germany */ #pragma once diff --git a/src/core/controller/ChangePinController.cpp b/src/core/controller/ChangePinController.cpp index a63db484c..8ebb83e76 100644 --- a/src/core/controller/ChangePinController.cpp +++ b/src/core/controller/ChangePinController.cpp @@ -1,5 +1,5 @@ /*! - * \copyright Copyright (c) 2014-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2014-2018 Governikus GmbH & Co. KG, Germany */ #include "ChangePinController.h" diff --git a/src/core/controller/ChangePinController.h b/src/core/controller/ChangePinController.h index c00c8deb0..a723df2ed 100644 --- a/src/core/controller/ChangePinController.h +++ b/src/core/controller/ChangePinController.h @@ -1,7 +1,7 @@ /*! * \brief Controller for the PIN changing process. * - * \copyright Copyright (c) 2014-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2014-2018 Governikus GmbH & Co. KG, Germany */ #pragma once diff --git a/src/core/controller/DiagnosisController.cpp b/src/core/controller/DiagnosisController.cpp index b99dbfddb..3c6f285d7 100644 --- a/src/core/controller/DiagnosisController.cpp +++ b/src/core/controller/DiagnosisController.cpp @@ -1,5 +1,5 @@ /*! - * \copyright Copyright (c) 2014-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2014-2018 Governikus GmbH & Co. KG, Germany */ #include "DiagnosisController.h" diff --git a/src/core/controller/DiagnosisController.h b/src/core/controller/DiagnosisController.h index 4bd35f1d9..d36db50e8 100644 --- a/src/core/controller/DiagnosisController.h +++ b/src/core/controller/DiagnosisController.h @@ -1,7 +1,7 @@ /*! * \brief Controller for retrieving and presenting diagnosis info. * - * \copyright Copyright (c) 2014-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2014-2018 Governikus GmbH & Co. KG, Germany */ #pragma once diff --git a/src/core/controller/DiagnosisController_generic.cpp b/src/core/controller/DiagnosisController_generic.cpp index ffccd356c..a7fac52ad 100644 --- a/src/core/controller/DiagnosisController_generic.cpp +++ b/src/core/controller/DiagnosisController_generic.cpp @@ -1,7 +1,7 @@ /*! * \brief Generic implementation of the controller for retrieving and presenting diagnosis info. * - * \copyright Copyright (c) 2016-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2016-2018 Governikus GmbH & Co. KG, Germany */ diff --git a/src/core/controller/DiagnosisController_osx.cpp b/src/core/controller/DiagnosisController_osx.cpp index 9691faad5..577319a58 100644 --- a/src/core/controller/DiagnosisController_osx.cpp +++ b/src/core/controller/DiagnosisController_osx.cpp @@ -1,7 +1,7 @@ /*! * \brief Mac OS X specific implementation of the controller for retrieving and presenting diagnosis info. * - * \copyright Copyright (c) 2014-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2014-2018 Governikus GmbH & Co. KG, Germany */ diff --git a/src/core/controller/DiagnosisController_win.cpp b/src/core/controller/DiagnosisController_win.cpp index 3d96f1c8b..362eefb99 100644 --- a/src/core/controller/DiagnosisController_win.cpp +++ b/src/core/controller/DiagnosisController_win.cpp @@ -1,7 +1,7 @@ /*! * \brief Windows specific implementation of the controller for retrieving and presenting diagnosis info. * - * \copyright Copyright (c) 2014-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2014-2018 Governikus GmbH & Co. KG, Germany */ diff --git a/src/core/controller/RemoteServiceController.cpp b/src/core/controller/RemoteServiceController.cpp index 2965da7b5..99d3c4cc9 100644 --- a/src/core/controller/RemoteServiceController.cpp +++ b/src/core/controller/RemoteServiceController.cpp @@ -1,11 +1,12 @@ /*! - * \copyright Copyright (c) 2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2017-2018 Governikus GmbH & Co. KG, Germany */ #include "controller/RemoteServiceController.h" #include "context/RemoteServiceContext.h" #include "states/FinalState.h" +#include "states/remote_service/StateChangePinRemote.h" #include "states/remote_service/StateEstablishPaceChannel.h" #include "states/remote_service/StateProcessRemoteMessages.h" #include "states/remote_service/StateStartRemoteService.h" @@ -25,6 +26,7 @@ RemoteServiceController::RemoteServiceController(QSharedPointer(); auto sEstablishPaceChannel = addState(); + auto sChangePinRemote = addState(); auto sStopRemoteService = addState(); auto sFinal = addState(); @@ -33,10 +35,14 @@ RemoteServiceController::RemoteServiceController(QSharedPointeraddTransition(sProcessRemoteMessages, &AbstractState::fireAbort, sStopRemoteService); sProcessRemoteMessages->addTransition(sProcessRemoteMessages, &StateProcessRemoteMessages::fireEstablishPaceChannel, sEstablishPaceChannel); + sProcessRemoteMessages->addTransition(sProcessRemoteMessages, &StateProcessRemoteMessages::fireModifyPin, sChangePinRemote); sEstablishPaceChannel->addTransition(sEstablishPaceChannel, &AbstractState::fireContinue, sProcessRemoteMessages); sEstablishPaceChannel->addTransition(sEstablishPaceChannel, &AbstractState::fireAbort, sStopRemoteService); + sChangePinRemote->addTransition(sChangePinRemote, &AbstractState::fireContinue, sProcessRemoteMessages); + sChangePinRemote->addTransition(sChangePinRemote, &AbstractState::fireAbort, sStopRemoteService); + sStopRemoteService->addTransition(sStopRemoteService, &AbstractState::fireContinue, sFinal); sStopRemoteService->addTransition(sStopRemoteService, &AbstractState::fireAbort, sFinal); } diff --git a/src/core/controller/RemoteServiceController.h b/src/core/controller/RemoteServiceController.h index 355bf0171..7dd8d9791 100644 --- a/src/core/controller/RemoteServiceController.h +++ b/src/core/controller/RemoteServiceController.h @@ -1,7 +1,7 @@ /*! * \brief Controller for the remote service process. * - * \copyright Copyright (c) 2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2017-2018 Governikus GmbH & Co. KG, Germany */ #pragma once diff --git a/src/core/controller/SelfAuthController.cpp b/src/core/controller/SelfAuthController.cpp index 57bd1adce..863640eb4 100644 --- a/src/core/controller/SelfAuthController.cpp +++ b/src/core/controller/SelfAuthController.cpp @@ -1,5 +1,5 @@ /*! - * \copyright Copyright (c) 2014-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2014-2018 Governikus GmbH & Co. KG, Germany */ #include "controller/SelfAuthController.h" diff --git a/src/core/controller/SelfAuthController.h b/src/core/controller/SelfAuthController.h index b959e779d..3bf93d756 100644 --- a/src/core/controller/SelfAuthController.h +++ b/src/core/controller/SelfAuthController.h @@ -1,7 +1,7 @@ /*! * \brief Controller for the self authentication process. * - * \copyright Copyright (c) 2014-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2014-2018 Governikus GmbH & Co. KG, Germany */ #pragma once diff --git a/src/core/controller/WorkflowController.cpp b/src/core/controller/WorkflowController.cpp index d533eecf3..f2761833e 100644 --- a/src/core/controller/WorkflowController.cpp +++ b/src/core/controller/WorkflowController.cpp @@ -1,5 +1,5 @@ /*! - * \copyright Copyright (c) 2014-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2014-2018 Governikus GmbH & Co. KG, Germany */ #include "controller/WorkflowController.h" diff --git a/src/core/controller/WorkflowController.h b/src/core/controller/WorkflowController.h index b475432f8..9dc1752d6 100644 --- a/src/core/controller/WorkflowController.h +++ b/src/core/controller/WorkflowController.h @@ -1,7 +1,7 @@ /*! * \brief Base class for controllers controlling a workflow (using a state machine). * - * \copyright Copyright (c) 2014-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2014-2018 Governikus GmbH & Co. KG, Germany */ #pragma once diff --git a/src/core/paos/ElementDetector.cpp b/src/core/paos/ElementDetector.cpp index f7ec6c7d3..de353adee 100644 --- a/src/core/paos/ElementDetector.cpp +++ b/src/core/paos/ElementDetector.cpp @@ -1,5 +1,5 @@ /*! - * \copyright Copyright (c) 2014-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2014-2018 Governikus GmbH & Co. KG, Germany */ #include "ElementDetector.h" diff --git a/src/core/paos/ElementDetector.h b/src/core/paos/ElementDetector.h index df0513f3d..6f079fed9 100644 --- a/src/core/paos/ElementDetector.h +++ b/src/core/paos/ElementDetector.h @@ -1,7 +1,7 @@ /** * \brief Example class * - * \copyright Copyright (c) 2014-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2014-2018 Governikus GmbH & Co. KG, Germany */ #pragma once diff --git a/src/core/paos/MessageIdHandler.cpp b/src/core/paos/MessageIdHandler.cpp index 221ac2e3d..5ae69a1df 100644 --- a/src/core/paos/MessageIdHandler.cpp +++ b/src/core/paos/MessageIdHandler.cpp @@ -1,5 +1,5 @@ /*! - * \copyright Copyright (c) 2014-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2014-2018 Governikus GmbH & Co. KG, Germany */ #include "paos/MessageIdHandler.h" diff --git a/src/core/paos/MessageIdHandler.h b/src/core/paos/MessageIdHandler.h index 3fa82a6cd..c0f95174f 100644 --- a/src/core/paos/MessageIdHandler.h +++ b/src/core/paos/MessageIdHandler.h @@ -1,7 +1,7 @@ /*! * \brief Handle MessageIDs from XML header to use it in next paos message. * - * \copyright Copyright (c) 2014-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2014-2018 Governikus GmbH & Co. KG, Germany */ #pragma once diff --git a/src/core/paos/PaosHandler.cpp b/src/core/paos/PaosHandler.cpp index 2976b9c0c..2f584d280 100644 --- a/src/core/paos/PaosHandler.cpp +++ b/src/core/paos/PaosHandler.cpp @@ -1,5 +1,5 @@ /*! - * \copyright Copyright (c) 2014-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2014-2018 Governikus GmbH & Co. KG, Germany */ #include "paos/retrieve/DidList.h" diff --git a/src/core/paos/PaosHandler.h b/src/core/paos/PaosHandler.h index e75c47589..3eab37185 100644 --- a/src/core/paos/PaosHandler.h +++ b/src/core/paos/PaosHandler.h @@ -1,7 +1,7 @@ /*! * \brief Generic Handler to detect and parse paos types. * - * \copyright Copyright (c) 2014-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2014-2018 Governikus GmbH & Co. KG, Germany */ #pragma once diff --git a/src/core/paos/PaosMessage.cpp b/src/core/paos/PaosMessage.cpp index 88c424cfd..d56d279ca 100644 --- a/src/core/paos/PaosMessage.cpp +++ b/src/core/paos/PaosMessage.cpp @@ -1,5 +1,5 @@ /*! - * \copyright Copyright (c) 2014-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2014-2018 Governikus GmbH & Co. KG, Germany */ #include "PaosMessage.h" diff --git a/src/core/paos/PaosMessage.h b/src/core/paos/PaosMessage.h index 3641cf1ab..3e8702290 100644 --- a/src/core/paos/PaosMessage.h +++ b/src/core/paos/PaosMessage.h @@ -1,7 +1,7 @@ /*! * \brief object represents one paos type * - * \copyright Copyright (c) 2014-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2014-2018 Governikus GmbH & Co. KG, Germany */ #pragma once diff --git a/src/core/paos/PaosType.cpp b/src/core/paos/PaosType.cpp index 789d0237b..92ab86745 100644 --- a/src/core/paos/PaosType.cpp +++ b/src/core/paos/PaosType.cpp @@ -1,5 +1,5 @@ /*! - * \copyright Copyright (c) 2014-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2014-2018 Governikus GmbH & Co. KG, Germany */ #include "PaosType.h" diff --git a/src/core/paos/PaosType.h b/src/core/paos/PaosType.h index a9b016b2e..048827405 100644 --- a/src/core/paos/PaosType.h +++ b/src/core/paos/PaosType.h @@ -1,7 +1,7 @@ /*! * \brief All possible paos types * - * \copyright Copyright (c) 2014-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2014-2018 Governikus GmbH & Co. KG, Germany */ #pragma once diff --git a/src/core/paos/RequestType.cpp b/src/core/paos/RequestType.cpp index df266ccb0..f1fcfda93 100644 --- a/src/core/paos/RequestType.cpp +++ b/src/core/paos/RequestType.cpp @@ -1,5 +1,5 @@ /*! - * \copyright Copyright (c) 2014-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2014-2018 Governikus GmbH & Co. KG, Germany */ #include "RequestType.h" diff --git a/src/core/paos/RequestType.h b/src/core/paos/RequestType.h index 422da60f3..1bd9fb800 100644 --- a/src/core/paos/RequestType.h +++ b/src/core/paos/RequestType.h @@ -1,7 +1,7 @@ /*! * \brief Represents a PAOS request type according to ISOCommon.xsd * - * \copyright Copyright (c) 2014-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2014-2018 Governikus GmbH & Co. KG, Germany */ #pragma once diff --git a/src/core/paos/ResponseType.cpp b/src/core/paos/ResponseType.cpp index c37b6516a..1275ecd2a 100644 --- a/src/core/paos/ResponseType.cpp +++ b/src/core/paos/ResponseType.cpp @@ -1,5 +1,5 @@ /*! - * \copyright Copyright (c) 2014-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2014-2018 Governikus GmbH & Co. KG, Germany */ #include "ResponseType.h" diff --git a/src/core/paos/ResponseType.h b/src/core/paos/ResponseType.h index 16559719e..f1e306e22 100644 --- a/src/core/paos/ResponseType.h +++ b/src/core/paos/ResponseType.h @@ -1,7 +1,7 @@ /*! * \brief Represents a PAOS response type according to ISOCommon.xsd * - * \copyright Copyright (c) 2014-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2014-2018 Governikus GmbH & Co. KG, Germany */ diff --git a/src/core/paos/element/ConnectionHandle.cpp b/src/core/paos/element/ConnectionHandle.cpp index a769f5586..2e422d134 100644 --- a/src/core/paos/element/ConnectionHandle.cpp +++ b/src/core/paos/element/ConnectionHandle.cpp @@ -1,5 +1,5 @@ /*! - * \copyright Copyright (c) 2014-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2014-2018 Governikus GmbH & Co. KG, Germany */ #include "ConnectionHandle.h" diff --git a/src/core/paos/element/ConnectionHandle.h b/src/core/paos/element/ConnectionHandle.h index 1c96b4b53..e44beed6e 100644 --- a/src/core/paos/element/ConnectionHandle.h +++ b/src/core/paos/element/ConnectionHandle.h @@ -1,7 +1,7 @@ /*! * \brief Object hold the paos connection handle. * - * \copyright Copyright (c) 2014-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2014-2018 Governikus GmbH & Co. KG, Germany */ #pragma once diff --git a/src/core/paos/element/ConnectionHandleParser.cpp b/src/core/paos/element/ConnectionHandleParser.cpp index fbefadbde..12f8f46da 100644 --- a/src/core/paos/element/ConnectionHandleParser.cpp +++ b/src/core/paos/element/ConnectionHandleParser.cpp @@ -1,5 +1,5 @@ /*! - * \copyright Copyright (c) 2014-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2014-2018 Governikus GmbH & Co. KG, Germany */ #include "ConnectionHandleParser.h" diff --git a/src/core/paos/element/ConnectionHandleParser.h b/src/core/paos/element/ConnectionHandleParser.h index 32a60b2bb..2a0fe1209 100644 --- a/src/core/paos/element/ConnectionHandleParser.h +++ b/src/core/paos/element/ConnectionHandleParser.h @@ -1,7 +1,7 @@ /*! * \brief Parse an XML connection handle from given stream. * - * \copyright Copyright (c) 2014-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2014-2018 Governikus GmbH & Co. KG, Germany */ #pragma once diff --git a/src/core/paos/element/Eac1InputType.cpp b/src/core/paos/element/Eac1InputType.cpp index 086cb195b..0e3f3e170 100644 --- a/src/core/paos/element/Eac1InputType.cpp +++ b/src/core/paos/element/Eac1InputType.cpp @@ -1,5 +1,5 @@ /*! - * \copyright Copyright (c) 2014-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2014-2018 Governikus GmbH & Co. KG, Germany */ #include "Eac1InputType.h" diff --git a/src/core/paos/element/Eac1InputType.h b/src/core/paos/element/Eac1InputType.h index a9a1aaabc..b2c19c673 100644 --- a/src/core/paos/element/Eac1InputType.h +++ b/src/core/paos/element/Eac1InputType.h @@ -1,7 +1,7 @@ /*! * \brief Store information of Eac1InputType. * - * \copyright Copyright (c) 2014-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2014-2018 Governikus GmbH & Co. KG, Germany */ #pragma once diff --git a/src/core/paos/element/Eac2InputType.cpp b/src/core/paos/element/Eac2InputType.cpp index 543d95b2d..00213d9ab 100644 --- a/src/core/paos/element/Eac2InputType.cpp +++ b/src/core/paos/element/Eac2InputType.cpp @@ -1,5 +1,5 @@ /*! - * \copyright Copyright (c) 2014-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2014-2018 Governikus GmbH & Co. KG, Germany */ #include "Eac2InputType.h" diff --git a/src/core/paos/element/Eac2InputType.h b/src/core/paos/element/Eac2InputType.h index 47c41ba18..264324521 100644 --- a/src/core/paos/element/Eac2InputType.h +++ b/src/core/paos/element/Eac2InputType.h @@ -1,7 +1,7 @@ /*! * \brief Store information of Eac2InputType. * - * \copyright Copyright (c) 2014-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2014-2018 Governikus GmbH & Co. KG, Germany */ #pragma once diff --git a/src/core/paos/element/ElementParser.cpp b/src/core/paos/element/ElementParser.cpp index a2a962dc1..796d1bdd3 100644 --- a/src/core/paos/element/ElementParser.cpp +++ b/src/core/paos/element/ElementParser.cpp @@ -1,5 +1,5 @@ /*! - * \copyright Copyright (c) 2014-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2014-2018 Governikus GmbH & Co. KG, Germany */ #include "ElementParser.h" diff --git a/src/core/paos/element/ElementParser.h b/src/core/paos/element/ElementParser.h index 9a5bb050c..821b93482 100644 --- a/src/core/paos/element/ElementParser.h +++ b/src/core/paos/element/ElementParser.h @@ -1,7 +1,7 @@ /*! * \brief Base class for all XML element parser. * - * \copyright Copyright (c) 2014-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2014-2018 Governikus GmbH & Co. KG, Germany */ #pragma once diff --git a/src/core/paos/element/SupportedApi.cpp b/src/core/paos/element/SupportedApi.cpp index e654aa595..19c773186 100644 --- a/src/core/paos/element/SupportedApi.cpp +++ b/src/core/paos/element/SupportedApi.cpp @@ -1,5 +1,5 @@ /*! - * \copyright Copyright (c) 2014-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2014-2018 Governikus GmbH & Co. KG, Germany */ #include "SupportedApi.h" diff --git a/src/core/paos/element/SupportedApi.h b/src/core/paos/element/SupportedApi.h index 369ef6dab..b621aae46 100644 --- a/src/core/paos/element/SupportedApi.h +++ b/src/core/paos/element/SupportedApi.h @@ -1,7 +1,7 @@ /*! * \brief XML element for "SupportedAPI". See TR-03112-7. * - * \copyright Copyright (c) 2014-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2014-2018 Governikus GmbH & Co. KG, Germany */ #pragma once diff --git a/src/core/paos/element/UserAgent.cpp b/src/core/paos/element/UserAgent.cpp index 4cc9ea942..5c09d0eac 100644 --- a/src/core/paos/element/UserAgent.cpp +++ b/src/core/paos/element/UserAgent.cpp @@ -1,5 +1,5 @@ /* - * \copyright Copyright (c) 2014-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2014-2018 Governikus GmbH & Co. KG, Germany */ #include "UserAgent.h" diff --git a/src/core/paos/element/UserAgent.h b/src/core/paos/element/UserAgent.h index 6db3c9f19..e9b5c90c8 100644 --- a/src/core/paos/element/UserAgent.h +++ b/src/core/paos/element/UserAgent.h @@ -1,7 +1,7 @@ /* * \brief Provides UserAgent information for PAOS elements. * - * \copyright Copyright (c) 2014-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2014-2018 Governikus GmbH & Co. KG, Germany */ #pragma once diff --git a/src/core/paos/invoke/DidAuthenticateResponseEac1.cpp b/src/core/paos/invoke/DidAuthenticateResponseEac1.cpp index 0201568a8..a11ed5151 100644 --- a/src/core/paos/invoke/DidAuthenticateResponseEac1.cpp +++ b/src/core/paos/invoke/DidAuthenticateResponseEac1.cpp @@ -1,5 +1,5 @@ /*! - * \copyright Copyright (c) 2014-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2014-2018 Governikus GmbH & Co. KG, Germany */ #include "DidAuthenticateResponseEac1.h" diff --git a/src/core/paos/invoke/DidAuthenticateResponseEac1.h b/src/core/paos/invoke/DidAuthenticateResponseEac1.h index 46a63220e..27fec4f65 100644 --- a/src/core/paos/invoke/DidAuthenticateResponseEac1.h +++ b/src/core/paos/invoke/DidAuthenticateResponseEac1.h @@ -1,7 +1,7 @@ /*! * \brief Generate information for DIDAuthenticateResponseEAC1. * - * \copyright Copyright (c) 2014-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2014-2018 Governikus GmbH & Co. KG, Germany */ #pragma once diff --git a/src/core/paos/invoke/DidAuthenticateResponseEac2.cpp b/src/core/paos/invoke/DidAuthenticateResponseEac2.cpp index 566d1718c..441792023 100644 --- a/src/core/paos/invoke/DidAuthenticateResponseEac2.cpp +++ b/src/core/paos/invoke/DidAuthenticateResponseEac2.cpp @@ -1,5 +1,5 @@ /*! - * \copyright Copyright (c) 2014-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2014-2018 Governikus GmbH & Co. KG, Germany */ #include "DidAuthenticateResponseEac2.h" diff --git a/src/core/paos/invoke/DidAuthenticateResponseEac2.h b/src/core/paos/invoke/DidAuthenticateResponseEac2.h index 2ddf8da1f..a22a6b705 100644 --- a/src/core/paos/invoke/DidAuthenticateResponseEac2.h +++ b/src/core/paos/invoke/DidAuthenticateResponseEac2.h @@ -1,7 +1,7 @@ /*! * \brief Generate information for DIDAuthenticateResponseEAC2. * - * \copyright Copyright (c) 2014-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2014-2018 Governikus GmbH & Co. KG, Germany */ #pragma once diff --git a/src/core/paos/invoke/DidListResponse.cpp b/src/core/paos/invoke/DidListResponse.cpp index 9e3433781..9a81be057 100644 --- a/src/core/paos/invoke/DidListResponse.cpp +++ b/src/core/paos/invoke/DidListResponse.cpp @@ -1,5 +1,5 @@ /*! - * \copyright Copyright (c) 2014-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2014-2018 Governikus GmbH & Co. KG, Germany */ #include "DidListResponse.h" diff --git a/src/core/paos/invoke/DidListResponse.h b/src/core/paos/invoke/DidListResponse.h index 1abfadb9f..62d213cef 100644 --- a/src/core/paos/invoke/DidListResponse.h +++ b/src/core/paos/invoke/DidListResponse.h @@ -1,7 +1,7 @@ /*! * \brief Generate information for DIDListResponse. * - * \copyright Copyright (c) 2014-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2014-2018 Governikus GmbH & Co. KG, Germany */ #pragma once diff --git a/src/core/paos/invoke/DisconnectResponse.cpp b/src/core/paos/invoke/DisconnectResponse.cpp index 03b139e9f..6bc46dda9 100644 --- a/src/core/paos/invoke/DisconnectResponse.cpp +++ b/src/core/paos/invoke/DisconnectResponse.cpp @@ -1,5 +1,5 @@ /*! - * \copyright Copyright (c) 2014-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2014-2018 Governikus GmbH & Co. KG, Germany */ #include "DisconnectResponse.h" diff --git a/src/core/paos/invoke/DisconnectResponse.h b/src/core/paos/invoke/DisconnectResponse.h index d7a9b6782..987c51e1c 100644 --- a/src/core/paos/invoke/DisconnectResponse.h +++ b/src/core/paos/invoke/DisconnectResponse.h @@ -1,7 +1,7 @@ /*! * \brief Generate information for DisconnectResponse. * - * \copyright Copyright (c) 2014-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2014-2018 Governikus GmbH & Co. KG, Germany */ #pragma once diff --git a/src/core/paos/invoke/InitializeFrameworkResponse.cpp b/src/core/paos/invoke/InitializeFrameworkResponse.cpp index 278e1b6cf..201c587da 100644 --- a/src/core/paos/invoke/InitializeFrameworkResponse.cpp +++ b/src/core/paos/invoke/InitializeFrameworkResponse.cpp @@ -1,5 +1,5 @@ /*! - * \copyright Copyright (c) 2014-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2014-2018 Governikus GmbH & Co. KG, Germany */ #include "InitializeFrameworkResponse.h" diff --git a/src/core/paos/invoke/InitializeFrameworkResponse.h b/src/core/paos/invoke/InitializeFrameworkResponse.h index 21418573a..151fe6bb7 100644 --- a/src/core/paos/invoke/InitializeFrameworkResponse.h +++ b/src/core/paos/invoke/InitializeFrameworkResponse.h @@ -1,7 +1,7 @@ /*! * \brief Generate information for InitializeFrameworkResponse. * - * \copyright Copyright (c) 2014-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2014-2018 Governikus GmbH & Co. KG, Germany */ #pragma once diff --git a/src/core/paos/invoke/PaosCreator.cpp b/src/core/paos/invoke/PaosCreator.cpp index 322663677..608f44162 100644 --- a/src/core/paos/invoke/PaosCreator.cpp +++ b/src/core/paos/invoke/PaosCreator.cpp @@ -1,5 +1,5 @@ /*! - * \copyright Copyright (c) 2014-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2014-2018 Governikus GmbH & Co. KG, Germany */ #include "PaosCreator.h" diff --git a/src/core/paos/invoke/PaosCreator.h b/src/core/paos/invoke/PaosCreator.h index d251c5400..a860fffe3 100644 --- a/src/core/paos/invoke/PaosCreator.h +++ b/src/core/paos/invoke/PaosCreator.h @@ -1,7 +1,7 @@ /*! * \brief Base class to create a PaosMessage. * - * \copyright Copyright (c) 2014-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2014-2018 Governikus GmbH & Co. KG, Germany */ #pragma once diff --git a/src/core/paos/invoke/StartPaos.cpp b/src/core/paos/invoke/StartPaos.cpp index 83d8c9700..2b6390d98 100644 --- a/src/core/paos/invoke/StartPaos.cpp +++ b/src/core/paos/invoke/StartPaos.cpp @@ -1,5 +1,5 @@ /*! - * \copyright Copyright (c) 2014-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2014-2018 Governikus GmbH & Co. KG, Germany */ #include "StartPaos.h" diff --git a/src/core/paos/invoke/StartPaos.h b/src/core/paos/invoke/StartPaos.h index e05feed1b..fb706dd7a 100644 --- a/src/core/paos/invoke/StartPaos.h +++ b/src/core/paos/invoke/StartPaos.h @@ -1,7 +1,7 @@ /*! * \brief Generate information for StartPaos. * - * \copyright Copyright (c) 2014-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2014-2018 Governikus GmbH & Co. KG, Germany */ #pragma once diff --git a/src/core/paos/invoke/TransmitResponse.cpp b/src/core/paos/invoke/TransmitResponse.cpp index 3e81005b8..e40f86927 100644 --- a/src/core/paos/invoke/TransmitResponse.cpp +++ b/src/core/paos/invoke/TransmitResponse.cpp @@ -1,5 +1,5 @@ /*! - * \copyright Copyright (c) 2014-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2014-2018 Governikus GmbH & Co. KG, Germany */ #include "TransmitResponse.h" diff --git a/src/core/paos/invoke/TransmitResponse.h b/src/core/paos/invoke/TransmitResponse.h index d70dcd9cc..60d14fda1 100644 --- a/src/core/paos/invoke/TransmitResponse.h +++ b/src/core/paos/invoke/TransmitResponse.h @@ -1,7 +1,7 @@ /*! * \brief Generate information for TransmitResponse. * - * \copyright Copyright (c) 2014-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2014-2018 Governikus GmbH & Co. KG, Germany */ #pragma once diff --git a/src/core/paos/retrieve/DidAuthenticateEac1.cpp b/src/core/paos/retrieve/DidAuthenticateEac1.cpp index 142df51c3..dd1d6d502 100644 --- a/src/core/paos/retrieve/DidAuthenticateEac1.cpp +++ b/src/core/paos/retrieve/DidAuthenticateEac1.cpp @@ -1,5 +1,5 @@ /*! - * \copyright Copyright (c) 2014-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2014-2018 Governikus GmbH & Co. KG, Germany */ #include "asn1/ASN1Util.h" diff --git a/src/core/paos/retrieve/DidAuthenticateEac1.h b/src/core/paos/retrieve/DidAuthenticateEac1.h index c48a20466..ceb846548 100644 --- a/src/core/paos/retrieve/DidAuthenticateEac1.h +++ b/src/core/paos/retrieve/DidAuthenticateEac1.h @@ -1,7 +1,7 @@ /*! * \brief Class represents the retrieved PAOS EAC1InputType. * - * \copyright Copyright (c) 2014-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2014-2018 Governikus GmbH & Co. KG, Germany */ diff --git a/src/core/paos/retrieve/DidAuthenticateEac1Parser.cpp b/src/core/paos/retrieve/DidAuthenticateEac1Parser.cpp index 6cfc8191c..2a2708d49 100644 --- a/src/core/paos/retrieve/DidAuthenticateEac1Parser.cpp +++ b/src/core/paos/retrieve/DidAuthenticateEac1Parser.cpp @@ -1,7 +1,7 @@ /*! * \brief Parser for the PAOS DidAuthenticateEac1 element. * - * \copyright Copyright (c) 2014-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2014-2018 Governikus GmbH & Co. KG, Germany */ #include "asn1/ASN1Util.h" diff --git a/src/core/paos/retrieve/DidAuthenticateEac1Parser.h b/src/core/paos/retrieve/DidAuthenticateEac1Parser.h index 4df647a79..7ebdc3bc6 100644 --- a/src/core/paos/retrieve/DidAuthenticateEac1Parser.h +++ b/src/core/paos/retrieve/DidAuthenticateEac1Parser.h @@ -1,7 +1,7 @@ /*! * \brief Parser for the PAOS DidAuthenticateEac1 element. * - * \copyright Copyright (c) 2014-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2014-2018 Governikus GmbH & Co. KG, Germany */ #pragma once diff --git a/src/core/paos/retrieve/DidAuthenticateEac2.cpp b/src/core/paos/retrieve/DidAuthenticateEac2.cpp index 1fc1457f4..7a409d99f 100644 --- a/src/core/paos/retrieve/DidAuthenticateEac2.cpp +++ b/src/core/paos/retrieve/DidAuthenticateEac2.cpp @@ -1,5 +1,5 @@ /*! - * \copyright Copyright (c) 2014-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2014-2018 Governikus GmbH & Co. KG, Germany */ #include "paos/retrieve/DidAuthenticateEac2.h" diff --git a/src/core/paos/retrieve/DidAuthenticateEac2.h b/src/core/paos/retrieve/DidAuthenticateEac2.h index 4b85cf0ba..be731c288 100644 --- a/src/core/paos/retrieve/DidAuthenticateEac2.h +++ b/src/core/paos/retrieve/DidAuthenticateEac2.h @@ -1,7 +1,7 @@ /*! * \brief Class represents the retrieved PAOS EAC2InputType. * - * \copyright Copyright (c) 2014-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2014-2018 Governikus GmbH & Co. KG, Germany */ #pragma once diff --git a/src/core/paos/retrieve/DidAuthenticateEac2Parser.cpp b/src/core/paos/retrieve/DidAuthenticateEac2Parser.cpp index 1371d6272..866131ff7 100644 --- a/src/core/paos/retrieve/DidAuthenticateEac2Parser.cpp +++ b/src/core/paos/retrieve/DidAuthenticateEac2Parser.cpp @@ -1,5 +1,5 @@ /*! - * \copyright Copyright (c) 2014-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2014-2018 Governikus GmbH & Co. KG, Germany */ #include "paos/retrieve/DidAuthenticateEac2Parser.h" diff --git a/src/core/paos/retrieve/DidAuthenticateEac2Parser.h b/src/core/paos/retrieve/DidAuthenticateEac2Parser.h index ba6ed5793..0bd6e51ad 100644 --- a/src/core/paos/retrieve/DidAuthenticateEac2Parser.h +++ b/src/core/paos/retrieve/DidAuthenticateEac2Parser.h @@ -1,7 +1,7 @@ /*! * \brief Parse information for DidAuthenticateEac2. * - * \copyright Copyright (c) 2014-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2014-2018 Governikus GmbH & Co. KG, Germany */ #pragma once diff --git a/src/core/paos/retrieve/DidAuthenticateEacAdditional.cpp b/src/core/paos/retrieve/DidAuthenticateEacAdditional.cpp index 02c8f329e..3c46a57a4 100644 --- a/src/core/paos/retrieve/DidAuthenticateEacAdditional.cpp +++ b/src/core/paos/retrieve/DidAuthenticateEacAdditional.cpp @@ -1,5 +1,5 @@ /*! - * \copyright Copyright (c) 2014-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2014-2018 Governikus GmbH & Co. KG, Germany */ #include "DidAuthenticateEacAdditional.h" diff --git a/src/core/paos/retrieve/DidAuthenticateEacAdditional.h b/src/core/paos/retrieve/DidAuthenticateEacAdditional.h index 52f20a03e..cb0f85a46 100644 --- a/src/core/paos/retrieve/DidAuthenticateEacAdditional.h +++ b/src/core/paos/retrieve/DidAuthenticateEacAdditional.h @@ -1,7 +1,7 @@ /*! * \brief Class to hold information of DIDAuthenticateEACAdditional. * - * \copyright Copyright (c) 2014-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2014-2018 Governikus GmbH & Co. KG, Germany */ #pragma once diff --git a/src/core/paos/retrieve/DidAuthenticateEacAdditionalParser.cpp b/src/core/paos/retrieve/DidAuthenticateEacAdditionalParser.cpp index 569c89b68..96c9b4ffd 100644 --- a/src/core/paos/retrieve/DidAuthenticateEacAdditionalParser.cpp +++ b/src/core/paos/retrieve/DidAuthenticateEacAdditionalParser.cpp @@ -1,5 +1,5 @@ /*! - * \copyright Copyright (c) 2014-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2014-2018 Governikus GmbH & Co. KG, Germany */ #include "paos/retrieve/DidAuthenticateEacAdditionalParser.h" diff --git a/src/core/paos/retrieve/DidAuthenticateEacAdditionalParser.h b/src/core/paos/retrieve/DidAuthenticateEacAdditionalParser.h index 4bfd0b82e..1cc8223dd 100644 --- a/src/core/paos/retrieve/DidAuthenticateEacAdditionalParser.h +++ b/src/core/paos/retrieve/DidAuthenticateEacAdditionalParser.h @@ -1,7 +1,7 @@ /*! * \brief Parse information for DidAuthenticateEacAdditional. * - * \copyright Copyright (c) 2014-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2014-2018 Governikus GmbH & Co. KG, Germany */ #pragma once diff --git a/src/core/paos/retrieve/DidList.cpp b/src/core/paos/retrieve/DidList.cpp index 13d233798..d6f0ec507 100644 --- a/src/core/paos/retrieve/DidList.cpp +++ b/src/core/paos/retrieve/DidList.cpp @@ -1,5 +1,5 @@ /*! - * \copyright Copyright (c) 2014-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2014-2018 Governikus GmbH & Co. KG, Germany */ #include "DidList.h" diff --git a/src/core/paos/retrieve/DidList.h b/src/core/paos/retrieve/DidList.h index 25d8dd8cf..aba87a776 100644 --- a/src/core/paos/retrieve/DidList.h +++ b/src/core/paos/retrieve/DidList.h @@ -1,7 +1,7 @@ /*! * \brief Class represents the retrieved PAOS DIDList. * - * \copyright Copyright (c) 2014-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2014-2018 Governikus GmbH & Co. KG, Germany */ #pragma once diff --git a/src/core/paos/retrieve/Disconnect.cpp b/src/core/paos/retrieve/Disconnect.cpp index 70de6909a..88beb185d 100644 --- a/src/core/paos/retrieve/Disconnect.cpp +++ b/src/core/paos/retrieve/Disconnect.cpp @@ -1,5 +1,5 @@ /*! - * \copyright Copyright (c) 2014-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2014-2018 Governikus GmbH & Co. KG, Germany */ #include "Disconnect.h" diff --git a/src/core/paos/retrieve/Disconnect.h b/src/core/paos/retrieve/Disconnect.h index dc08e8877..94e08b117 100644 --- a/src/core/paos/retrieve/Disconnect.h +++ b/src/core/paos/retrieve/Disconnect.h @@ -1,7 +1,7 @@ /*! * \brief Class represents the retrieved PAOS Disconnect. * - * \copyright Copyright (c) 2014-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2014-2018 Governikus GmbH & Co. KG, Germany */ #pragma once diff --git a/src/core/paos/retrieve/InitializeFramework.cpp b/src/core/paos/retrieve/InitializeFramework.cpp index fffa5af60..8ded29e32 100644 --- a/src/core/paos/retrieve/InitializeFramework.cpp +++ b/src/core/paos/retrieve/InitializeFramework.cpp @@ -1,7 +1,7 @@ /*! * \brief Class represents the retrieved PAOS InitializeFramework * - * \copyright Copyright (c) 2014-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2014-2018 Governikus GmbH & Co. KG, Germany */ #include "paos/PaosType.h" diff --git a/src/core/paos/retrieve/InitializeFramework.h b/src/core/paos/retrieve/InitializeFramework.h index e73be2125..a6156376d 100644 --- a/src/core/paos/retrieve/InitializeFramework.h +++ b/src/core/paos/retrieve/InitializeFramework.h @@ -1,7 +1,7 @@ /*! * \brief Class to parse InitializeFramework from server. * - * \copyright Copyright (c) 2014-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2014-2018 Governikus GmbH & Co. KG, Germany */ #pragma once diff --git a/src/core/paos/retrieve/PaosParser.cpp b/src/core/paos/retrieve/PaosParser.cpp index 08bb7af6a..f281560fe 100644 --- a/src/core/paos/retrieve/PaosParser.cpp +++ b/src/core/paos/retrieve/PaosParser.cpp @@ -1,5 +1,5 @@ /*! - * \copyright Copyright (c) 2014-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2014-2018 Governikus GmbH & Co. KG, Germany */ #include "PaosParser.h" diff --git a/src/core/paos/retrieve/PaosParser.h b/src/core/paos/retrieve/PaosParser.h index 2e5b2063d..b164b5c59 100644 --- a/src/core/paos/retrieve/PaosParser.h +++ b/src/core/paos/retrieve/PaosParser.h @@ -1,7 +1,7 @@ /*! * \brief Base class for PAOS message parsers. * - * \copyright Copyright (c) 2014-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2014-2018 Governikus GmbH & Co. KG, Germany */ #pragma once diff --git a/src/core/paos/retrieve/StartPaosResponse.cpp b/src/core/paos/retrieve/StartPaosResponse.cpp index 6a05c1d3b..9bc322c00 100644 --- a/src/core/paos/retrieve/StartPaosResponse.cpp +++ b/src/core/paos/retrieve/StartPaosResponse.cpp @@ -1,5 +1,5 @@ /*! - * \copyright Copyright (c) 2014-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2014-2018 Governikus GmbH & Co. KG, Germany */ #include "StartPaosResponse.h" diff --git a/src/core/paos/retrieve/StartPaosResponse.h b/src/core/paos/retrieve/StartPaosResponse.h index 07c9dcced..55bd8d97f 100644 --- a/src/core/paos/retrieve/StartPaosResponse.h +++ b/src/core/paos/retrieve/StartPaosResponse.h @@ -1,7 +1,7 @@ /*! * \brief Class represents the retrieved PAOS StartPaosResponse * - * \copyright Copyright (c) 2014-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2014-2018 Governikus GmbH & Co. KG, Germany */ #pragma once diff --git a/src/core/paos/retrieve/Transmit.cpp b/src/core/paos/retrieve/Transmit.cpp index 402eaea5b..2960acb53 100644 --- a/src/core/paos/retrieve/Transmit.cpp +++ b/src/core/paos/retrieve/Transmit.cpp @@ -1,5 +1,5 @@ /*! - * \copyright Copyright (c) 2014-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2014-2018 Governikus GmbH & Co. KG, Germany */ #include "Transmit.h" diff --git a/src/core/paos/retrieve/Transmit.h b/src/core/paos/retrieve/Transmit.h index 5da1e68ec..036da6545 100644 --- a/src/core/paos/retrieve/Transmit.h +++ b/src/core/paos/retrieve/Transmit.h @@ -1,7 +1,7 @@ /*! * \brief Transmit objects hold a transmit request and provide access to the transmitted data via member functions. * - * \copyright Copyright (c) 2014-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2014-2018 Governikus GmbH & Co. KG, Germany */ #pragma once diff --git a/src/core/paos/retrieve/TransmitParser.cpp b/src/core/paos/retrieve/TransmitParser.cpp index d449707d9..4ff66623c 100644 --- a/src/core/paos/retrieve/TransmitParser.cpp +++ b/src/core/paos/retrieve/TransmitParser.cpp @@ -1,5 +1,5 @@ /*! - * \copyright Copyright (c) 2014-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2014-2018 Governikus GmbH & Co. KG, Germany */ #include "TransmitParser.h" diff --git a/src/core/paos/retrieve/TransmitParser.h b/src/core/paos/retrieve/TransmitParser.h index c9878d79b..5867ac0f7 100644 --- a/src/core/paos/retrieve/TransmitParser.h +++ b/src/core/paos/retrieve/TransmitParser.h @@ -1,7 +1,7 @@ /*! * \brief Parser for the PAOS Transmit element. * - * \copyright Copyright (c) 2014-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2014-2018 Governikus GmbH & Co. KG, Germany */ #pragma once diff --git a/src/core/states/AbstractGenericState.h b/src/core/states/AbstractGenericState.h index c84e81f59..ee59ca9d7 100644 --- a/src/core/states/AbstractGenericState.h +++ b/src/core/states/AbstractGenericState.h @@ -4,7 +4,7 @@ * We cannot parameterize the super class AbstractState because Qt does not * support template classes. * - * \copyright Copyright (c) 2014-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2014-2018 Governikus GmbH & Co. KG, Germany */ #pragma once diff --git a/src/core/states/AbstractState.cpp b/src/core/states/AbstractState.cpp index 501fde546..f2d6db445 100644 --- a/src/core/states/AbstractState.cpp +++ b/src/core/states/AbstractState.cpp @@ -1,5 +1,5 @@ /*! - * \copyright Copyright (c) 2014-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2014-2018 Governikus GmbH & Co. KG, Germany */ #include "AbstractState.h" diff --git a/src/core/states/AbstractState.h b/src/core/states/AbstractState.h index 173950149..95fcd03fc 100644 --- a/src/core/states/AbstractState.h +++ b/src/core/states/AbstractState.h @@ -1,7 +1,7 @@ /*! * \brief Base class for all states taken by the state machine. * - * \copyright Copyright (c) 2014-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2014-2018 Governikus GmbH & Co. KG, Germany */ #pragma once diff --git a/src/core/states/CompositeStateProcessCvcsAndSetRights.cpp b/src/core/states/CompositeStateProcessCvcsAndSetRights.cpp index 6e5e53fe5..a3a931beb 100644 --- a/src/core/states/CompositeStateProcessCvcsAndSetRights.cpp +++ b/src/core/states/CompositeStateProcessCvcsAndSetRights.cpp @@ -1,5 +1,5 @@ /*! - * \copyright Copyright (c) 2016-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2016-2018 Governikus GmbH & Co. KG, Germany */ #include "CompositeStateProcessCvcsAndSetRights.h" diff --git a/src/core/states/CompositeStateProcessCvcsAndSetRights.h b/src/core/states/CompositeStateProcessCvcsAndSetRights.h index adfc680f2..74ff754cc 100644 --- a/src/core/states/CompositeStateProcessCvcsAndSetRights.h +++ b/src/core/states/CompositeStateProcessCvcsAndSetRights.h @@ -1,7 +1,7 @@ /*! * \brief Composite state for selecting a card. * - * \copyright Copyright (c) 2016-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2016-2018 Governikus GmbH & Co. KG, Germany */ #pragma once diff --git a/src/core/states/CompositeStateSelectCard.cpp b/src/core/states/CompositeStateSelectCard.cpp index f87f21b6d..a3d86d278 100644 --- a/src/core/states/CompositeStateSelectCard.cpp +++ b/src/core/states/CompositeStateSelectCard.cpp @@ -1,5 +1,5 @@ /*! - * \copyright Copyright (c) 2016-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2016-2018 Governikus GmbH & Co. KG, Germany */ #include "CompositeStateSelectCard.h" diff --git a/src/core/states/CompositeStateSelectCard.h b/src/core/states/CompositeStateSelectCard.h index 31d7d6973..a64596ca2 100644 --- a/src/core/states/CompositeStateSelectCard.h +++ b/src/core/states/CompositeStateSelectCard.h @@ -1,7 +1,7 @@ /*! * \brief Composite state for selecting a card. * - * \copyright Copyright (c) 2016-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2016-2018 Governikus GmbH & Co. KG, Germany */ #pragma once diff --git a/src/core/states/FinalState.cpp b/src/core/states/FinalState.cpp index 939b04145..a90d06463 100644 --- a/src/core/states/FinalState.cpp +++ b/src/core/states/FinalState.cpp @@ -1,5 +1,5 @@ /*! - * \copyright Copyright (c) 2016-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2016-2018 Governikus GmbH & Co. KG, Germany */ #include "states/FinalState.h" diff --git a/src/core/states/FinalState.h b/src/core/states/FinalState.h index 28f533075..04551295b 100644 --- a/src/core/states/FinalState.h +++ b/src/core/states/FinalState.h @@ -1,7 +1,7 @@ /*! * \brief A final state which blocks the state machine before termination. * - * \copyright Copyright (c) 2016-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2016-2018 Governikus GmbH & Co. KG, Germany */ #pragma once diff --git a/src/core/states/StateBuilder.h b/src/core/states/StateBuilder.h index 321445fcb..a3449f871 100644 --- a/src/core/states/StateBuilder.h +++ b/src/core/states/StateBuilder.h @@ -1,7 +1,7 @@ /*! * \brief Builder for states. * - * \copyright Copyright (c) 2015-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2015-2018 Governikus GmbH & Co. KG, Germany */ #pragma once diff --git a/src/core/states/StateCertificateDescriptionCheck.cpp b/src/core/states/StateCertificateDescriptionCheck.cpp index 27fb829da..d4884cf9d 100644 --- a/src/core/states/StateCertificateDescriptionCheck.cpp +++ b/src/core/states/StateCertificateDescriptionCheck.cpp @@ -1,5 +1,5 @@ /*! - * \copyright Copyright (c) 2014-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2014-2018 Governikus GmbH & Co. KG, Germany */ #include "StateCertificateDescriptionCheck.h" diff --git a/src/core/states/StateCertificateDescriptionCheck.h b/src/core/states/StateCertificateDescriptionCheck.h index 29cf41f82..4eb494a1c 100644 --- a/src/core/states/StateCertificateDescriptionCheck.h +++ b/src/core/states/StateCertificateDescriptionCheck.h @@ -1,5 +1,5 @@ /*! - * \copyright Copyright (c) 2014-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2014-2018 Governikus GmbH & Co. KG, Germany */ #pragma once diff --git a/src/core/states/StateChangePin.cpp b/src/core/states/StateChangePin.cpp index acdedcfee..5851d8d31 100644 --- a/src/core/states/StateChangePin.cpp +++ b/src/core/states/StateChangePin.cpp @@ -1,5 +1,5 @@ /*! - * \copyright Copyright (c) 2014-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2014-2018 Governikus GmbH & Co. KG, Germany */ #include "ReaderManager.h" diff --git a/src/core/states/StateChangePin.h b/src/core/states/StateChangePin.h index 88f589e53..cbbdb0af8 100644 --- a/src/core/states/StateChangePin.h +++ b/src/core/states/StateChangePin.h @@ -1,7 +1,7 @@ /*! * \brief Controller for the state changing the PIN. * - * \copyright Copyright (c) 2014-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2014-2018 Governikus GmbH & Co. KG, Germany */ #pragma once diff --git a/src/core/states/StateCheckCertificates.cpp b/src/core/states/StateCheckCertificates.cpp index 99730caad..4548d8843 100644 --- a/src/core/states/StateCheckCertificates.cpp +++ b/src/core/states/StateCheckCertificates.cpp @@ -1,5 +1,5 @@ /*! - * \copyright Copyright (c) 2014-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2014-2018 Governikus GmbH & Co. KG, Germany */ #include "StateCheckCertificates.h" diff --git a/src/core/states/StateCheckCertificates.h b/src/core/states/StateCheckCertificates.h index 929caa645..52776b3f1 100644 --- a/src/core/states/StateCheckCertificates.h +++ b/src/core/states/StateCheckCertificates.h @@ -3,7 +3,7 @@ * (i.e. those stored in the AuthContext) are in the CertificateDescription * extension of the eService certificate. * - * \copyright Copyright (c) 2014-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2014-2018 Governikus GmbH & Co. KG, Germany */ #pragma once diff --git a/src/core/states/StateCheckError.cpp b/src/core/states/StateCheckError.cpp index df8037638..40aa2f139 100644 --- a/src/core/states/StateCheckError.cpp +++ b/src/core/states/StateCheckError.cpp @@ -1,5 +1,5 @@ /*! - * \copyright Copyright (c) 2014-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2014-2018 Governikus GmbH & Co. KG, Germany */ #include "states/StateCheckError.h" diff --git a/src/core/states/StateCheckError.h b/src/core/states/StateCheckError.h index 61fc159a3..b3b413a8b 100644 --- a/src/core/states/StateCheckError.h +++ b/src/core/states/StateCheckError.h @@ -2,7 +2,7 @@ * \brief Helper state to decide whether an error has been occurred that should * be reported to the user. * - * \copyright Copyright (c) 2014-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2014-2018 Governikus GmbH & Co. KG, Germany */ #pragma once diff --git a/src/core/states/StateCheckRefreshAddress.cpp b/src/core/states/StateCheckRefreshAddress.cpp index fbb381446..2835c1017 100644 --- a/src/core/states/StateCheckRefreshAddress.cpp +++ b/src/core/states/StateCheckRefreshAddress.cpp @@ -1,5 +1,5 @@ /*! - * \copyright Copyright (c) 2014-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2014-2018 Governikus GmbH & Co. KG, Germany */ #include "StateCheckRefreshAddress.h" @@ -36,6 +36,39 @@ StateCheckRefreshAddress::StateCheckRefreshAddress(const QSharedPointergetTcToken(); @@ -81,7 +114,7 @@ void StateCheckRefreshAddress::run() mSubjectUrl = determineSubjectUrl(); qDebug() << "SubjectUrl: " << mSubjectUrl.toString(); - if (UrlUtil::isMatchingSameOriginPolicy(mUrl, mSubjectUrl)) + if (UrlUtil::isMatchingSameOriginPolicy(mUrl, mSubjectUrl) || isMatchingSameOriginPolicyInDevMode()) { qDebug() << "SOP-Check succeeded, abort process"; fetchServerCertificate(); @@ -280,7 +313,7 @@ void StateCheckRefreshAddress::onNetworkReply() } } - if (UrlUtil::isMatchingSameOriginPolicy(mUrl, mSubjectUrl)) + if (UrlUtil::isMatchingSameOriginPolicy(mUrl, mSubjectUrl) || isMatchingSameOriginPolicyInDevMode()) { qDebug() << "SOP-Check succeeded, abort process"; mUrl = redirectUrl; diff --git a/src/core/states/StateCheckRefreshAddress.h b/src/core/states/StateCheckRefreshAddress.h index 2ceb700cf..9881cfa1d 100644 --- a/src/core/states/StateCheckRefreshAddress.h +++ b/src/core/states/StateCheckRefreshAddress.h @@ -2,7 +2,7 @@ * \brief Calls the RefreshAddress of TcToken and checks the certificates. * After that it will set RedirectAddress in WorkflowContext. * - * \copyright Copyright (c) 2014-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2014-2018 Governikus GmbH & Co. KG, Germany */ #pragma once @@ -37,6 +37,7 @@ class StateCheckRefreshAddress bool mCertificateFetched; QVector mVerifiedRefreshUrlHosts; + bool isMatchingSameOriginPolicyInDevMode() const; virtual void run() override; QUrl determineSubjectUrl(); diff --git a/src/core/states/StateCleanUpReaderManager.cpp b/src/core/states/StateCleanUpReaderManager.cpp index fabc70b8b..d4008a96d 100644 --- a/src/core/states/StateCleanUpReaderManager.cpp +++ b/src/core/states/StateCleanUpReaderManager.cpp @@ -1,7 +1,8 @@ /*! - * \copyright Copyright (c) 2016-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2016-2018 Governikus GmbH & Co. KG, Germany */ +#include "context/ChangePinContext.h" #include "ReaderManager.h" #include "StateCleanUpReaderManager.h" @@ -17,12 +18,24 @@ StateCleanUpReaderManager::StateCleanUpReaderManager(const QSharedPointer context = getContext(); - if (getContext()->getCardConnection()) + // On a stationary AusweisApp2, do not stop scanning when a change pin workflow is completed. +#if defined(Q_OS_WIN) || defined(Q_OS_MACOS) || (defined(Q_OS_LINUX) && !defined(Q_OS_ANDROID)) || defined(Q_OS_FREEBSD) + const bool stopScanRequired = context.objectCast().isNull(); +#else + const bool stopScanRequired = true; +#endif + + if (stopScanRequired) + { + ReaderManager::getInstance().stopScanAll(); + } + + if (context->getCardConnection()) { qDebug() << "Going to disconnect card connection"; - getContext()->setCardConnection(QSharedPointer()); + context->setCardConnection(QSharedPointer()); } qDebug() << "Going to disconnect readers"; diff --git a/src/core/states/StateCleanUpReaderManager.h b/src/core/states/StateCleanUpReaderManager.h index c8f3b0f17..c2f728221 100644 --- a/src/core/states/StateCleanUpReaderManager.h +++ b/src/core/states/StateCleanUpReaderManager.h @@ -2,7 +2,7 @@ * \brief Performs clean up of the ReaderManager, * e.g. disconnects all readers, clears the card connection, ... * - * \copyright Copyright (c) 2016-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2016-2018 Governikus GmbH & Co. KG, Germany */ #pragma once diff --git a/src/core/states/StateConnectCard.cpp b/src/core/states/StateConnectCard.cpp index 0568c0dbd..dac917842 100644 --- a/src/core/states/StateConnectCard.cpp +++ b/src/core/states/StateConnectCard.cpp @@ -1,5 +1,5 @@ /*! - * \copyright Copyright (c) 2015-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2015-2018 Governikus GmbH & Co. KG, Germany */ #include "CardConnection.h" diff --git a/src/core/states/StateConnectCard.h b/src/core/states/StateConnectCard.h index 4e3623232..09f9ce16b 100644 --- a/src/core/states/StateConnectCard.h +++ b/src/core/states/StateConnectCard.h @@ -1,5 +1,5 @@ /*! - * \copyright Copyright (c) 2015-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2015-2018 Governikus GmbH & Co. KG, Germany */ #pragma once diff --git a/src/core/states/StateDestroyPace.cpp b/src/core/states/StateDestroyPace.cpp index 17ea07fbe..7d4464298 100644 --- a/src/core/states/StateDestroyPace.cpp +++ b/src/core/states/StateDestroyPace.cpp @@ -1,5 +1,5 @@ /*! - * \copyright Copyright (c) 2016-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2016-2018 Governikus GmbH & Co. KG, Germany */ diff --git a/src/core/states/StateDestroyPace.h b/src/core/states/StateDestroyPace.h index eeb823dea..354fbf289 100644 --- a/src/core/states/StateDestroyPace.h +++ b/src/core/states/StateDestroyPace.h @@ -1,7 +1,7 @@ /*! * \brief Controller for the step that tries to destroy an existing PACE connection. * - * \copyright Copyright (c) 2016-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2016-2018 Governikus GmbH & Co. KG, Germany */ #pragma once diff --git a/src/core/states/StateDidAuthenticateEac1.cpp b/src/core/states/StateDidAuthenticateEac1.cpp index 9adf28db2..2d50814ab 100644 --- a/src/core/states/StateDidAuthenticateEac1.cpp +++ b/src/core/states/StateDidAuthenticateEac1.cpp @@ -1,5 +1,5 @@ /*! - * \copyright Copyright (c) 2014-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2014-2018 Governikus GmbH & Co. KG, Germany */ #include "asn1/CVCertificateChainBuilder.h" diff --git a/src/core/states/StateDidAuthenticateEac1.h b/src/core/states/StateDidAuthenticateEac1.h index a0fe17cba..7231caa1b 100644 --- a/src/core/states/StateDidAuthenticateEac1.h +++ b/src/core/states/StateDidAuthenticateEac1.h @@ -1,5 +1,5 @@ /*! - * \copyright Copyright (c) 2014-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2014-2018 Governikus GmbH & Co. KG, Germany */ #pragma once diff --git a/src/core/states/StateDidAuthenticateEac2.cpp b/src/core/states/StateDidAuthenticateEac2.cpp index a9bf8aa7e..00e227704 100644 --- a/src/core/states/StateDidAuthenticateEac2.cpp +++ b/src/core/states/StateDidAuthenticateEac2.cpp @@ -1,5 +1,5 @@ /*! - * \copyright Copyright (c) 2014-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2014-2018 Governikus GmbH & Co. KG, Germany */ #include "asn1/CVCertificate.h" diff --git a/src/core/states/StateDidAuthenticateEac2.h b/src/core/states/StateDidAuthenticateEac2.h index 56d49dc83..d26d30b6f 100644 --- a/src/core/states/StateDidAuthenticateEac2.h +++ b/src/core/states/StateDidAuthenticateEac2.h @@ -1,5 +1,5 @@ /*! - * \copyright Copyright (c) 2014-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2014-2018 Governikus GmbH & Co. KG, Germany */ #pragma once diff --git a/src/core/states/StateDidList.cpp b/src/core/states/StateDidList.cpp index 80dc83771..6663f8dd3 100644 --- a/src/core/states/StateDidList.cpp +++ b/src/core/states/StateDidList.cpp @@ -1,5 +1,5 @@ /*! - * \copyright Copyright (c) 2014-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2014-2018 Governikus GmbH & Co. KG, Germany */ #include "paos/invoke/DidListResponse.h" diff --git a/src/core/states/StateDidList.h b/src/core/states/StateDidList.h index 67ff08b0f..03343275b 100644 --- a/src/core/states/StateDidList.h +++ b/src/core/states/StateDidList.h @@ -1,5 +1,5 @@ /*! - * \copyright Copyright (c) 2014-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2014-2018 Governikus GmbH & Co. KG, Germany */ #pragma once diff --git a/src/core/states/StateEACAdditionalInputType.cpp b/src/core/states/StateEACAdditionalInputType.cpp index 7512d7ca7..7b2c1f270 100644 --- a/src/core/states/StateEACAdditionalInputType.cpp +++ b/src/core/states/StateEACAdditionalInputType.cpp @@ -1,5 +1,5 @@ /*! - * \copyright Copyright (c) 2014-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2014-2018 Governikus GmbH & Co. KG, Germany */ #include "states/StateEACAdditionalInputType.h" diff --git a/src/core/states/StateEACAdditionalInputType.h b/src/core/states/StateEACAdditionalInputType.h index 14d2b73df..d1b5a564e 100644 --- a/src/core/states/StateEACAdditionalInputType.h +++ b/src/core/states/StateEACAdditionalInputType.h @@ -1,5 +1,5 @@ /*! - * \copyright Copyright (c) 2014-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2014-2018 Governikus GmbH & Co. KG, Germany */ #pragma once diff --git a/src/core/states/StateEditAccessRights.cpp b/src/core/states/StateEditAccessRights.cpp index afe483951..304accf9c 100644 --- a/src/core/states/StateEditAccessRights.cpp +++ b/src/core/states/StateEditAccessRights.cpp @@ -1,5 +1,5 @@ /*! - * \copyright Copyright (c) 2016-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2016-2018 Governikus GmbH & Co. KG, Germany */ #include "StateEditAccessRights.h" diff --git a/src/core/states/StateEditAccessRights.h b/src/core/states/StateEditAccessRights.h index 3ae351304..cc659009a 100644 --- a/src/core/states/StateEditAccessRights.h +++ b/src/core/states/StateEditAccessRights.h @@ -2,7 +2,7 @@ * * \brief This state waits for editing of the effective CHAT * - * \copyright Copyright (c) 2016-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2016-2018 Governikus GmbH & Co. KG, Germany */ #pragma once diff --git a/src/core/states/StateEstablishPaceCan.cpp b/src/core/states/StateEstablishPaceCan.cpp index 3ee5ef629..bec24ee59 100644 --- a/src/core/states/StateEstablishPaceCan.cpp +++ b/src/core/states/StateEstablishPaceCan.cpp @@ -1,5 +1,5 @@ /*! - * \copyright Copyright (c) 2016-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2016-2018 Governikus GmbH & Co. KG, Germany */ diff --git a/src/core/states/StateEstablishPaceCan.h b/src/core/states/StateEstablishPaceCan.h index b35f11c0d..3dde74418 100644 --- a/src/core/states/StateEstablishPaceCan.h +++ b/src/core/states/StateEstablishPaceCan.h @@ -2,7 +2,7 @@ * \brief Controller for the step that tries to establish a PACE * connection using the card's CAN. * - * \copyright Copyright (c) 2016-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2016-2018 Governikus GmbH & Co. KG, Germany */ #pragma once diff --git a/src/core/states/StateEstablishPacePin.cpp b/src/core/states/StateEstablishPacePin.cpp index f4a813c40..ba43115c0 100644 --- a/src/core/states/StateEstablishPacePin.cpp +++ b/src/core/states/StateEstablishPacePin.cpp @@ -1,5 +1,5 @@ /*! - * \copyright Copyright (c) 2016-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2016-2018 Governikus GmbH & Co. KG, Germany */ diff --git a/src/core/states/StateEstablishPacePin.h b/src/core/states/StateEstablishPacePin.h index 0bb7cc2eb..1cc666091 100644 --- a/src/core/states/StateEstablishPacePin.h +++ b/src/core/states/StateEstablishPacePin.h @@ -2,7 +2,7 @@ * \brief Controller for the step that tries to establish a PACE * connection using the card's Pin. * - * \copyright Copyright (c) 2016-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2016-2018 Governikus GmbH & Co. KG, Germany */ #pragma once diff --git a/src/core/states/StateEstablishPacePuk.cpp b/src/core/states/StateEstablishPacePuk.cpp index 8d5ab90e2..57bd8c129 100644 --- a/src/core/states/StateEstablishPacePuk.cpp +++ b/src/core/states/StateEstablishPacePuk.cpp @@ -1,5 +1,5 @@ /*! - * \copyright Copyright (c) 2016-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2016-2018 Governikus GmbH & Co. KG, Germany */ diff --git a/src/core/states/StateEstablishPacePuk.h b/src/core/states/StateEstablishPacePuk.h index ac9b9516c..8c7014eb6 100644 --- a/src/core/states/StateEstablishPacePuk.h +++ b/src/core/states/StateEstablishPacePuk.h @@ -2,7 +2,7 @@ * \brief Controller for the step that tries to establish a PACE * connection using the card's PUK. * - * \copyright Copyright (c) 2016-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2016-2018 Governikus GmbH & Co. KG, Germany */ #pragma once diff --git a/src/core/states/StateExtractCvcsFromEac1InputType.cpp b/src/core/states/StateExtractCvcsFromEac1InputType.cpp index fc588099f..5794a969a 100644 --- a/src/core/states/StateExtractCvcsFromEac1InputType.cpp +++ b/src/core/states/StateExtractCvcsFromEac1InputType.cpp @@ -1,5 +1,5 @@ /*! - * \copyright Copyright (c) 2014-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2014-2018 Governikus GmbH & Co. KG, Germany */ #include "StateExtractCvcsFromEac1InputType.h" diff --git a/src/core/states/StateExtractCvcsFromEac1InputType.h b/src/core/states/StateExtractCvcsFromEac1InputType.h index 3cbba35f6..de03ee1d8 100644 --- a/src/core/states/StateExtractCvcsFromEac1InputType.h +++ b/src/core/states/StateExtractCvcsFromEac1InputType.h @@ -1,7 +1,7 @@ /*! * \brief State to process InputType of EAC1. Extract certificates and set it to context. * - * \copyright Copyright (c) 2014-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2014-2018 Governikus GmbH & Co. KG, Germany */ #pragma once diff --git a/src/core/states/StateGenericSendReceive.cpp b/src/core/states/StateGenericSendReceive.cpp index 284db7ff7..60bb3d45b 100644 --- a/src/core/states/StateGenericSendReceive.cpp +++ b/src/core/states/StateGenericSendReceive.cpp @@ -1,5 +1,5 @@ /*! - * \copyright Copyright (c) 2014-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2014-2018 Governikus GmbH & Co. KG, Germany */ #include "StateGenericSendReceive.h" @@ -114,12 +114,29 @@ void StateGenericSendReceive::onSslHandshakeDone() const auto& cfg = mReply->sslConfiguration(); TlsChecker::logSslConfig(cfg, qInfo(network)); + bool abort = false; const auto statusCode = checkAndSaveCertificate(cfg.peerCertificate()); if (statusCode != GlobalStatus::Code::No_Error) { qCCritical(network) << GlobalStatus(statusCode); updateStatus(statusCode); + abort = true; + } + auto context = getContext(); + if (!abort && !context->getTcToken()->usePsk()) + { + const auto& session = context->getSslSession(); + if (session.isEmpty() || session != cfg.sessionTicket()) + { + qCCritical(network) << "Session resumption failed"; + updateStatus(GlobalStatus::Code::Workflow_TrustedChannel_Ssl_Establishment_Error); + abort = true; + } + } + + if (abort) + { // Stop listening to signals from QNetworkReply to stay in // this state until the following timer fires the signal. clearConnections(); @@ -129,6 +146,7 @@ void StateGenericSendReceive::onSslHandshakeDone() // We need to append the abort to the event queue, because // QNetworkAccessManager::clearConnectionCache forces sending // the request when the abort on QNetworkReply is not finished. + // See https://bugreports.qt.io/browse/QTBUG-65960 QTimer::singleShot(0, this, [this] { Q_EMIT fireAbort(); }); @@ -212,7 +230,8 @@ void StateGenericSendReceive::run() qCDebug(network) << "Try to send raw data:\n" << data; const QByteArray& paosNamespace = PaosCreator::getNamespace(PaosCreator::Namespace::PAOS).toUtf8(); - mReply = Env::getSingleton()->paos(request, paosNamespace, data, token->usePsk()); + const auto& session = token->usePsk() ? QByteArray() : getContext()->getSslSession(); + mReply = Env::getSingleton()->paos(request, paosNamespace, data, token->usePsk(), session); mConnections += connect(mReply.data(), &QNetworkReply::sslErrors, this, &StateGenericSendReceive::onSslErrors); mConnections += connect(mReply.data(), &QNetworkReply::encrypted, this, &StateGenericSendReceive::onSslHandshakeDone); mConnections += connect(mReply.data(), &QNetworkReply::finished, this, &StateGenericSendReceive::onReplyFinished); diff --git a/src/core/states/StateGenericSendReceive.h b/src/core/states/StateGenericSendReceive.h index d47397fb7..72fcef093 100644 --- a/src/core/states/StateGenericSendReceive.h +++ b/src/core/states/StateGenericSendReceive.h @@ -1,5 +1,5 @@ /*! - * \copyright Copyright (c) 2014-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2014-2018 Governikus GmbH & Co. KG, Germany */ #pragma once diff --git a/src/core/states/StateGetSelfAuthenticationData.cpp b/src/core/states/StateGetSelfAuthenticationData.cpp index f4a1f876f..b04a9c584 100644 --- a/src/core/states/StateGetSelfAuthenticationData.cpp +++ b/src/core/states/StateGetSelfAuthenticationData.cpp @@ -1,5 +1,5 @@ /*! - * \copyright Copyright (c) 2014-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2014-2018 Governikus GmbH & Co. KG, Germany */ #include "StateGetSelfAuthenticationData.h" diff --git a/src/core/states/StateGetSelfAuthenticationData.h b/src/core/states/StateGetSelfAuthenticationData.h index fb94dbbb4..374432ccc 100644 --- a/src/core/states/StateGetSelfAuthenticationData.h +++ b/src/core/states/StateGetSelfAuthenticationData.h @@ -1,7 +1,7 @@ /*! * \brief get the xml data from the given url * - * \copyright Copyright (c) 2014-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2014-2018 Governikus GmbH & Co. KG, Germany */ #pragma once diff --git a/src/core/states/StateGetTcToken.cpp b/src/core/states/StateGetTcToken.cpp index ef0c4b744..deba2fe3a 100644 --- a/src/core/states/StateGetTcToken.cpp +++ b/src/core/states/StateGetTcToken.cpp @@ -1,5 +1,5 @@ /*! - * \copyright Copyright (c) 2014-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2014-2018 Governikus GmbH & Co. KG, Germany */ #include "StateGetTcToken.h" @@ -66,14 +66,17 @@ bool StateGetTcToken::isValidRedirectUrl(const QUrl& pUrl) { // according to TR-03124-1 in case of a non-HTTPS URL a createTrustedChannelEstablishmentError error must be sent // in contrast a HTTP error 404 must be sent, if the TCToken could not be determined - auto httpsError = QStringLiteral("Error while connecting to the service provider. A secure connection could not be established. The used URL is not of type HTTPS."); + const auto httpsError1 = QStringLiteral("Error while connecting to the service provider. A secure connection could not be established."); + const auto httpsError2 = QStringLiteral(" The used URL is not of type HTTPS: %1").arg(pUrl.toString()); if (AppSettings::getInstance().getGeneralSettings().isDeveloperMode()) { - qCCritical(developermode) << httpsError; + qCCritical(developermode) << httpsError1; + qCCritical(developermode) << httpsError2; } else { - qCritical() << httpsError; + qCritical() << httpsError1; + qCritical() << httpsError2; getContext()->setTcTokenNotFound(false); updateStatus(GlobalStatus::Code::Workflow_TrustedChannel_Server_Format_Error); return false; @@ -128,7 +131,9 @@ void StateGetTcToken::onSslHandshakeDone() return; } - getContext()->addCertificateData(mReply->request().url(), cfg.peerCertificate()); + auto context = getContext(); + context->addCertificateData(mReply->request().url(), cfg.peerCertificate()); + context->setSslSession(cfg.sessionTicket()); } diff --git a/src/core/states/StateGetTcToken.h b/src/core/states/StateGetTcToken.h index d86603e2d..5442f406f 100644 --- a/src/core/states/StateGetTcToken.h +++ b/src/core/states/StateGetTcToken.h @@ -1,7 +1,7 @@ /*! * \brief State machine state: Get TCToken. * - * \copyright Copyright (c) 2014-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2014-2018 Governikus GmbH & Co. KG, Germany */ #pragma once diff --git a/src/core/states/StateHandleRetryCounter.cpp b/src/core/states/StateHandleRetryCounter.cpp index 8528f921f..39cdf922a 100644 --- a/src/core/states/StateHandleRetryCounter.cpp +++ b/src/core/states/StateHandleRetryCounter.cpp @@ -1,5 +1,5 @@ /*! - * \copyright Copyright (c) 2014-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2014-2018 Governikus GmbH & Co. KG, Germany */ #include "StateHandleRetryCounter.h" diff --git a/src/core/states/StateHandleRetryCounter.h b/src/core/states/StateHandleRetryCounter.h index b2d1148c2..6bdaf1e4e 100644 --- a/src/core/states/StateHandleRetryCounter.h +++ b/src/core/states/StateHandleRetryCounter.h @@ -1,5 +1,5 @@ /*! - * \copyright Copyright (c) 2014-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2014-2018 Governikus GmbH & Co. KG, Germany */ #pragma once diff --git a/src/core/states/StateInitializeFramework.cpp b/src/core/states/StateInitializeFramework.cpp index db4bbe6ec..86124d4a6 100644 --- a/src/core/states/StateInitializeFramework.cpp +++ b/src/core/states/StateInitializeFramework.cpp @@ -1,5 +1,5 @@ /*! - * \copyright Copyright (c) 2014-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2014-2018 Governikus GmbH & Co. KG, Germany */ #include "paos/invoke/InitializeFrameworkResponse.h" diff --git a/src/core/states/StateInitializeFramework.h b/src/core/states/StateInitializeFramework.h index 6533d54c2..9307e5828 100644 --- a/src/core/states/StateInitializeFramework.h +++ b/src/core/states/StateInitializeFramework.h @@ -1,5 +1,5 @@ /*! - * \copyright Copyright (c) 2014-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2014-2018 Governikus GmbH & Co. KG, Germany */ #pragma once diff --git a/src/core/states/StateLoadTcTokenUrl.cpp b/src/core/states/StateLoadTcTokenUrl.cpp index 803c97c06..44197e39f 100644 --- a/src/core/states/StateLoadTcTokenUrl.cpp +++ b/src/core/states/StateLoadTcTokenUrl.cpp @@ -1,5 +1,5 @@ /*! - * \copyright Copyright (c) 2014-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2014-2018 Governikus GmbH & Co. KG, Germany */ diff --git a/src/core/states/StateLoadTcTokenUrl.h b/src/core/states/StateLoadTcTokenUrl.h index 6f4fcb983..be76656a7 100644 --- a/src/core/states/StateLoadTcTokenUrl.h +++ b/src/core/states/StateLoadTcTokenUrl.h @@ -1,7 +1,7 @@ /*! * \brief Loads the tcTokenUrl for triggering the self authentication from secure storage * - * \copyright Copyright (c) 2014-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2014-2018 Governikus GmbH & Co. KG, Germany */ #pragma once diff --git a/src/core/states/StateParseTcTokenUrl.cpp b/src/core/states/StateParseTcTokenUrl.cpp index e60af31b2..a4abed705 100644 --- a/src/core/states/StateParseTcTokenUrl.cpp +++ b/src/core/states/StateParseTcTokenUrl.cpp @@ -1,7 +1,7 @@ /*! * \brief Parse tcTokenURL from GET query. * - * \copyright Copyright (c) 2014-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2014-2018 Governikus GmbH & Co. KG, Germany */ #include "StateParseTcTokenUrl.h" diff --git a/src/core/states/StateParseTcTokenUrl.h b/src/core/states/StateParseTcTokenUrl.h index 65b4480fe..16cd13dbc 100644 --- a/src/core/states/StateParseTcTokenUrl.h +++ b/src/core/states/StateParseTcTokenUrl.h @@ -1,7 +1,7 @@ /*! * \brief Implements the parsing of TcTokenUrl in header of browser request. * - * \copyright Copyright (c) 2014-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2014-2018 Governikus GmbH & Co. KG, Germany */ #pragma once diff --git a/src/core/states/StatePreVerification.cpp b/src/core/states/StatePreVerification.cpp index a177e34fa..7f6f8965a 100644 --- a/src/core/states/StatePreVerification.cpp +++ b/src/core/states/StatePreVerification.cpp @@ -1,5 +1,5 @@ /*! - * \copyright Copyright (c) 2014-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2014-2018 Governikus GmbH & Co. KG, Germany */ #include "StatePreVerification.h" diff --git a/src/core/states/StatePreVerification.h b/src/core/states/StatePreVerification.h index 95a95025c..9ee9f8ad1 100644 --- a/src/core/states/StatePreVerification.h +++ b/src/core/states/StatePreVerification.h @@ -1,7 +1,7 @@ /* * \brief Performs the pre-verification of cvcs. If the pre-verification succeeds the cvc chain is set to the authentication model. * - * \copyright Copyright (c) 2014-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2014-2018 Governikus GmbH & Co. KG, Germany */ #pragma once diff --git a/src/core/states/StateProcessCertificatesFromEac2.cpp b/src/core/states/StateProcessCertificatesFromEac2.cpp index 7f8c2d3b9..492ae331b 100644 --- a/src/core/states/StateProcessCertificatesFromEac2.cpp +++ b/src/core/states/StateProcessCertificatesFromEac2.cpp @@ -1,5 +1,5 @@ /*! - * \copyright Copyright (c) 2014-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2014-2018 Governikus GmbH & Co. KG, Germany */ #include "StateProcessCertificatesFromEac2.h" diff --git a/src/core/states/StateProcessCertificatesFromEac2.h b/src/core/states/StateProcessCertificatesFromEac2.h index d7f3f7495..9c15e5b15 100644 --- a/src/core/states/StateProcessCertificatesFromEac2.h +++ b/src/core/states/StateProcessCertificatesFromEac2.h @@ -1,7 +1,7 @@ /*! * \brief State to process certificates from EAC2. * - * \copyright Copyright (c) 2014-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2014-2018 Governikus GmbH & Co. KG, Germany */ #pragma once diff --git a/src/core/states/StateProcessing.cpp b/src/core/states/StateProcessing.cpp index fdbf193ab..3b43584d0 100644 --- a/src/core/states/StateProcessing.cpp +++ b/src/core/states/StateProcessing.cpp @@ -1,5 +1,5 @@ /*! - * \copyright Copyright (c) 2014-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2014-2018 Governikus GmbH & Co. KG, Germany */ #include "states/StateProcessing.h" diff --git a/src/core/states/StateProcessing.h b/src/core/states/StateProcessing.h index 93e2a0a2c..26245fc79 100644 --- a/src/core/states/StateProcessing.h +++ b/src/core/states/StateProcessing.h @@ -1,7 +1,7 @@ /*! * \brief Sends a HTTP-Processing to the browser. * - * \copyright Copyright (c) 2014-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2014-2018 Governikus GmbH & Co. KG, Germany */ #pragma once diff --git a/src/core/states/StateRedirectBrowser.cpp b/src/core/states/StateRedirectBrowser.cpp index 967605ea4..8e28c548d 100644 --- a/src/core/states/StateRedirectBrowser.cpp +++ b/src/core/states/StateRedirectBrowser.cpp @@ -1,5 +1,5 @@ /*! - * \copyright Copyright (c) 2014-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2014-2018 Governikus GmbH & Co. KG, Germany */ #include "StateRedirectBrowser.h" diff --git a/src/core/states/StateRedirectBrowser.h b/src/core/states/StateRedirectBrowser.h index 209f49895..921d92281 100644 --- a/src/core/states/StateRedirectBrowser.h +++ b/src/core/states/StateRedirectBrowser.h @@ -1,7 +1,7 @@ /*! * \brief Send a redirect to the browser. * - * \copyright Copyright (c) 2014-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2014-2018 Governikus GmbH & Co. KG, Germany */ #pragma once diff --git a/src/core/states/StateSelectReader.cpp b/src/core/states/StateSelectReader.cpp index b09831b1b..363c9985e 100644 --- a/src/core/states/StateSelectReader.cpp +++ b/src/core/states/StateSelectReader.cpp @@ -1,5 +1,5 @@ /*! - * \copyright Copyright (c) 2015-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2015-2018 Governikus GmbH & Co. KG, Germany */ #include "StateSelectReader.h" @@ -96,7 +96,7 @@ void StateSelectReader::onAbort() void StateSelectReader::onReaderDeviceError(DeviceError pDeviceError) { - if (pDeviceError != DeviceError::DEVICE_POWERED_OFF) + if (pDeviceError != DeviceError::DEVICE_POWERED_OFF && pDeviceError != DeviceError::DEVICE_SCAN_ERROR) { updateStatus(DeviceErrorUtil::toGlobalStatus(pDeviceError)); Q_EMIT fireAbort(); diff --git a/src/core/states/StateSelectReader.h b/src/core/states/StateSelectReader.h index d9c7ae42c..04606eaea 100644 --- a/src/core/states/StateSelectReader.h +++ b/src/core/states/StateSelectReader.h @@ -1,5 +1,5 @@ /*! - * \copyright Copyright (c) 2015-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2015-2018 Governikus GmbH & Co. KG, Germany */ #pragma once diff --git a/src/core/states/StateStartPaos.cpp b/src/core/states/StateStartPaos.cpp index 58d763be8..268f8d70e 100644 --- a/src/core/states/StateStartPaos.cpp +++ b/src/core/states/StateStartPaos.cpp @@ -1,5 +1,5 @@ /*! - * \copyright Copyright (c) 2014-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2014-2018 Governikus GmbH & Co. KG, Germany */ #include "CardConnection.h" diff --git a/src/core/states/StateStartPaos.h b/src/core/states/StateStartPaos.h index a52d2e922..73c4b957a 100644 --- a/src/core/states/StateStartPaos.h +++ b/src/core/states/StateStartPaos.h @@ -1,7 +1,7 @@ /*! * \brief State machine state: Start PAOS. * - * \copyright Copyright (c) 2014-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2014-2018 Governikus GmbH & Co. KG, Germany */ #pragma once diff --git a/src/core/states/StateStartPaosResponse.cpp b/src/core/states/StateStartPaosResponse.cpp index 0c668bd5d..fb05d4661 100644 --- a/src/core/states/StateStartPaosResponse.cpp +++ b/src/core/states/StateStartPaosResponse.cpp @@ -1,5 +1,5 @@ /*! - * \copyright Copyright (c) 2014-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2014-2018 Governikus GmbH & Co. KG, Germany */ #include "StateStartPaosResponse.h" diff --git a/src/core/states/StateStartPaosResponse.h b/src/core/states/StateStartPaosResponse.h index eb316f44f..90edeb43f 100644 --- a/src/core/states/StateStartPaosResponse.h +++ b/src/core/states/StateStartPaosResponse.h @@ -1,7 +1,7 @@ /*! * \brief State to process StartPaosResponse from Server. * - * \copyright Copyright (c) 2014-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2014-2018 Governikus GmbH & Co. KG, Germany */ #pragma once diff --git a/src/core/states/StateTransmit.cpp b/src/core/states/StateTransmit.cpp index ab6232062..b517b6523 100644 --- a/src/core/states/StateTransmit.cpp +++ b/src/core/states/StateTransmit.cpp @@ -1,5 +1,5 @@ /*! - * \copyright Copyright (c) 2014-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2014-2018 Governikus GmbH & Co. KG, Germany */ #include "CardConnection.h" diff --git a/src/core/states/StateTransmit.h b/src/core/states/StateTransmit.h index 57a667e37..3dbdd07a0 100644 --- a/src/core/states/StateTransmit.h +++ b/src/core/states/StateTransmit.h @@ -1,7 +1,7 @@ /*! * \brief Process received transmits. Send it to the card and create a response. * - * \copyright Copyright (c) 2014-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2014-2018 Governikus GmbH & Co. KG, Germany */ #pragma once diff --git a/src/core/states/StateUpdateRetryCounter.cpp b/src/core/states/StateUpdateRetryCounter.cpp index 2580e0cfe..c2b4d9cb9 100644 --- a/src/core/states/StateUpdateRetryCounter.cpp +++ b/src/core/states/StateUpdateRetryCounter.cpp @@ -1,5 +1,5 @@ /*! - * \copyright Copyright (c) 2014-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2014-2018 Governikus GmbH & Co. KG, Germany */ #include "StateUpdateRetryCounter.h" diff --git a/src/core/states/StateUpdateRetryCounter.h b/src/core/states/StateUpdateRetryCounter.h index db4291606..8ffdc38ea 100644 --- a/src/core/states/StateUpdateRetryCounter.h +++ b/src/core/states/StateUpdateRetryCounter.h @@ -2,7 +2,7 @@ * \brief Controller for the step that updates the retry * counter of a card. * - * \copyright Copyright (c) 2014-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2014-2018 Governikus GmbH & Co. KG, Germany */ #pragma once diff --git a/src/core/states/StateWriteHistory.cpp b/src/core/states/StateWriteHistory.cpp index 766365f1f..01f1e3cd2 100644 --- a/src/core/states/StateWriteHistory.cpp +++ b/src/core/states/StateWriteHistory.cpp @@ -1,5 +1,5 @@ /* - * \copyright Copyright (c) 2014-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2014-2018 Governikus GmbH & Co. KG, Germany */ #include "AppSettings.h" diff --git a/src/core/states/StateWriteHistory.h b/src/core/states/StateWriteHistory.h index 93806e377..ad346633d 100644 --- a/src/core/states/StateWriteHistory.h +++ b/src/core/states/StateWriteHistory.h @@ -2,7 +2,7 @@ * * \brief Writes the history entry . * - * \copyright Copyright (c) 2014-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2014-2018 Governikus GmbH & Co. KG, Germany */ #pragma once diff --git a/src/core/states/remote_service/StateChangePinRemote.cpp b/src/core/states/remote_service/StateChangePinRemote.cpp new file mode 100644 index 000000000..eaa7ed1a7 --- /dev/null +++ b/src/core/states/remote_service/StateChangePinRemote.cpp @@ -0,0 +1,116 @@ +/*! + * \copyright Copyright (c) 2017-2018 Governikus GmbH & Co. KG, Germany + */ + +#include "StateChangePinRemote.h" + +#include "PinModify.h" +#include "ServerMessageHandler.h" + +#include + +Q_DECLARE_LOGGING_CATEGORY(remote_device) + + +using namespace governikus; + + +StateChangePinRemote::StateChangePinRemote(const QSharedPointer& pContext) + : AbstractGenericState(pContext) + , mModifyPinMessage() + , mMessageHandler() +{ +} + + +StateChangePinRemote::~StateChangePinRemote() +{ +} + + +void StateChangePinRemote::onEntry(QEvent* pEvent) +{ + AbstractGenericState::onEntry(pEvent); + + const QSharedPointer& context = getContext(); + + mModifyPinMessage = context->getModifyPinMessage(); + Q_ASSERT(mModifyPinMessage); + + const QSharedPointer remoteServer = context->getRemoteServer(); + Q_ASSERT(remoteServer); + mMessageHandler = remoteServer->getMessageHandler(); + Q_ASSERT(mMessageHandler); + + auto cardConnection = context->getCardConnection(); + if (cardConnection.isNull()) + { + Q_EMIT fireContinue(); + return; + } + + mConnections += connect(context.data(), &RemoteServiceContext::fireCancelPasswordRequest, this, &StateChangePinRemote::onCancelChangePin); + mConnections += connect(cardConnection.data(), &CardConnection::fireReaderInfoChanged, this, &StateChangePinRemote::onReaderInfoChanged); + mConnections += connect(remoteServer.data(), &RemoteServer::fireConnectedChanged, this, &AbstractState::fireContinue); +} + + +void StateChangePinRemote::onExit(QEvent* pEvent) +{ + AbstractGenericState::onExit(pEvent); + + mMessageHandler.reset(); +} + + +void StateChangePinRemote::run() +{ + const QSharedPointer& context = getContext(); + + PinModify pinModify(mModifyPinMessage->getInputData()); + const QString newPin = context->getNewPin(); + context->setPin(QString()); + const quint8 timeoutSeconds = pinModify.getTimeoutSeconds(); + + auto cardConnection = context->getCardConnection(); + Q_ASSERT(cardConnection); + mConnections += cardConnection->callSetEidPinCommand(this, + &StateChangePinRemote::onChangePinDone, + newPin, + timeoutSeconds); +} + + +void StateChangePinRemote::onCancelChangePin() +{ + mMessageHandler->sendModifyPinResponse(mModifyPinMessage->getSlotHandle(), ResponseApdu(StatusCode::INPUT_CANCELLED)); + Q_EMIT fireContinue(); +} + + +void StateChangePinRemote::onReaderInfoChanged(const ReaderInfo& pReaderInfo) +{ + if (!pReaderInfo.hasEidCard()) + { + mMessageHandler->sendModifyPinResponse(mModifyPinMessage->getSlotHandle(), ResponseApdu(StatusCode::EMPTY)); + Q_EMIT fireContinue(); + } +} + + +void StateChangePinRemote::onChangePinDone(QSharedPointer pCommand) +{ + const QSharedPointer command = pCommand.dynamicCast(); + if (command) + { + mMessageHandler->sendModifyPinResponse(mModifyPinMessage->getSlotHandle(), command->getResponseApdu()); + } + else + { + Q_ASSERT(false); + qCDebug(remote_device) << "Expected a SetEidPinCommand as response!"; + mMessageHandler->sendModifyPinResponse(mModifyPinMessage->getSlotHandle(), ResponseApdu()); + } + + Q_EMIT fireContinue(); +} diff --git a/src/core/states/remote_service/StateChangePinRemote.h b/src/core/states/remote_service/StateChangePinRemote.h new file mode 100644 index 000000000..a280287d3 --- /dev/null +++ b/src/core/states/remote_service/StateChangePinRemote.h @@ -0,0 +1,45 @@ +/*! + * \brief This state executes the remote message IfdModifyPin. + * + * \copyright Copyright (c) 2017-2018 Governikus GmbH & Co. KG, Germany + */ + +#pragma once + + +#include "context/RemoteServiceContext.h" +#include "states/AbstractGenericState.h" + +namespace governikus +{ + + +class StateChangePinRemote + : public AbstractGenericState +{ + Q_OBJECT + friend class StateBuilder; + + private: + QSharedPointer mModifyPinMessage; + QSharedPointer mMessageHandler; + + StateChangePinRemote(const QSharedPointer& pContext); + virtual void run() override; + + private Q_SLOTS: + void onCancelChangePin(); + void onReaderInfoChanged(const ReaderInfo& pReaderInfo); + void onChangePinDone(QSharedPointer pCommand); + + protected: + void onExit(QEvent* pEvent) override; + + public: + virtual ~StateChangePinRemote() override; + + void onEntry(QEvent* pEvent) override; + +}; + +} /* namespace governikus */ diff --git a/src/core/states/remote_service/StateEstablishPaceChannel.cpp b/src/core/states/remote_service/StateEstablishPaceChannel.cpp index cecf4b474..8b1266a86 100644 --- a/src/core/states/remote_service/StateEstablishPaceChannel.cpp +++ b/src/core/states/remote_service/StateEstablishPaceChannel.cpp @@ -1,5 +1,5 @@ /*! - * \copyright Copyright (c) 2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2017-2018 Governikus GmbH & Co. KG, Germany */ #include "StateEstablishPaceChannel.h" @@ -48,7 +48,7 @@ void StateEstablishPaceChannel::onEntry(QEvent* pEvent) } mConnections += connect(cardConnection.data(), &CardConnection::fireReaderInfoChanged, this, &StateEstablishPaceChannel::onReaderInfoChanged); - mConnections += connect(getContext().data(), &RemoteServiceContext::fireCancelEstablishPaceChannel, this, &StateEstablishPaceChannel::onCancelEstablishPaceChannel); + mConnections += connect(getContext().data(), &RemoteServiceContext::fireCancelPasswordRequest, this, &StateEstablishPaceChannel::onCancelEstablishPaceChannel); mConnections += connect(getContext()->getRemoteServer().data(), &RemoteServer::fireConnectedChanged, this, &AbstractState::fireContinue); } @@ -66,21 +66,21 @@ void StateEstablishPaceChannel::run() const QSharedPointer& context = getContext(); EstablishPACEChannelParser parser = EstablishPACEChannelParser::fromCcid(mEstablishPaceChannelMessage->getInputData()); - QString pacePin; + QString pacePassword; switch (parser.getPasswordId()) { case PACE_PASSWORD_ID::PACE_CAN: - pacePin = context->getCan(); + pacePassword = context->getCan(); context->setCan(QString()); break; case PACE_PASSWORD_ID::PACE_PIN: - pacePin = context->getPin(); + pacePassword = context->getPin(); context->setPin(QString()); break; case PACE_PASSWORD_ID::PACE_PUK: - pacePin = context->getPuk(); + pacePassword = context->getPuk(); context->setPuk(QString()); break; @@ -94,7 +94,7 @@ void StateEstablishPaceChannel::run() mConnections += cardConnection->callEstablishPaceChannelCommand(this, &StateEstablishPaceChannel::onEstablishConnectionDone, parser.getPasswordId(), - pacePin, + pacePassword, parser.getChat(), parser.getCertificateDescription()); } diff --git a/src/core/states/remote_service/StateEstablishPaceChannel.h b/src/core/states/remote_service/StateEstablishPaceChannel.h index 9abca8683..08f385473 100644 --- a/src/core/states/remote_service/StateEstablishPaceChannel.h +++ b/src/core/states/remote_service/StateEstablishPaceChannel.h @@ -1,7 +1,7 @@ /*! * \brief This state executes the remote message PACE channel establish. * - * \copyright Copyright (c) 2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2017-2018 Governikus GmbH & Co. KG, Germany */ #pragma once diff --git a/src/core/states/remote_service/StateProcessRemoteMessages.cpp b/src/core/states/remote_service/StateProcessRemoteMessages.cpp index fd50f726e..39915ac6f 100644 --- a/src/core/states/remote_service/StateProcessRemoteMessages.cpp +++ b/src/core/states/remote_service/StateProcessRemoteMessages.cpp @@ -1,5 +1,5 @@ /*! - * \copyright Copyright (c) 2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2017-2018 Governikus GmbH & Co. KG, Germany */ #include "StateProcessRemoteMessages.h" @@ -50,6 +50,7 @@ void StateProcessRemoteMessages::onMessageHandlerAdded(const QSharedPointer& pMessage, const QSharedPointer& pConnection) +{ + Q_ASSERT(pMessage); + + const QSharedPointer context = getContext(); + Q_ASSERT(context); + + context->setModifyPinMessage(pMessage); + context->setCardConnection(pConnection); + Q_EMIT fireModifyPin(); +} + + void StateProcessRemoteMessages::onExit(QEvent* pEvent) { for (const auto& connection : qAsConst(mMessageConnections)) diff --git a/src/core/states/remote_service/StateProcessRemoteMessages.h b/src/core/states/remote_service/StateProcessRemoteMessages.h index b19651afa..9212f7ef6 100644 --- a/src/core/states/remote_service/StateProcessRemoteMessages.h +++ b/src/core/states/remote_service/StateProcessRemoteMessages.h @@ -2,7 +2,7 @@ * \brief This state allows the processing of ordenary remote messages in the * background and handles special PACE messages. * - * \copyright Copyright (c) 2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2017-2018 Governikus GmbH & Co. KG, Germany */ #pragma once @@ -29,6 +29,7 @@ class StateProcessRemoteMessages private Q_SLOTS: void onMessageHandlerAdded(const QSharedPointer& pHandler); void onClosed(); + void onModifyPin(const QSharedPointer& pMessage, const QSharedPointer& pConnection); void onEstablishPaceChannel(const QSharedPointer& pMessage, const QSharedPointer& pConnection); protected: @@ -39,6 +40,7 @@ class StateProcessRemoteMessages Q_SIGNALS: void fireEstablishPaceChannel(); + void fireModifyPin(); }; diff --git a/src/core/states/remote_service/StateStartRemoteService.cpp b/src/core/states/remote_service/StateStartRemoteService.cpp index d2369c0b3..7433baf6f 100644 --- a/src/core/states/remote_service/StateStartRemoteService.cpp +++ b/src/core/states/remote_service/StateStartRemoteService.cpp @@ -1,5 +1,5 @@ /*! - * \copyright Copyright (c) 2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2017-2018 Governikus GmbH & Co. KG, Germany */ #include "StateStartRemoteService.h" diff --git a/src/core/states/remote_service/StateStartRemoteService.h b/src/core/states/remote_service/StateStartRemoteService.h index 1df7b755c..c8ecd2a9c 100644 --- a/src/core/states/remote_service/StateStartRemoteService.h +++ b/src/core/states/remote_service/StateStartRemoteService.h @@ -1,7 +1,7 @@ /*! * \brief Start the remote service. * - * \copyright Copyright (c) 2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2017-2018 Governikus GmbH & Co. KG, Germany */ #pragma once diff --git a/src/core/states/remote_service/StateStopRemoteService.cpp b/src/core/states/remote_service/StateStopRemoteService.cpp index 66c73b561..cd274777e 100644 --- a/src/core/states/remote_service/StateStopRemoteService.cpp +++ b/src/core/states/remote_service/StateStopRemoteService.cpp @@ -1,5 +1,5 @@ /*! - * \copyright Copyright (c) 2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2017-2018 Governikus GmbH & Co. KG, Germany */ #include "StateStopRemoteService.h" diff --git a/src/core/states/remote_service/StateStopRemoteService.h b/src/core/states/remote_service/StateStopRemoteService.h index ff7329724..0b2af0b92 100644 --- a/src/core/states/remote_service/StateStopRemoteService.h +++ b/src/core/states/remote_service/StateStopRemoteService.h @@ -1,7 +1,7 @@ /*! * \brief Stop the remote service. * - * \copyright Copyright (c) 2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2017-2018 Governikus GmbH & Co. KG, Germany */ #pragma once diff --git a/src/core/view/UILoader.cpp b/src/core/view/UILoader.cpp index 3bc20e6a7..88f9261d2 100644 --- a/src/core/view/UILoader.cpp +++ b/src/core/view/UILoader.cpp @@ -1,5 +1,5 @@ /*! - * \copyright Copyright (c) 2015-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2015-2018 Governikus GmbH & Co. KG, Germany */ #include "UILoader.h" diff --git a/src/core/view/UILoader.h b/src/core/view/UILoader.h index 43f1429b1..8ef30f062 100644 --- a/src/core/view/UILoader.h +++ b/src/core/view/UILoader.h @@ -1,7 +1,7 @@ /*! * \brief Loader to initialize UIPlugIns. * - * \copyright Copyright (c) 2015-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2015-2018 Governikus GmbH & Co. KG, Germany */ #pragma once diff --git a/src/core/view/UIPlugIn.cpp b/src/core/view/UIPlugIn.cpp index 28cf275a5..afdf6f236 100644 --- a/src/core/view/UIPlugIn.cpp +++ b/src/core/view/UIPlugIn.cpp @@ -1,5 +1,5 @@ /*! - * \copyright Copyright (c) 2015-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2015-2018 Governikus GmbH & Co. KG, Germany */ #include "UIPlugIn.h" diff --git a/src/core/view/UIPlugIn.h b/src/core/view/UIPlugIn.h index c3d390296..e9ce64557 100644 --- a/src/core/view/UIPlugIn.h +++ b/src/core/view/UIPlugIn.h @@ -1,7 +1,7 @@ /*! * \brief Abstract layer to UI implementations. * - * \copyright Copyright (c) 2015-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2015-2018 Governikus GmbH & Co. KG, Germany */ #pragma once diff --git a/src/export/PdfCreator.cpp b/src/export/PdfCreator.cpp index f42a57395..2b89e156e 100644 --- a/src/export/PdfCreator.cpp +++ b/src/export/PdfCreator.cpp @@ -1,5 +1,5 @@ /* - * \copyright Copyright (c) 2016-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2016-2018 Governikus GmbH & Co. KG, Germany */ #include "PdfCreator.h" @@ -54,7 +54,7 @@ void PdfCreator::createHeader(const QString& pTitle, const QString& pHeadline) "").arg( pTitle, QCoreApplication::applicationName(), - tr("AusweisApp2 is a product of Governikus GmbH & Co. KG - on behalf of the Bundesministerium des Innern (Federal Ministry of the Interior)."), + tr("AusweisApp2 is a product of Governikus GmbH & Co. KG - on behalf of the Federal Ministry of the Interior, Building and Community."), pHeadline); QSvgRenderer renderer(QStringLiteral(":/images/npa.svg")); diff --git a/src/export/PdfCreator.h b/src/export/PdfCreator.h index 6674e7b78..9b8655992 100644 --- a/src/export/PdfCreator.h +++ b/src/export/PdfCreator.h @@ -1,7 +1,7 @@ /*! * \brief Tool to create PDF-Documents. * - * \copyright Copyright (c) 2016-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2016-2018 Governikus GmbH & Co. KG, Germany */ #pragma once diff --git a/src/export/PdfExporter.cpp b/src/export/PdfExporter.cpp index 3b0029ad7..5856e00a3 100644 --- a/src/export/PdfExporter.cpp +++ b/src/export/PdfExporter.cpp @@ -1,5 +1,5 @@ /* - * \copyright Copyright (c) 2016-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2017-2018 Governikus GmbH & Co. KG, Germany */ #include "PdfExporter.h" @@ -52,7 +52,7 @@ void PdfExporter::checkOpenFile(bool pSuccess) { if (mOpenFile && pSuccess) { - QDesktopServices::openUrl(QUrl(mFilename)); + QDesktopServices::openUrl(QUrl(QStringLiteral("file:///") + mFilename)); } } diff --git a/src/export/PdfExporter.h b/src/export/PdfExporter.h index b52c3908f..6a6a1133a 100644 --- a/src/export/PdfExporter.h +++ b/src/export/PdfExporter.h @@ -1,7 +1,7 @@ /*! * \brief Tool to export data of history or selfauthentication result. * - * \copyright Copyright (c) 2016-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2017-2018 Governikus GmbH & Co. KG, Germany */ #pragma once diff --git a/src/file_provider/Downloader.cpp b/src/file_provider/Downloader.cpp index 5b28dabe2..a2b80b3f0 100644 --- a/src/file_provider/Downloader.cpp +++ b/src/file_provider/Downloader.cpp @@ -1,5 +1,5 @@ /*! - * \copyright Copyright (c) 2016-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2016-2018 Governikus GmbH & Co. KG, Germany */ #include "Downloader.h" diff --git a/src/file_provider/Downloader.h b/src/file_provider/Downloader.h index c4d4ada8a..e2014d350 100644 --- a/src/file_provider/Downloader.h +++ b/src/file_provider/Downloader.h @@ -2,7 +2,7 @@ * \brief Generic class that allows to download files from a server to the * local application cache. * - * \copyright Copyright (c) 2015-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2015-2018 Governikus GmbH & Co. KG, Germany */ #pragma once diff --git a/src/file_provider/FileProvider.cpp b/src/file_provider/FileProvider.cpp index 57e7d2509..9554f4059 100644 --- a/src/file_provider/FileProvider.cpp +++ b/src/file_provider/FileProvider.cpp @@ -1,5 +1,5 @@ /*! - * \copyright Copyright (c) 2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2017-2018 Governikus GmbH & Co. KG, Germany */ #include "FileProvider.h" @@ -7,6 +7,7 @@ #include "SingletonHelper.h" #include +#include using namespace governikus; @@ -17,6 +18,7 @@ defineSingleton(FileProvider) FileProvider::FileProvider() : mUpdatableFiles() + , mGetFileMutex() { } @@ -29,6 +31,8 @@ FileProvider& FileProvider::getInstance() const QSharedPointer FileProvider::getFile(const QString& pSection, const QString& pName, const QString& pDefaultPath) { + const QMutexLocker locker(&mGetFileMutex); + const QString key = pSection + QLatin1Char('/') + pName; const QSharedPointer existingF = mUpdatableFiles.value(key, QSharedPointer()); if (existingF.isNull()) diff --git a/src/file_provider/FileProvider.h b/src/file_provider/FileProvider.h index e580e890d..6185b2244 100644 --- a/src/file_provider/FileProvider.h +++ b/src/file_provider/FileProvider.h @@ -1,7 +1,7 @@ /*! * \brief Class that holds a table of the UpdatableFile instances currently in use. * - * \copyright Copyright (c) 2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2017-2018 Governikus GmbH & Co. KG, Germany */ #pragma once @@ -9,6 +9,7 @@ #include "UpdatableFile.h" #include +#include #include @@ -20,6 +21,7 @@ class FileProvider private: QHash > mUpdatableFiles; + QMutex mGetFileMutex; protected: FileProvider(); diff --git a/src/file_provider/UpdatableFile.cpp b/src/file_provider/UpdatableFile.cpp index df8f60b73..dd02c1088 100644 --- a/src/file_provider/UpdatableFile.cpp +++ b/src/file_provider/UpdatableFile.cpp @@ -1,5 +1,5 @@ /*! - * \copyright Copyright (c) 2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2017-2018 Governikus GmbH & Co. KG, Germany */ #include "UpdatableFile.h" diff --git a/src/file_provider/UpdatableFile.h b/src/file_provider/UpdatableFile.h index c4d16a5e9..fbbaadaa5 100644 --- a/src/file_provider/UpdatableFile.h +++ b/src/file_provider/UpdatableFile.h @@ -4,7 +4,7 @@ * This class also handles the synchronization of the local cache with the content * provided by a server. * - * \copyright Copyright (c) 2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2017-2018 Governikus GmbH & Co. KG, Germany */ #pragma once diff --git a/src/global/BuildHelper.cpp b/src/global/BuildHelper.cpp index 84726466f..62df4831a 100644 --- a/src/global/BuildHelper.cpp +++ b/src/global/BuildHelper.cpp @@ -1,5 +1,5 @@ /* - * \copyright Copyright (c) 2014-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2014-2018 Governikus GmbH & Co. KG, Germany */ #include "BuildHelper.h" diff --git a/src/global/BuildHelper.h b/src/global/BuildHelper.h index 0bee3475b..cd937c7de 100644 --- a/src/global/BuildHelper.h +++ b/src/global/BuildHelper.h @@ -1,7 +1,7 @@ /* * \brief Helper to get build date and time. * - * \copyright Copyright (c) 2014-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2014-2018 Governikus GmbH & Co. KG, Germany */ #pragma once diff --git a/src/global/CardReturnCode.cpp b/src/global/CardReturnCode.cpp index 127536526..788cabc6f 100644 --- a/src/global/CardReturnCode.cpp +++ b/src/global/CardReturnCode.cpp @@ -1,5 +1,5 @@ /* - * \copyright Copyright (c) 2014-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2014-2018 Governikus GmbH & Co. KG, Germany */ #include "CardReturnCode.h" diff --git a/src/global/CardReturnCode.h b/src/global/CardReturnCode.h index 33256cf5e..3a9d91c3e 100644 --- a/src/global/CardReturnCode.h +++ b/src/global/CardReturnCode.h @@ -1,7 +1,7 @@ /*! * \brief Global error code definitions * - * \copyright Copyright (c) 2014-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2014-2018 Governikus GmbH & Co. KG, Germany */ #pragma once diff --git a/src/global/DeviceError.cpp b/src/global/DeviceError.cpp index 2387b7a17..258cc3997 100644 --- a/src/global/DeviceError.cpp +++ b/src/global/DeviceError.cpp @@ -1,5 +1,5 @@ /*! - * \copyright Copyright (c) 2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2017-2018 Governikus GmbH & Co. KG, Germany */ #include "DeviceError.h" diff --git a/src/global/DeviceError.h b/src/global/DeviceError.h index fd42af3d3..23108a903 100644 --- a/src/global/DeviceError.h +++ b/src/global/DeviceError.h @@ -1,7 +1,7 @@ /*! * \brief Global definitions for device error codes. * - * \copyright Copyright (c) 2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2017-2018 Governikus GmbH & Co. KG, Germany */ #pragma once diff --git a/src/global/DeviceInfo.cpp b/src/global/DeviceInfo.cpp index 7af4302b5..4d7492cd0 100644 --- a/src/global/DeviceInfo.cpp +++ b/src/global/DeviceInfo.cpp @@ -1,5 +1,5 @@ /*! - * \copyright Copyright (c) 2015-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2015-2018 Governikus GmbH & Co. KG, Germany */ #include "DeviceInfo.h" diff --git a/src/global/DeviceInfo.h b/src/global/DeviceInfo.h index ff7e80fcf..6521c1052 100644 --- a/src/global/DeviceInfo.h +++ b/src/global/DeviceInfo.h @@ -2,7 +2,7 @@ * \brief Implements a wrapper for different APIs to get * device information like android device name. * - * \copyright Copyright (c) 2015-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2015-2018 Governikus GmbH & Co. KG, Germany */ #pragma once diff --git a/src/global/EnumHelper.h b/src/global/EnumHelper.h index e9c3717c5..b5b8cd2cc 100644 --- a/src/global/EnumHelper.h +++ b/src/global/EnumHelper.h @@ -1,7 +1,7 @@ /*! * \brief Helper class to provide a QMetaObject handler for enumerations. * - * \copyright Copyright (c) 2014-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2014-2018 Governikus GmbH & Co. KG, Germany */ #pragma once diff --git a/src/global/Env.cpp b/src/global/Env.cpp index d8dcfd27c..5ffe7d9da 100644 --- a/src/global/Env.cpp +++ b/src/global/Env.cpp @@ -1,5 +1,5 @@ /* - * \copyright Copyright (c) 2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2017-2018 Governikus GmbH & Co. KG, Germany */ #include "Env.h" diff --git a/src/global/Env.h b/src/global/Env.h index 55f986ad2..9e73036b9 100644 --- a/src/global/Env.h +++ b/src/global/Env.h @@ -1,7 +1,7 @@ /* * \brief Runtime environment to create (mockable) objects. * - * \copyright Copyright (c) 2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2017-2018 Governikus GmbH & Co. KG, Germany */ #pragma once diff --git a/src/global/FileDestination.h b/src/global/FileDestination.h index f69abea58..023f40cda 100644 --- a/src/global/FileDestination.h +++ b/src/global/FileDestination.h @@ -1,7 +1,7 @@ /* * \brief Little helper that will abstract pathes of underlying systems * - * \copyright Copyright (c) 2014-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2014-2018 Governikus GmbH & Co. KG, Germany */ #pragma once diff --git a/src/global/FuncUtils.h b/src/global/FuncUtils.h index a6c831d63..8d7865f08 100644 --- a/src/global/FuncUtils.h +++ b/src/global/FuncUtils.h @@ -1,7 +1,7 @@ /*! * \brief Template functions that allow to map and filter over QVectors. * - * \copyright Copyright (c) 2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2017-2018 Governikus GmbH & Co. KG, Germany */ #pragma once diff --git a/src/global/GlobalStatus.cpp b/src/global/GlobalStatus.cpp index 92899d19a..f3468959c 100644 --- a/src/global/GlobalStatus.cpp +++ b/src/global/GlobalStatus.cpp @@ -1,5 +1,5 @@ /*! - * \copyright Copyright (c) 2016-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2016-2018 Governikus GmbH & Co. KG, Germany */ #include "GlobalStatus.h" @@ -83,7 +83,7 @@ QString GlobalStatus::toErrorDescription(const bool pSimplifiedVersion) const return maskMessage(tr("The program received an unexpected message from the server."), pSimplifiedVersion); case Code::Workflow_Pin_Blocked_And_Puk_Objectionable: - return tr("After three wrong entries your PIN is blocked. Using the online identification function is no longer possible."); + return tr("After three wrong entries your PIN is blocked. Please use the PIN management in this app to unblock it with the help of your PUK."); case Code::Workflow_Preverification_Developermode_Error: return tr("Using the developer mode is only allowed in a test environment."); @@ -280,7 +280,7 @@ QString GlobalStatus::toErrorDescription(const bool pSimplifiedVersion) const return tr("Empty password in extended encryption of remote reader connection request."); case Code::RemoteConnector_NoSupportedApiLevel: - return tr("Remote reader connection request does not contain any supported API level."); + return tr("Your remote reader version is incompatible with the local version. Please install the latest AusweisApp2 version on both your smartphone and your computer."); case Code::RemoteConnector_ConnectionTimeout: return tr("A timeout occurred while trying to establish a connection to a remote reader."); diff --git a/src/global/GlobalStatus.h b/src/global/GlobalStatus.h index 35087e774..5c10792dd 100644 --- a/src/global/GlobalStatus.h +++ b/src/global/GlobalStatus.h @@ -1,7 +1,7 @@ /*! * \brief A global mapping for errors * - * \copyright Copyright (c) 2016-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2016-2018 Governikus GmbH & Co. KG, Germany */ #pragma once diff --git a/src/global/Initializer.cpp b/src/global/Initializer.cpp index cef18a77e..c17dad0b4 100644 --- a/src/global/Initializer.cpp +++ b/src/global/Initializer.cpp @@ -1,5 +1,5 @@ /* - * \copyright Copyright (c) 2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2017-2018 Governikus GmbH & Co. KG, Germany */ #include "Initializer.h" diff --git a/src/global/Initializer.h b/src/global/Initializer.h index 972f075cd..36cead74f 100644 --- a/src/global/Initializer.h +++ b/src/global/Initializer.h @@ -1,7 +1,7 @@ /* * \brief Initializer to register a lambda that will be executed if QCoreApplication is ready. * - * \copyright Copyright (c) 2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2017-2018 Governikus GmbH & Co. KG, Germany */ #pragma once diff --git a/src/global/LanguageLoader.cpp b/src/global/LanguageLoader.cpp index 62c5f5871..4adf6c823 100644 --- a/src/global/LanguageLoader.cpp +++ b/src/global/LanguageLoader.cpp @@ -1,5 +1,5 @@ /* - * \copyright Copyright (c) 2014-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2014-2018 Governikus GmbH & Co. KG, Germany */ #include "LanguageLoader.h" diff --git a/src/global/LanguageLoader.h b/src/global/LanguageLoader.h index 3f3281787..ca46f677a 100644 --- a/src/global/LanguageLoader.h +++ b/src/global/LanguageLoader.h @@ -1,7 +1,7 @@ /* * \brief Loads translation files for different languages. * - * \copyright Copyright (c) 2014-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2014-2018 Governikus GmbH & Co. KG, Germany */ #pragma once diff --git a/src/global/LogCategories.cpp b/src/global/LogCategories.cpp index 1d2db6730..592873193 100644 --- a/src/global/LogCategories.cpp +++ b/src/global/LogCategories.cpp @@ -2,7 +2,7 @@ * \brief Definition of all logging categories. * * \see Q_LOGGING_CATEGORY - * \copyright Copyright (c) 2016-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2016-2018 Governikus GmbH & Co. KG, Germany */ #include @@ -79,3 +79,8 @@ Q_LOGGING_CATEGORY(support, "support") * Logging category for normally critical errors which are allowed to occur in developer mode */ Q_LOGGING_CATEGORY(developermode, "developermode") + +/*! + * Loggin category for persistent settings + */ +Q_LOGGING_CATEGORY(settings, "settings") diff --git a/src/global/LogHandler.cpp b/src/global/LogHandler.cpp index 6d56c805f..a9d0099da 100644 --- a/src/global/LogHandler.cpp +++ b/src/global/LogHandler.cpp @@ -1,5 +1,5 @@ /* - * \copyright Copyright (c) 2014-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2014-2018 Governikus GmbH & Co. KG, Germany */ #include "LogHandler.h" diff --git a/src/global/LogHandler.h b/src/global/LogHandler.h index bd1d328bd..a078654e4 100644 --- a/src/global/LogHandler.h +++ b/src/global/LogHandler.h @@ -1,7 +1,7 @@ /* * \brief Logging handler of QtMessageHandler * - * \copyright Copyright (c) 2014-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2014-2018 Governikus GmbH & Co. KG, Germany */ #pragma once diff --git a/src/global/Randomizer.cpp b/src/global/Randomizer.cpp index e12fd2f6d..ae9a3f196 100644 --- a/src/global/Randomizer.cpp +++ b/src/global/Randomizer.cpp @@ -1,5 +1,5 @@ /* - * \copyright Copyright (c) 2015-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2015-2018 Governikus GmbH & Co. KG, Germany */ #include "Randomizer.h" diff --git a/src/global/Randomizer.h b/src/global/Randomizer.h index 05ff1540b..2b55ba14e 100644 --- a/src/global/Randomizer.h +++ b/src/global/Randomizer.h @@ -1,7 +1,7 @@ /*! * \brief Helper to get a Randomizer. * - * \copyright Copyright (c) 2015-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2015-2018 Governikus GmbH & Co. KG, Germany */ #pragma once diff --git a/src/global/ResourceLoader.cpp b/src/global/ResourceLoader.cpp index a494c3308..9ac3e9b3e 100644 --- a/src/global/ResourceLoader.cpp +++ b/src/global/ResourceLoader.cpp @@ -1,5 +1,5 @@ /* - * \copyright Copyright (c) 2014-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2014-2018 Governikus GmbH & Co. KG, Germany */ #include "ResourceLoader.h" diff --git a/src/global/ResourceLoader.h b/src/global/ResourceLoader.h index 01373bcd5..e2e62ab7b 100644 --- a/src/global/ResourceLoader.h +++ b/src/global/ResourceLoader.h @@ -1,7 +1,7 @@ /* * \brief Handler to load and manage resources and resource files. * - * \copyright Copyright (c) 2014-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2014-2018 Governikus GmbH & Co. KG, Germany */ #pragma once diff --git a/src/global/Result.cpp b/src/global/Result.cpp index e30baf50c..6c28e3b87 100644 --- a/src/global/Result.cpp +++ b/src/global/Result.cpp @@ -1,5 +1,5 @@ /*! - * \copyright Copyright (c) 2014-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2014-2018 Governikus GmbH & Co. KG, Germany */ #include "Result.h" diff --git a/src/global/Result.h b/src/global/Result.h index 228cff88b..96f373dae 100644 --- a/src/global/Result.h +++ b/src/global/Result.h @@ -1,5 +1,5 @@ /*! - * \copyright Copyright (c) 2014-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2014-2018 Governikus GmbH & Co. KG, Germany */ #pragma once diff --git a/src/global/ScopeGuard.cpp b/src/global/ScopeGuard.cpp index bf07d6e4e..8a91cfa42 100644 --- a/src/global/ScopeGuard.cpp +++ b/src/global/ScopeGuard.cpp @@ -1,5 +1,5 @@ /*! - * \copyright Copyright (c) 2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2017-2018 Governikus GmbH & Co. KG, Germany */ #include "ScopeGuard.h" diff --git a/src/global/ScopeGuard.h b/src/global/ScopeGuard.h index d69e83d22..0b2b50e88 100644 --- a/src/global/ScopeGuard.h +++ b/src/global/ScopeGuard.h @@ -1,7 +1,7 @@ /*! * \brief Calls a lambda once the object is destroyed * - * \copyright Copyright (c) 2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2017-2018 Governikus GmbH & Co. KG, Germany */ #pragma once diff --git a/src/global/SingletonHelper.h b/src/global/SingletonHelper.h index cf57273f4..1f7a0ebd0 100644 --- a/src/global/SingletonHelper.h +++ b/src/global/SingletonHelper.h @@ -2,7 +2,7 @@ * \brief Helper to introduce a Singleton. * Be aware to use this helper in .cpp file only! * - * \copyright Copyright (c) 2016-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2016-2018 Governikus GmbH & Co. KG, Germany */ #pragma once diff --git a/src/global/UsbId.cpp b/src/global/UsbId.cpp index bbd51682f..f8d72c0e6 100644 --- a/src/global/UsbId.cpp +++ b/src/global/UsbId.cpp @@ -1,5 +1,5 @@ /*! - * \copyright Copyright (c) 2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2017-2018 Governikus GmbH & Co. KG, Germany */ #include "UsbId.h" diff --git a/src/global/UsbId.h b/src/global/UsbId.h index aceabefa5..06ebaba0f 100644 --- a/src/global/UsbId.h +++ b/src/global/UsbId.h @@ -1,5 +1,5 @@ /*! - * \copyright Copyright (c) 2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2017-2018 Governikus GmbH & Co. KG, Germany */ #pragma once diff --git a/src/global/VersionInfo.cpp b/src/global/VersionInfo.cpp index 659f49fce..a78b12016 100644 --- a/src/global/VersionInfo.cpp +++ b/src/global/VersionInfo.cpp @@ -1,5 +1,5 @@ /* - * \copyright Copyright (c) 2016-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2016-2018 Governikus GmbH & Co. KG, Germany */ #include "VersionInfo.h" diff --git a/src/global/VersionInfo.h b/src/global/VersionInfo.h index 6743eb21b..cae5a61af 100644 --- a/src/global/VersionInfo.h +++ b/src/global/VersionInfo.h @@ -1,5 +1,5 @@ /*! - * \copyright Copyright (c) 2016-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2016-2018 Governikus GmbH & Co. KG, Germany */ #pragma once diff --git a/src/global/VersionNumber.cpp b/src/global/VersionNumber.cpp index 3e71bc627..38e353124 100644 --- a/src/global/VersionNumber.cpp +++ b/src/global/VersionNumber.cpp @@ -1,5 +1,5 @@ /* - * \copyright Copyright (c) 2016-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2016-2018 Governikus GmbH & Co. KG, Germany */ #include "VersionNumber.h" diff --git a/src/global/VersionNumber.h b/src/global/VersionNumber.h index 023c2f0f0..8dcf6af00 100644 --- a/src/global/VersionNumber.h +++ b/src/global/VersionNumber.h @@ -1,7 +1,7 @@ /*! * \brief Extension to QVersionNumber. * - * \copyright Copyright (c) 2016-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2016-2018 Governikus GmbH & Co. KG, Germany */ #pragma once diff --git a/src/jsonapi/MessageDispatcher.cpp b/src/jsonapi/MessageDispatcher.cpp index 20e22f96d..dfbe0b219 100644 --- a/src/jsonapi/MessageDispatcher.cpp +++ b/src/jsonapi/MessageDispatcher.cpp @@ -1,5 +1,5 @@ /* - * \copyright Copyright (c) 2016-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2016-2018 Governikus GmbH & Co. KG, Germany */ #include "MessageDispatcher.h" diff --git a/src/jsonapi/MessageDispatcher.h b/src/jsonapi/MessageDispatcher.h index ace289fdb..014d69ed6 100644 --- a/src/jsonapi/MessageDispatcher.h +++ b/src/jsonapi/MessageDispatcher.h @@ -1,7 +1,7 @@ /*! * \brief Dispatch Messages of JSON API. * - * \copyright Copyright (c) 2016-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2016-2018 Governikus GmbH & Co. KG, Germany */ #pragma once diff --git a/src/jsonapi/UIPlugInJsonApi.cpp b/src/jsonapi/UIPlugInJsonApi.cpp index 16f651634..28658ebc2 100644 --- a/src/jsonapi/UIPlugInJsonApi.cpp +++ b/src/jsonapi/UIPlugInJsonApi.cpp @@ -1,5 +1,5 @@ /*! - * \copyright Copyright (c) 2016-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2016-2018 Governikus GmbH & Co. KG, Germany */ #include "UIPlugInJsonApi.h" diff --git a/src/jsonapi/UIPlugInJsonApi.h b/src/jsonapi/UIPlugInJsonApi.h index c0d986cb0..f2872ad3d 100644 --- a/src/jsonapi/UIPlugInJsonApi.h +++ b/src/jsonapi/UIPlugInJsonApi.h @@ -1,7 +1,7 @@ /*! * \brief UIPlugIn implementation of the Json API. * - * \copyright Copyright (c) 2016-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2016-2018 Governikus GmbH & Co. KG, Germany */ #pragma once diff --git a/src/jsonapi/messages/MsgContext.cpp b/src/jsonapi/messages/MsgContext.cpp index b82103e6d..29bc19c9d 100644 --- a/src/jsonapi/messages/MsgContext.cpp +++ b/src/jsonapi/messages/MsgContext.cpp @@ -1,5 +1,5 @@ /* - * \copyright Copyright (c) 2016-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2016-2018 Governikus GmbH & Co. KG, Germany */ #include "MsgContext.h" diff --git a/src/jsonapi/messages/MsgContext.h b/src/jsonapi/messages/MsgContext.h index 147608e8f..02e8a748a 100644 --- a/src/jsonapi/messages/MsgContext.h +++ b/src/jsonapi/messages/MsgContext.h @@ -1,7 +1,7 @@ /*! * \brief Context of JSON API. * - * \copyright Copyright (c) 2016-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2016-2018 Governikus GmbH & Co. KG, Germany */ #pragma once diff --git a/src/jsonapi/messages/MsgHandler.cpp b/src/jsonapi/messages/MsgHandler.cpp index 1888a8809..c9bfda47d 100644 --- a/src/jsonapi/messages/MsgHandler.cpp +++ b/src/jsonapi/messages/MsgHandler.cpp @@ -1,5 +1,5 @@ /*! - * \copyright Copyright (c) 2016-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2016-2018 Governikus GmbH & Co. KG, Germany */ #include "MsgHandler.h" diff --git a/src/jsonapi/messages/MsgHandler.h b/src/jsonapi/messages/MsgHandler.h index a4449cd95..abde2827f 100644 --- a/src/jsonapi/messages/MsgHandler.h +++ b/src/jsonapi/messages/MsgHandler.h @@ -1,7 +1,7 @@ /*! * \brief Base of all messages of JSON API. * - * \copyright Copyright (c) 2016-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2016-2018 Governikus GmbH & Co. KG, Germany */ #pragma once diff --git a/src/jsonapi/messages/MsgHandlerAccessRights.cpp b/src/jsonapi/messages/MsgHandlerAccessRights.cpp index 6809c6eab..8a05f8ef7 100644 --- a/src/jsonapi/messages/MsgHandlerAccessRights.cpp +++ b/src/jsonapi/messages/MsgHandlerAccessRights.cpp @@ -1,5 +1,5 @@ /*! - * \copyright Copyright (c) 2016-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2016-2018 Governikus GmbH & Co. KG, Germany */ #include "MsgHandlerAccessRights.h" diff --git a/src/jsonapi/messages/MsgHandlerAccessRights.h b/src/jsonapi/messages/MsgHandlerAccessRights.h index 861f9d7f5..27b5486d5 100644 --- a/src/jsonapi/messages/MsgHandlerAccessRights.h +++ b/src/jsonapi/messages/MsgHandlerAccessRights.h @@ -1,7 +1,7 @@ /*! * \brief Message MsgHandlerAccessRights of JSON API. * - * \copyright Copyright (c) 2016-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2016-2018 Governikus GmbH & Co. KG, Germany */ #pragma once diff --git a/src/jsonapi/messages/MsgHandlerApiLevel.cpp b/src/jsonapi/messages/MsgHandlerApiLevel.cpp index edef1365f..fde559fee 100644 --- a/src/jsonapi/messages/MsgHandlerApiLevel.cpp +++ b/src/jsonapi/messages/MsgHandlerApiLevel.cpp @@ -1,5 +1,5 @@ /*! - * \copyright Copyright (c) 2016-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2016-2018 Governikus GmbH & Co. KG, Germany */ #include "MsgHandlerApiLevel.h" diff --git a/src/jsonapi/messages/MsgHandlerApiLevel.h b/src/jsonapi/messages/MsgHandlerApiLevel.h index 639d9b198..f4fb8464c 100644 --- a/src/jsonapi/messages/MsgHandlerApiLevel.h +++ b/src/jsonapi/messages/MsgHandlerApiLevel.h @@ -1,7 +1,7 @@ /*! * \brief Message API_LEVEL of JSON API. * - * \copyright Copyright (c) 2016-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2016-2018 Governikus GmbH & Co. KG, Germany */ #pragma once diff --git a/src/jsonapi/messages/MsgHandlerAuth.cpp b/src/jsonapi/messages/MsgHandlerAuth.cpp index 4ab1cd866..fd9c6b620 100644 --- a/src/jsonapi/messages/MsgHandlerAuth.cpp +++ b/src/jsonapi/messages/MsgHandlerAuth.cpp @@ -1,5 +1,5 @@ /*! - * \copyright Copyright (c) 2016-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2016-2018 Governikus GmbH & Co. KG, Germany */ #include "MsgHandlerAuth.h" diff --git a/src/jsonapi/messages/MsgHandlerAuth.h b/src/jsonapi/messages/MsgHandlerAuth.h index bb2328daa..0dffbde2a 100644 --- a/src/jsonapi/messages/MsgHandlerAuth.h +++ b/src/jsonapi/messages/MsgHandlerAuth.h @@ -1,7 +1,7 @@ /*! * \brief Message Auth of JSON API. * - * \copyright Copyright (c) 2016-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2016-2018 Governikus GmbH & Co. KG, Germany */ #pragma once diff --git a/src/jsonapi/messages/MsgHandlerBadState.cpp b/src/jsonapi/messages/MsgHandlerBadState.cpp index 4a038a129..9265824a8 100644 --- a/src/jsonapi/messages/MsgHandlerBadState.cpp +++ b/src/jsonapi/messages/MsgHandlerBadState.cpp @@ -1,5 +1,5 @@ /*! - * \copyright Copyright (c) 2016-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2016-2018 Governikus GmbH & Co. KG, Germany */ #include "MsgHandlerBadState.h" diff --git a/src/jsonapi/messages/MsgHandlerBadState.h b/src/jsonapi/messages/MsgHandlerBadState.h index 231532724..5741afcea 100644 --- a/src/jsonapi/messages/MsgHandlerBadState.h +++ b/src/jsonapi/messages/MsgHandlerBadState.h @@ -1,7 +1,7 @@ /*! * \brief Message BadState of JSON API. * - * \copyright Copyright (c) 2016-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2016-2018 Governikus GmbH & Co. KG, Germany */ #pragma once diff --git a/src/jsonapi/messages/MsgHandlerCertificate.cpp b/src/jsonapi/messages/MsgHandlerCertificate.cpp index 895d8f9c6..eadab4724 100644 --- a/src/jsonapi/messages/MsgHandlerCertificate.cpp +++ b/src/jsonapi/messages/MsgHandlerCertificate.cpp @@ -1,5 +1,5 @@ /*! - * \copyright Copyright (c) 2016-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2016-2018 Governikus GmbH & Co. KG, Germany */ #include "MsgHandlerCertificate.h" diff --git a/src/jsonapi/messages/MsgHandlerCertificate.h b/src/jsonapi/messages/MsgHandlerCertificate.h index aeacb4abd..908fdbbd8 100644 --- a/src/jsonapi/messages/MsgHandlerCertificate.h +++ b/src/jsonapi/messages/MsgHandlerCertificate.h @@ -1,7 +1,7 @@ /*! * \brief Message handler for GET_CERTIFICATE of JSON API. * - * \copyright Copyright (c) 2016-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2016-2018 Governikus GmbH & Co. KG, Germany */ #pragma once diff --git a/src/jsonapi/messages/MsgHandlerEnterCan.cpp b/src/jsonapi/messages/MsgHandlerEnterCan.cpp index adeb6d9e2..e9d4197a5 100644 --- a/src/jsonapi/messages/MsgHandlerEnterCan.cpp +++ b/src/jsonapi/messages/MsgHandlerEnterCan.cpp @@ -1,5 +1,5 @@ /*! - * \copyright Copyright (c) 2016-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2016-2018 Governikus GmbH & Co. KG, Germany */ #include "MsgHandlerEnterCan.h" diff --git a/src/jsonapi/messages/MsgHandlerEnterCan.h b/src/jsonapi/messages/MsgHandlerEnterCan.h index bdb83e95f..79dceac86 100644 --- a/src/jsonapi/messages/MsgHandlerEnterCan.h +++ b/src/jsonapi/messages/MsgHandlerEnterCan.h @@ -1,7 +1,7 @@ /*! * \brief Message EnterCan of JSON API. * - * \copyright Copyright (c) 2016-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2016-2018 Governikus GmbH & Co. KG, Germany */ #pragma once diff --git a/src/jsonapi/messages/MsgHandlerEnterNumber.cpp b/src/jsonapi/messages/MsgHandlerEnterNumber.cpp index ee0407e08..67b13cead 100644 --- a/src/jsonapi/messages/MsgHandlerEnterNumber.cpp +++ b/src/jsonapi/messages/MsgHandlerEnterNumber.cpp @@ -1,5 +1,5 @@ /*! - * \copyright Copyright (c) 2016-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2016-2018 Governikus GmbH & Co. KG, Germany */ #include "MsgHandlerEnterNumber.h" diff --git a/src/jsonapi/messages/MsgHandlerEnterNumber.h b/src/jsonapi/messages/MsgHandlerEnterNumber.h index da3acaaa2..f08072b88 100644 --- a/src/jsonapi/messages/MsgHandlerEnterNumber.h +++ b/src/jsonapi/messages/MsgHandlerEnterNumber.h @@ -1,7 +1,7 @@ /*! * \brief Helper handler for EnterCan, EnterPin and EnterPuk of JSON API. * - * \copyright Copyright (c) 2016-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2016-2018 Governikus GmbH & Co. KG, Germany */ #pragma once diff --git a/src/jsonapi/messages/MsgHandlerEnterPin.cpp b/src/jsonapi/messages/MsgHandlerEnterPin.cpp index dd0470eef..06a781f4d 100644 --- a/src/jsonapi/messages/MsgHandlerEnterPin.cpp +++ b/src/jsonapi/messages/MsgHandlerEnterPin.cpp @@ -1,5 +1,5 @@ /*! - * \copyright Copyright (c) 2016-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2016-2018 Governikus GmbH & Co. KG, Germany */ #include "MsgHandlerEnterPin.h" diff --git a/src/jsonapi/messages/MsgHandlerEnterPin.h b/src/jsonapi/messages/MsgHandlerEnterPin.h index 3d9ec6d3a..967bc5670 100644 --- a/src/jsonapi/messages/MsgHandlerEnterPin.h +++ b/src/jsonapi/messages/MsgHandlerEnterPin.h @@ -1,7 +1,7 @@ /*! * \brief Message EnterPin of JSON API. * - * \copyright Copyright (c) 2016-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2016-2018 Governikus GmbH & Co. KG, Germany */ #pragma once diff --git a/src/jsonapi/messages/MsgHandlerEnterPuk.cpp b/src/jsonapi/messages/MsgHandlerEnterPuk.cpp index ca1dab2a8..5c3c09620 100644 --- a/src/jsonapi/messages/MsgHandlerEnterPuk.cpp +++ b/src/jsonapi/messages/MsgHandlerEnterPuk.cpp @@ -1,5 +1,5 @@ /*! - * \copyright Copyright (c) 2016-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2016-2018 Governikus GmbH & Co. KG, Germany */ #include "MsgHandlerEnterPuk.h" diff --git a/src/jsonapi/messages/MsgHandlerEnterPuk.h b/src/jsonapi/messages/MsgHandlerEnterPuk.h index 6cf49cd4f..ba8333e70 100644 --- a/src/jsonapi/messages/MsgHandlerEnterPuk.h +++ b/src/jsonapi/messages/MsgHandlerEnterPuk.h @@ -1,7 +1,7 @@ /*! * \brief Message EnterPuk of JSON API. * - * \copyright Copyright (c) 2016-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2016-2018 Governikus GmbH & Co. KG, Germany */ #pragma once diff --git a/src/jsonapi/messages/MsgHandlerInfo.cpp b/src/jsonapi/messages/MsgHandlerInfo.cpp index a36a7f2e6..eae3ad1bb 100644 --- a/src/jsonapi/messages/MsgHandlerInfo.cpp +++ b/src/jsonapi/messages/MsgHandlerInfo.cpp @@ -1,5 +1,5 @@ /*! - * \copyright Copyright (c) 2016-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2016-2018 Governikus GmbH & Co. KG, Germany */ #include "MsgHandlerInfo.h" diff --git a/src/jsonapi/messages/MsgHandlerInfo.h b/src/jsonapi/messages/MsgHandlerInfo.h index b5e121e44..266e860f7 100644 --- a/src/jsonapi/messages/MsgHandlerInfo.h +++ b/src/jsonapi/messages/MsgHandlerInfo.h @@ -1,7 +1,7 @@ /*! * \brief Message Info of JSON API. * - * \copyright Copyright (c) 2016-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2016-2018 Governikus GmbH & Co. KG, Germany */ #pragma once diff --git a/src/jsonapi/messages/MsgHandlerInsertCard.cpp b/src/jsonapi/messages/MsgHandlerInsertCard.cpp index 42727d4a4..3abfc71b7 100644 --- a/src/jsonapi/messages/MsgHandlerInsertCard.cpp +++ b/src/jsonapi/messages/MsgHandlerInsertCard.cpp @@ -1,5 +1,5 @@ /*! - * \copyright Copyright (c) 2016-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2016-2018 Governikus GmbH & Co. KG, Germany */ #include "MsgHandlerInsertCard.h" diff --git a/src/jsonapi/messages/MsgHandlerInsertCard.h b/src/jsonapi/messages/MsgHandlerInsertCard.h index 0bf815dd9..64df3db26 100644 --- a/src/jsonapi/messages/MsgHandlerInsertCard.h +++ b/src/jsonapi/messages/MsgHandlerInsertCard.h @@ -1,7 +1,7 @@ /*! * \brief Message InsertCard of JSON API. * - * \copyright Copyright (c) 2016-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2016-2018 Governikus GmbH & Co. KG, Germany */ #pragma once diff --git a/src/jsonapi/messages/MsgHandlerInternalError.cpp b/src/jsonapi/messages/MsgHandlerInternalError.cpp index 82e162358..2293976fd 100644 --- a/src/jsonapi/messages/MsgHandlerInternalError.cpp +++ b/src/jsonapi/messages/MsgHandlerInternalError.cpp @@ -1,5 +1,5 @@ /*! - * \copyright Copyright (c) 2016-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2016-2018 Governikus GmbH & Co. KG, Germany */ #include "MsgHandlerInternalError.h" diff --git a/src/jsonapi/messages/MsgHandlerInternalError.h b/src/jsonapi/messages/MsgHandlerInternalError.h index cb6ef7e69..a474cf1e1 100644 --- a/src/jsonapi/messages/MsgHandlerInternalError.h +++ b/src/jsonapi/messages/MsgHandlerInternalError.h @@ -1,7 +1,7 @@ /*! * \brief Message INTERNAL_ERROR of JSON API. * - * \copyright Copyright (c) 2016-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2016-2018 Governikus GmbH & Co. KG, Germany */ #pragma once diff --git a/src/jsonapi/messages/MsgHandlerInvalid.cpp b/src/jsonapi/messages/MsgHandlerInvalid.cpp index df8374a53..421b03d79 100644 --- a/src/jsonapi/messages/MsgHandlerInvalid.cpp +++ b/src/jsonapi/messages/MsgHandlerInvalid.cpp @@ -1,5 +1,5 @@ /*! - * \copyright Copyright (c) 2016-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2016-2018 Governikus GmbH & Co. KG, Germany */ #include "MsgHandlerInvalid.h" diff --git a/src/jsonapi/messages/MsgHandlerInvalid.h b/src/jsonapi/messages/MsgHandlerInvalid.h index a64b8904f..0d56940c5 100644 --- a/src/jsonapi/messages/MsgHandlerInvalid.h +++ b/src/jsonapi/messages/MsgHandlerInvalid.h @@ -1,7 +1,7 @@ /*! * \brief Message Invalid of JSON API. * - * \copyright Copyright (c) 2016-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2016-2018 Governikus GmbH & Co. KG, Germany */ #pragma once diff --git a/src/jsonapi/messages/MsgHandlerReader.cpp b/src/jsonapi/messages/MsgHandlerReader.cpp index 364fcda88..e200c8d23 100644 --- a/src/jsonapi/messages/MsgHandlerReader.cpp +++ b/src/jsonapi/messages/MsgHandlerReader.cpp @@ -1,5 +1,5 @@ /*! - * \copyright Copyright (c) 2016-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2016-2018 Governikus GmbH & Co. KG, Germany */ #include "MsgHandlerReader.h" diff --git a/src/jsonapi/messages/MsgHandlerReader.h b/src/jsonapi/messages/MsgHandlerReader.h index 32eddc08d..bcf130ab4 100644 --- a/src/jsonapi/messages/MsgHandlerReader.h +++ b/src/jsonapi/messages/MsgHandlerReader.h @@ -1,7 +1,7 @@ /*! * \brief Message Reader of JSON API. * - * \copyright Copyright (c) 2016-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2016-2018 Governikus GmbH & Co. KG, Germany */ #pragma once diff --git a/src/jsonapi/messages/MsgHandlerReaderList.cpp b/src/jsonapi/messages/MsgHandlerReaderList.cpp index 61c4547e3..e8984609a 100644 --- a/src/jsonapi/messages/MsgHandlerReaderList.cpp +++ b/src/jsonapi/messages/MsgHandlerReaderList.cpp @@ -1,5 +1,5 @@ /*! - * \copyright Copyright (c) 2016-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2016-2018 Governikus GmbH & Co. KG, Germany */ #include "MsgHandlerReaderList.h" diff --git a/src/jsonapi/messages/MsgHandlerReaderList.h b/src/jsonapi/messages/MsgHandlerReaderList.h index 4996553fc..8617c0eeb 100644 --- a/src/jsonapi/messages/MsgHandlerReaderList.h +++ b/src/jsonapi/messages/MsgHandlerReaderList.h @@ -1,7 +1,7 @@ /*! * \brief Message ReaderList of JSON API. * - * \copyright Copyright (c) 2016-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2016-2018 Governikus GmbH & Co. KG, Germany */ #pragma once diff --git a/src/jsonapi/messages/MsgHandlerUnknownCommand.cpp b/src/jsonapi/messages/MsgHandlerUnknownCommand.cpp index 899ef7e74..30d855fd8 100644 --- a/src/jsonapi/messages/MsgHandlerUnknownCommand.cpp +++ b/src/jsonapi/messages/MsgHandlerUnknownCommand.cpp @@ -1,5 +1,5 @@ /*! - * \copyright Copyright (c) 2016-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2016-2018 Governikus GmbH & Co. KG, Germany */ #include "MsgHandlerUnknownCommand.h" diff --git a/src/jsonapi/messages/MsgHandlerUnknownCommand.h b/src/jsonapi/messages/MsgHandlerUnknownCommand.h index 11db4eed7..7d844544a 100644 --- a/src/jsonapi/messages/MsgHandlerUnknownCommand.h +++ b/src/jsonapi/messages/MsgHandlerUnknownCommand.h @@ -1,7 +1,7 @@ /*! * \brief MsgHandlerUnknownCommand of JSON API. * - * \copyright Copyright (c) 2016-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2016-2018 Governikus GmbH & Co. KG, Germany */ #pragma once diff --git a/src/jsonapi/messages/MsgTypes.cpp b/src/jsonapi/messages/MsgTypes.cpp index 0039c851c..b038766d3 100644 --- a/src/jsonapi/messages/MsgTypes.cpp +++ b/src/jsonapi/messages/MsgTypes.cpp @@ -1,5 +1,5 @@ /*! - * \copyright Copyright (c) 2016-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2016-2018 Governikus GmbH & Co. KG, Germany */ #include "MsgTypes.h" diff --git a/src/jsonapi/messages/MsgTypes.h b/src/jsonapi/messages/MsgTypes.h index 69d35c922..8d9d4e8a3 100644 --- a/src/jsonapi/messages/MsgTypes.h +++ b/src/jsonapi/messages/MsgTypes.h @@ -1,7 +1,7 @@ /*! * \brief Enumerations of message types and additional stuff. * - * \copyright Copyright (c) 2016-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2016-2018 Governikus GmbH & Co. KG, Germany */ #pragma once diff --git a/src/main.cpp b/src/main.cpp index 4bd6bfc6b..9d3d60a89 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -1,5 +1,5 @@ /* - * \copyright Copyright (c) 2014-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2014-2018 Governikus GmbH & Co. KG, Germany */ #include "controller/AppController.h" diff --git a/src/network/DatagramHandler.cpp b/src/network/DatagramHandler.cpp index dc84f3005..4b0026b9d 100644 --- a/src/network/DatagramHandler.cpp +++ b/src/network/DatagramHandler.cpp @@ -1,5 +1,5 @@ /*! - * \copyright Copyright (c) 2016-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2016-2018 Governikus GmbH & Co. KG, Germany */ #include "DatagramHandler.h" diff --git a/src/network/DatagramHandler.h b/src/network/DatagramHandler.h index 56f9ad76b..54642f98f 100644 --- a/src/network/DatagramHandler.h +++ b/src/network/DatagramHandler.h @@ -1,7 +1,7 @@ /*! * \brief Provides an interface to send and receive datagrams over UDP. * - * \copyright Copyright (c) 2016-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2016-2018 Governikus GmbH & Co. KG, Germany */ #pragma once diff --git a/src/network/DatagramHandlerImpl.cpp b/src/network/DatagramHandlerImpl.cpp index 6efc50908..ab11bd9c0 100644 --- a/src/network/DatagramHandlerImpl.cpp +++ b/src/network/DatagramHandlerImpl.cpp @@ -1,5 +1,5 @@ /*! - * \copyright Copyright (c) 2016-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2016-2018 Governikus GmbH & Co. KG, Germany */ #include "DatagramHandlerImpl.h" diff --git a/src/network/DatagramHandlerImpl.h b/src/network/DatagramHandlerImpl.h index ce540bb78..298aca5ed 100644 --- a/src/network/DatagramHandlerImpl.h +++ b/src/network/DatagramHandlerImpl.h @@ -1,7 +1,7 @@ /*! * \brief Provides an UDP socket to send and receive datagrams. * - * \copyright Copyright (c) 2016-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2016-2018 Governikus GmbH & Co. KG, Germany */ #pragma once diff --git a/src/network/HttpRequest.cpp b/src/network/HttpRequest.cpp index 558a4156e..a085795b7 100644 --- a/src/network/HttpRequest.cpp +++ b/src/network/HttpRequest.cpp @@ -1,5 +1,5 @@ /*! - * \copyright Copyright (c) 2016-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2016-2018 Governikus GmbH & Co. KG, Germany */ #include "HttpRequest.h" diff --git a/src/network/HttpRequest.h b/src/network/HttpRequest.h index 003b2d48f..27f9aba14 100644 --- a/src/network/HttpRequest.h +++ b/src/network/HttpRequest.h @@ -1,7 +1,7 @@ /*! * \brief Class to parse http request. * - * \copyright Copyright (c) 2016-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2016-2018 Governikus GmbH & Co. KG, Germany */ #pragma once diff --git a/src/network/HttpResponse.cpp b/src/network/HttpResponse.cpp index a056d3656..5cddf887f 100644 --- a/src/network/HttpResponse.cpp +++ b/src/network/HttpResponse.cpp @@ -1,5 +1,5 @@ /*! - * \copyright Copyright (c) 2016-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2016-2018 Governikus GmbH & Co. KG, Germany */ #include "HttpResponse.h" diff --git a/src/network/HttpResponse.h b/src/network/HttpResponse.h index 49d6a21c3..cfc5da140 100644 --- a/src/network/HttpResponse.h +++ b/src/network/HttpResponse.h @@ -1,7 +1,7 @@ /*! * \brief Class to create http response. * - * \copyright Copyright (c) 2016-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2016-2018 Governikus GmbH & Co. KG, Germany */ #pragma once diff --git a/src/network/HttpServer.cpp b/src/network/HttpServer.cpp index 39bbe3378..166d3bbf9 100644 --- a/src/network/HttpServer.cpp +++ b/src/network/HttpServer.cpp @@ -1,5 +1,5 @@ /*! - * \copyright Copyright (c) 2016-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2016-2018 Governikus GmbH & Co. KG, Germany */ #include "HttpServer.h" diff --git a/src/network/HttpServer.h b/src/network/HttpServer.h index 474722067..575fcd396 100644 --- a/src/network/HttpServer.h +++ b/src/network/HttpServer.h @@ -1,7 +1,7 @@ /*! * \brief Provide a HTTP server. * - * \copyright Copyright (c) 2016-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2016-2018 Governikus GmbH & Co. KG, Germany */ #pragma once diff --git a/src/network/HttpServerRequestor.cpp b/src/network/HttpServerRequestor.cpp index cabd5fb77..89f876c7b 100644 --- a/src/network/HttpServerRequestor.cpp +++ b/src/network/HttpServerRequestor.cpp @@ -1,5 +1,5 @@ /* - * \copyright Copyright (c) 2014-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2014-2018 Governikus GmbH & Co. KG, Germany */ #include "Env.h" diff --git a/src/network/HttpServerRequestor.h b/src/network/HttpServerRequestor.h index d72e925b7..b4eb1345c 100644 --- a/src/network/HttpServerRequestor.h +++ b/src/network/HttpServerRequestor.h @@ -1,7 +1,7 @@ /* * \brief Sends one time GET requests to server. * - * \copyright Copyright (c) 2014-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2014-2018 Governikus GmbH & Co. KG, Germany */ #pragma once diff --git a/src/network/HttpServerStatusParser.cpp b/src/network/HttpServerStatusParser.cpp index ca8db743b..990b363be 100644 --- a/src/network/HttpServerStatusParser.cpp +++ b/src/network/HttpServerStatusParser.cpp @@ -1,5 +1,5 @@ /*! - * \copyright Copyright (c) 2014-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2014-2018 Governikus GmbH & Co. KG, Germany */ #include "HttpServerStatusParser.h" diff --git a/src/network/HttpServerStatusParser.h b/src/network/HttpServerStatusParser.h index 440cce112..c7b066164 100644 --- a/src/network/HttpServerStatusParser.h +++ b/src/network/HttpServerStatusParser.h @@ -1,7 +1,7 @@ /*! * \brief Sends a status request to given url:port and tries to detect details and server header. * - * \copyright Copyright (c) 2014-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2014-2018 Governikus GmbH & Co. KG, Germany */ #pragma once diff --git a/src/network/HttpStatusCode.cpp b/src/network/HttpStatusCode.cpp index 10ad98372..60c75894e 100644 --- a/src/network/HttpStatusCode.cpp +++ b/src/network/HttpStatusCode.cpp @@ -1,5 +1,5 @@ /*! - * \copyright Copyright (c) 2016-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2016-2018 Governikus GmbH & Co. KG, Germany */ #include "HttpStatusCode.h" diff --git a/src/network/HttpStatusCode.h b/src/network/HttpStatusCode.h index 64be69dcd..28fa81315 100644 --- a/src/network/HttpStatusCode.h +++ b/src/network/HttpStatusCode.h @@ -1,7 +1,7 @@ /*! * \brief Defines an enumeration of HTTP Status Codes as they are not defined by Qt. * - * \copyright Copyright (c) 2016-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2016-2018 Governikus GmbH & Co. KG, Germany */ #pragma once diff --git a/src/network/NetworkManager.cpp b/src/network/NetworkManager.cpp index 31d0d763e..d685d94ee 100644 --- a/src/network/NetworkManager.cpp +++ b/src/network/NetworkManager.cpp @@ -1,5 +1,5 @@ /* - * \copyright Copyright (c) 2014-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2014-2018 Governikus GmbH & Co. KG, Germany */ #include "NetworkManager.h" @@ -61,7 +61,12 @@ void NetworkManager::clearConnections() } -QNetworkReply* NetworkManager::paos(QNetworkRequest& pRequest, const QByteArray& pNamespace, const QByteArray& pData, bool pUsePsk, int pTimeoutInMilliSeconds) +QNetworkReply* NetworkManager::paos(QNetworkRequest& pRequest, + const QByteArray& pNamespace, + const QByteArray& pData, + bool pUsePsk, + const QByteArray& pSslSession, + int pTimeoutInMilliSeconds) { if (mApplicationExitInProgress) { @@ -77,7 +82,9 @@ QNetworkReply* NetworkManager::paos(QNetworkRequest& pRequest, const QByteArray& QNetworkReply* response; SecureStorage::TlsSuite tlsSuite = pUsePsk ? SecureStorage::TlsSuite::PSK : SecureStorage::TlsSuite::DEFAULT; - pRequest.setSslConfiguration(SecureStorage::getInstance().getTlsConfig(tlsSuite).getConfiguration()); + auto cfg = SecureStorage::getInstance().getTlsConfig(tlsSuite).getConfiguration(); + cfg.setSessionTicket(pSslSession); + pRequest.setSslConfiguration(cfg); response = mNetAccessManager->post(pRequest, pData); trackConnection(response, pTimeoutInMilliSeconds); @@ -85,7 +92,9 @@ QNetworkReply* NetworkManager::paos(QNetworkRequest& pRequest, const QByteArray& } -QNetworkReply* NetworkManager::get(QNetworkRequest& pRequest, int pTimeoutInMilliSeconds) +QNetworkReply* NetworkManager::get(QNetworkRequest& pRequest, + const QByteArray& pSslSession, + int pTimeoutInMilliSeconds) { if (mApplicationExitInProgress) { @@ -93,7 +102,9 @@ QNetworkReply* NetworkManager::get(QNetworkRequest& pRequest, int pTimeoutInMill } pRequest.setHeader(QNetworkRequest::UserAgentHeader, getUserAgentHeader()); - pRequest.setSslConfiguration(SecureStorage::getInstance().getTlsConfig().getConfiguration()); + auto cfg = SecureStorage::getInstance().getTlsConfig().getConfiguration(); + cfg.setSessionTicket(pSslSession); + pRequest.setSslConfiguration(cfg); QNetworkReply* response = mNetAccessManager->get(pRequest); trackConnection(response, pTimeoutInMilliSeconds); return response; diff --git a/src/network/NetworkManager.h b/src/network/NetworkManager.h index 36324d29b..36c5ee2a7 100644 --- a/src/network/NetworkManager.h +++ b/src/network/NetworkManager.h @@ -1,7 +1,7 @@ /* * \brief Wrapper around QNetworkAccessManager * - * \copyright Copyright (c) 2014-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2014-2018 Governikus GmbH & Co. KG, Germany */ #pragma once @@ -66,8 +66,15 @@ class NetworkManager static QString getTlsVersionString(QSsl::SslProtocol pProtocol); virtual void clearConnections(); - virtual QNetworkReply* paos(QNetworkRequest& pRequest, const QByteArray& pNamespace, const QByteArray& pData, bool pUsePsk = true, int pTimeoutInMilliSeconds = 30000); - virtual QNetworkReply* get(QNetworkRequest& pRequest, int pTimeoutInMilliSeconds = 30000); + virtual QNetworkReply* paos(QNetworkRequest& pRequest, + const QByteArray& pNamespace, + const QByteArray& pData, + bool pUsePsk = true, + const QByteArray& pSslSession = QByteArray(), + int pTimeoutInMilliSeconds = 30000); + virtual QNetworkReply* get(QNetworkRequest& pRequest, + const QByteArray& pSslSession = QByteArray(), + int pTimeoutInMilliSeconds = 30000); virtual bool checkUpdateServerCertificate(const QNetworkReply& pReply); diff --git a/src/network/NetworkReplyError.cpp b/src/network/NetworkReplyError.cpp index 45853a3ba..97bc4558d 100644 --- a/src/network/NetworkReplyError.cpp +++ b/src/network/NetworkReplyError.cpp @@ -1,5 +1,5 @@ /* - * \copyright Copyright (c) 2016-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2016-2018 Governikus GmbH & Co. KG, Germany */ #include "NetworkReplyError.h" diff --git a/src/network/NetworkReplyError.h b/src/network/NetworkReplyError.h index 0d08d0c16..07e5f9ada 100644 --- a/src/network/NetworkReplyError.h +++ b/src/network/NetworkReplyError.h @@ -1,5 +1,5 @@ /* - * \copyright Copyright (c) 2016-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2016-2018 Governikus GmbH & Co. KG, Germany */ #pragma once diff --git a/src/network/NetworkReplyTimeout.cpp b/src/network/NetworkReplyTimeout.cpp index cc016f5c3..611a32146 100644 --- a/src/network/NetworkReplyTimeout.cpp +++ b/src/network/NetworkReplyTimeout.cpp @@ -1,5 +1,5 @@ /*! - * \copyright Copyright (c) 2014-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2014-2018 Governikus GmbH & Co. KG, Germany */ #include "NetworkReplyTimeout.h" diff --git a/src/network/NetworkReplyTimeout.h b/src/network/NetworkReplyTimeout.h index 121924c4f..31f44a608 100644 --- a/src/network/NetworkReplyTimeout.h +++ b/src/network/NetworkReplyTimeout.h @@ -1,7 +1,7 @@ /*! * \brief Utility class to set a timeout on a QNetworkReply * - * \copyright Copyright (c) 2014-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2014-2018 Governikus GmbH & Co. KG, Germany */ #pragma once diff --git a/src/network/TlsChecker.cpp b/src/network/TlsChecker.cpp index b54320699..bfe508424 100644 --- a/src/network/TlsChecker.cpp +++ b/src/network/TlsChecker.cpp @@ -1,5 +1,5 @@ /*! - * \copyright Copyright (c) 2014-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2014-2018 Governikus GmbH & Co. KG, Germany */ #include "TlsChecker.h" @@ -8,6 +8,7 @@ #include "Env.h" #include "SecureStorage.h" +#include #include #include @@ -187,16 +188,24 @@ QStringList TlsChecker::getFatalErrors(const QList& pErrors) QStringList fatalErrorStrings; for (const auto& error : pErrors) { - QString msg = QStringLiteral("%1: %2").arg(static_cast(error.error())).arg(error.errorString()); + const auto& msg = error.errorString(); if (fatalErrors.contains(error.error())) { if (AppSettings::getInstance().getGeneralSettings().isDeveloperMode()) { qCWarning(developermode) << msg; + if (!error.certificate().isNull()) + { + qCWarning(developermode) << error.certificate(); + } } else { qCWarning(network) << msg; + if (!error.certificate().isNull()) + { + qCWarning(network) << error.certificate(); + } fatalErrorStrings += msg; } } @@ -241,5 +250,13 @@ void TlsChecker::logSslConfig(const QSslConfiguration pCfg, QDebug pDebug) logger.info(network) << "Used peer certificate:" << pCfg.peerCertificate(); + auto session = pCfg.sessionTicket(); + if (!session.isEmpty()) + { + // do not print session ticket as plain text + session = QCryptographicHash::hash(session, QCryptographicHash::Sha256).toHex(); + } + logger.info(network) << "Used ssl session:" << session; + pDebug << "Handshake of tls connection done!"; } diff --git a/src/network/TlsChecker.h b/src/network/TlsChecker.h index 6f5a576a1..e43ad8ccd 100644 --- a/src/network/TlsChecker.h +++ b/src/network/TlsChecker.h @@ -1,7 +1,7 @@ /*! * \brief Helper to check certificates and other security stuff of TLS/SSL. * - * \copyright Copyright (c) 2014-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2014-2018 Governikus GmbH & Co. KG, Germany */ #pragma once diff --git a/src/network/UrlUtil.cpp b/src/network/UrlUtil.cpp index 2a95945ee..b0e437ff6 100644 --- a/src/network/UrlUtil.cpp +++ b/src/network/UrlUtil.cpp @@ -1,5 +1,5 @@ /*! - * \copyright Copyright (c) 2014-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2014-2018 Governikus GmbH & Co. KG, Germany */ diff --git a/src/network/UrlUtil.h b/src/network/UrlUtil.h index cb12e52a2..bb6c712c4 100644 --- a/src/network/UrlUtil.h +++ b/src/network/UrlUtil.h @@ -1,6 +1,6 @@ /*! * \brief Helper to convert \ref Result to Redirect-Result-String and some other URL stuff. - * \copyright Copyright (c) 2014-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2014-2018 Governikus GmbH & Co. KG, Germany */ #pragma once diff --git a/src/network/WifiInfo.cpp b/src/network/WifiInfo.cpp index a68980d1e..e0c0eae60 100644 --- a/src/network/WifiInfo.cpp +++ b/src/network/WifiInfo.cpp @@ -1,95 +1,40 @@ /*! - * \copyright Copyright (c) 2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2017-2018 Governikus GmbH & Co. KG, Germany */ #include "WifiInfo.h" -#include -#include -#if defined(Q_OS_ANDROID) - #include - #include - #include -#endif - -Q_DECLARE_LOGGING_CATEGORY(qml) +#include using namespace governikus; -WifiInfo::WifiInfo() - : QObject() - , mWifiEnabled(getCurrentWifiEnabled()) - , mWifiEnabledTimerId(0) -{ -#if defined(Q_OS_ANDROID) - const int timeoutMs = 1000; - mWifiEnabledTimerId = startTimer(timeoutMs); -#endif -} - - -WifiInfo::~WifiInfo() -{ - -} - - -bool WifiInfo::getCurrentWifiEnabled() +bool WifiInfo::isPrivateIp(const QHostAddress& pAddress) { -#if !defined(Q_OS_ANDROID) - return true; - -#else - QAndroidJniEnvironment env; - const QAndroidJniObject context(QtAndroid::androidContext()); - if (!context.isValid()) - { - qCCritical(qml) << "Cannot determine android context."; - return false; - } - - const jboolean jEnabled = QAndroidJniObject::callStaticMethod("com/governikus/ausweisapp2/WifiInfo", - "wifiEnabled", - "(Landroid/content/Context;)Z", - context.object()); - - if (env->ExceptionCheck()) - { - qCCritical(qml) << "Cannot call WifiInfo.wifiEnabled()"; - env->ExceptionDescribe(); - env->ExceptionClear(); - return false; - } - - return jEnabled == JNI_TRUE; - -#endif + return !pAddress.isNull() && + ( + pAddress.isInSubnet(QHostAddress::parseSubnet(QStringLiteral("10.0.0.0/8"))) || + pAddress.isInSubnet(QHostAddress::parseSubnet(QStringLiteral("172.16.0.0/12"))) || + pAddress.isInSubnet(QHostAddress::parseSubnet(QStringLiteral("192.168.0.0/16"))) + ); } -void WifiInfo::timerEvent(QTimerEvent* pEvent) +bool WifiInfo::hasPrivateIpAddress() const { - if (pEvent->timerId() == mWifiEnabledTimerId) + const auto& interfaces = QNetworkInterface::allInterfaces(); + for (const QNetworkInterface& interface : interfaces) { - const bool currentEnabled = getCurrentWifiEnabled(); - if (mWifiEnabled != currentEnabled) + const auto& entries = interface.addressEntries(); + for (const QNetworkAddressEntry& addressEntry : entries) { - mWifiEnabled = currentEnabled; - Q_EMIT fireWifiEnabledChanged(mWifiEnabled); + if (isPrivateIp(addressEntry.ip())) + { + return true; + } } } - QObject::timerEvent(pEvent); -} - - -bool WifiInfo::isWifiEnabled() -{ -#if !defined(Q_OS_ANDROID) - qCWarning(qml) << "NOT IMPLEMENTED"; -#endif - - return mWifiEnabled; + return false; } diff --git a/src/network/WifiInfo.h b/src/network/WifiInfo.h index 5e91d676d..a535c915a 100644 --- a/src/network/WifiInfo.h +++ b/src/network/WifiInfo.h @@ -1,14 +1,17 @@ /*! * \brief Provides information about the Wifi status * - * \copyright Copyright (c) 2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2017-2018 Governikus GmbH & Co. KG, Germany */ #pragma once +#include #include +class test_WifiInfo; + namespace governikus { @@ -18,19 +21,25 @@ class WifiInfo Q_OBJECT private: + friend class ::test_WifiInfo; bool mWifiEnabled; - int mWifiEnabledTimerId; + int mWifiCheckTimerId; + int mWifiEnableWaitCounter; + static bool isPrivateIp(const QHostAddress& pAddress); bool getCurrentWifiEnabled(); + bool shouldWifiEnabledBeCalled(); + bool hasPrivateIpAddress() const; protected: void timerEvent(QTimerEvent* pEvent) override; public: WifiInfo(); - virtual ~WifiInfo() override; + virtual ~WifiInfo() override = default; bool isWifiEnabled(); + void enableWifi(); Q_SIGNALS: void fireWifiEnabledChanged(bool pEnabled); diff --git a/src/network/WifiInfo.java b/src/network/WifiInfo.java index 0f7c47e84..5cfcbaf38 100644 --- a/src/network/WifiInfo.java +++ b/src/network/WifiInfo.java @@ -1,46 +1,43 @@ /* - * \copyright Copyright (c) 2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2017-2018 Governikus GmbH & Co. KG, Germany */ package com.governikus.ausweisapp2; import android.content.Context; -import android.net.ConnectivityManager; -import android.net.Network; -import android.net.NetworkInfo; -import android.os.Build; -import android.util.Log; +import android.net.wifi.WifiManager; -public class WifiInfo +public final class WifiInfo { - private static final String TAG = "AusweisApp2"; + private WifiInfo() + { + } + - public static boolean wifiEnabled(Context context) + public static boolean wifiEnabled(Context pContext) { - ConnectivityManager connectivityManager = (ConnectivityManager) context.getSystemService(Context.CONNECTIVITY_SERVICE); + WifiManager wifi; + wifi = (WifiManager) pContext.getSystemService(Context.WIFI_SERVICE); - if (android.os.Build.VERSION.SDK_INT < 21) + switch (wifi.getWifiState()) { - for (NetworkInfo networkInfo : connectivityManager.getAllNetworkInfo()) - { - if (networkInfo.getType() == ConnectivityManager.TYPE_WIFI && networkInfo.getState().equals(NetworkInfo.State.CONNECTED)) - { - return true; - } - } - } - else - { - for (Network mNetwork : connectivityManager.getAllNetworks()) - { - NetworkInfo networkInfo = connectivityManager.getNetworkInfo(mNetwork); - if (networkInfo.getType() == ConnectivityManager.TYPE_WIFI && networkInfo.getState().equals(NetworkInfo.State.CONNECTED)) - { - return true; - } - } + case WifiManager.WIFI_STATE_ENABLED: + case WifiManager.WIFI_STATE_ENABLING: + return true; + + default: + return false; } - return false; + } + + + public static boolean enableWifi(Context pContext) + { + WifiManager wifi; + wifi = (WifiManager) pContext.getSystemService(Context.WIFI_SERVICE); + + wifi.setWifiEnabled(true); + return true; } diff --git a/src/network/WifiInfo_android.cpp b/src/network/WifiInfo_android.cpp new file mode 100644 index 000000000..c80ae2f7a --- /dev/null +++ b/src/network/WifiInfo_android.cpp @@ -0,0 +1,134 @@ +/*! + * \copyright Copyright (c) 2017-2018 Governikus GmbH & Co. KG, Germany + */ + +#include "WifiInfo.h" + +#include +#include +#include +#include +#include +#include + +Q_DECLARE_LOGGING_CATEGORY(qml) + + +using namespace governikus; + + +WifiInfo::WifiInfo() + : QObject() + , mWifiEnabled(getCurrentWifiEnabled()) + , mWifiEnableWaitCounter(0) +{ + const int timeoutMs = 1000; + mWifiCheckTimerId = startTimer(timeoutMs); +} + + +bool WifiInfo::getCurrentWifiEnabled() +{ + QAndroidJniEnvironment env; + const QAndroidJniObject context(QtAndroid::androidContext()); + if (!context.isValid()) + { + qCCritical(qml) << "Cannot determine android context."; + return false; + } + + const jboolean jEnabled = QAndroidJniObject::callStaticMethod("com/governikus/ausweisapp2/WifiInfo", + "wifiEnabled", + "(Landroid/content/Context;)Z", + context.object()); + + if (env->ExceptionCheck()) + { + qCCritical(qml) << "Cannot call WifiInfo.wifiEnabled()"; + env->ExceptionDescribe(); + env->ExceptionClear(); + return false; + } + + return jEnabled == JNI_TRUE; +} + + +void WifiInfo::enableWifi() +{ + if (mWifiEnabled) + { + return; + } + + QAndroidJniEnvironment env; + const QAndroidJniObject context(QtAndroid::androidContext()); + if (!context.isValid()) + { + qCCritical(qml) << "Cannot determine android context."; + return; + } + + const jboolean jSuccess = QAndroidJniObject::callStaticMethod("com/governikus/ausweisapp2/WifiInfo", + "enableWifi", + "(Landroid/content/Context;)Z", + context.object()); + + + qCDebug(qml) << "enableWifi() returned:" << (jSuccess == JNI_TRUE); + + if (env->ExceptionCheck()) + { + qCCritical(qml) << "Cannot call WifiInfo.enableWifi()"; + env->ExceptionDescribe(); + env->ExceptionClear(); + return; + } + + if (jSuccess == JNI_TRUE) + { + mWifiEnabled = true; + mWifiEnableWaitCounter = 3; + Q_EMIT fireWifiEnabledChanged(true); + } +} + + +void WifiInfo::timerEvent(QTimerEvent* pEvent) +{ + if (pEvent->timerId() == mWifiCheckTimerId) + { + if (shouldWifiEnabledBeCalled()) + { + const bool currentEnabled = getCurrentWifiEnabled() || hasPrivateIpAddress(); + if (mWifiEnabled != currentEnabled) + { + mWifiEnabled = currentEnabled; + Q_EMIT fireWifiEnabledChanged(mWifiEnabled); + } + } + } + + QObject::timerEvent(pEvent); +} + + +bool WifiInfo::shouldWifiEnabledBeCalled() +{ + if (mWifiEnableWaitCounter <= 0) + { + return true; + } + + --mWifiEnableWaitCounter; + return false; +} + + +bool WifiInfo::isWifiEnabled() +{ + return mWifiEnabled; +} + + +#include "moc_WifiInfo.cpp" diff --git a/src/network/WifiInfo_generic.cpp b/src/network/WifiInfo_generic.cpp new file mode 100644 index 000000000..c240bec33 --- /dev/null +++ b/src/network/WifiInfo_generic.cpp @@ -0,0 +1,52 @@ +/*! + * \copyright Copyright (c) 2017-2018 Governikus GmbH & Co. KG, Germany + */ + +#include "WifiInfo.h" + +#include +#include +#include + +Q_DECLARE_LOGGING_CATEGORY(qml) + + +using namespace governikus; + + +WifiInfo::WifiInfo() + : QObject() + , mWifiEnabled(getCurrentWifiEnabled()) + , mWifiCheckTimerId(0) + , mWifiEnableWaitCounter(0) +{ +} + + +bool WifiInfo::getCurrentWifiEnabled() +{ + return true; +} + + +void WifiInfo::enableWifi() +{ + qCWarning(qml) << "NOT IMPLEMENTED"; +} + + +void WifiInfo::timerEvent(QTimerEvent* pEvent) +{ + QObject::timerEvent(pEvent); +} + + +bool WifiInfo::isWifiEnabled() +{ + qCWarning(qml) << "NOT IMPLEMENTED"; + + return mWifiEnabled; +} + + +#include "moc_WifiInfo.cpp" diff --git a/src/network/WifiInfo_ios.mm b/src/network/WifiInfo_ios.mm new file mode 100644 index 000000000..79cc175a4 --- /dev/null +++ b/src/network/WifiInfo_ios.mm @@ -0,0 +1,87 @@ +/*! + * \copyright Copyright (c) 2018 Governikus GmbH & Co. KG, Germany + */ + +#include "WifiInfo.h" + +#include +#include + +#import +#import +#import + +Q_DECLARE_LOGGING_CATEGORY(qml) + + +using namespace governikus; + + +WifiInfo::WifiInfo() + : QObject() + , mWifiEnabled(getCurrentWifiEnabled()) + , mWifiEnableWaitCounter(0) +{ + const int timeoutMs = 1000; + mWifiCheckTimerId = startTimer(timeoutMs); +} + + +bool WifiInfo::getCurrentWifiEnabled() +{ + // https://stackoverflow.com/a/25963050 + Boolean networkInterfaceAvailable = false; + NSArray* interfaces = CFBridgingRelease(CNCopySupportedInterfaces()); + for (NSString* interface in interfaces) + { + NSDictionary* networkInfo = CFBridgingRelease(CNCopyCurrentNetworkInfo(reinterpret_cast(interface))); + if (networkInfo != nullptr) + { + networkInterfaceAvailable = true; + break; + } + } + return networkInterfaceAvailable; +} + + +void WifiInfo::enableWifi() +{ + NSArray* urlStrings = @[@"prefs:root=WIFI", @"App-Prefs:root=WIFI"]; + for (NSString* urlString in urlStrings) + { + NSURL* url = [NSURL URLWithString:urlString]; + if ([[UIApplication sharedApplication] canOpenURL:url]) + { + [[UIApplication sharedApplication] openURL:url options:@{} + completionHandler:nil]; + break; + } + } +} + + +void WifiInfo::timerEvent(QTimerEvent* pEvent) +{ + if (pEvent->timerId() == mWifiCheckTimerId) + { + pEvent->accept(); + const bool currentEnabled = getCurrentWifiEnabled(); + if (mWifiEnabled != currentEnabled) + { + mWifiEnabled = currentEnabled; + Q_EMIT fireWifiEnabledChanged(mWifiEnabled); + } + } + + QObject::timerEvent(pEvent); +} + + +bool WifiInfo::isWifiEnabled() +{ + return mWifiEnabled; +} + + +#include "moc_WifiInfo.cpp" diff --git a/src/qml/ApplicationModel.cpp b/src/qml/ApplicationModel.cpp index c55925d2d..ab942e49a 100644 --- a/src/qml/ApplicationModel.cpp +++ b/src/qml/ApplicationModel.cpp @@ -1,5 +1,5 @@ /*! - * \copyright Copyright (c) 2016-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2016-2018 Governikus GmbH & Co. KG, Germany */ #include "ApplicationModel.h" @@ -29,6 +29,7 @@ void ApplicationModel::onStatusChanged(const ReaderManagerPlugInInfo& pInfo) if (pInfo.getPlugInType() == ReaderManagerPlugInType::BLUETOOTH) { Q_EMIT fireBluetoothEnabledChanged(); + Q_EMIT fireBluetoothRespondingChanged(); } else if (pInfo.getPlugInType() == ReaderManagerPlugInType::NFC) { @@ -41,6 +42,7 @@ ApplicationModel::ApplicationModel(QObject* pParent) : QObject(pParent) , mContext() , mWifiInfo() + , mBluetoothResponding(true) { connect(&ReaderManager::getInstance(), &ReaderManager::fireReaderAdded, this, &ApplicationModel::fireBluetoothReaderChanged); connect(&ReaderManager::getInstance(), &ReaderManager::fireReaderRemoved, this, &ApplicationModel::fireBluetoothReaderChanged); @@ -121,6 +123,12 @@ bool ApplicationModel::isBluetoothAvailable() const } +bool ApplicationModel::isBluetoothResponding() const +{ + return getFirstPlugInInfo(ReaderManagerPlugInType::BLUETOOTH).isResponding(); +} + + bool ApplicationModel::isBluetoothEnabled() const { return getFirstPlugInInfo(ReaderManagerPlugInType::BLUETOOTH).isEnabled(); @@ -214,3 +222,9 @@ void ApplicationModel::onWifiEnabledChanged() mWifiEnabled = mWifiInfo.isWifiEnabled(); Q_EMIT fireWifiEnabledChanged(); } + + +Q_INVOKABLE void ApplicationModel::enableWifi() +{ + mWifiInfo.enableWifi(); +} diff --git a/src/qml/ApplicationModel.h b/src/qml/ApplicationModel.h index d375ae5e1..24f77ef96 100644 --- a/src/qml/ApplicationModel.h +++ b/src/qml/ApplicationModel.h @@ -1,7 +1,7 @@ /*! * \brief Model implementation for the application. * - * \copyright Copyright (c) 2016-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2016-2018 Governikus GmbH & Co. KG, Germany */ #pragma once @@ -29,6 +29,7 @@ class ApplicationModel Q_PROPERTY(bool nfcAvailable READ isNfcAvailable CONSTANT) Q_PROPERTY(bool bluetoothEnabled READ isBluetoothEnabled WRITE setBluetoothEnabled NOTIFY fireBluetoothEnabledChanged) + Q_PROPERTY(bool bluetoothResponding READ isBluetoothResponding NOTIFY fireBluetoothRespondingChanged) Q_PROPERTY(bool bluetoothAvailable READ isBluetoothAvailable CONSTANT) Q_PROPERTY(bool locationPermissionRequired READ locationPermissionRequired NOTIFY fireBluetoothReaderChanged) @@ -45,6 +46,7 @@ class ApplicationModel private: WifiInfo mWifiInfo; bool mWifiEnabled; + bool mBluetoothResponding; private Q_SLOTS: void onWifiEnabledChanged(); @@ -58,6 +60,7 @@ class ApplicationModel bool isNfcEnabled() const; bool isBluetoothAvailable() const; + bool isBluetoothResponding() const; bool isBluetoothEnabled() const; void setBluetoothEnabled(bool pEnabled); bool locationPermissionRequired() const; @@ -65,10 +68,13 @@ class ApplicationModel QString getCurrentWorkflow() const; bool foundSelectedReader() const; + Q_INVOKABLE void enableWifi(); + Q_SIGNALS: void fireNfcEnabledChanged(); void fireBluetoothEnabledChanged(); + void fireBluetoothRespondingChanged(); void fireBluetoothReaderChanged(); void fireCurrentWorkflowChanged(); diff --git a/src/qml/AuthModel.cpp b/src/qml/AuthModel.cpp index 262c4cb44..46418e3f1 100644 --- a/src/qml/AuthModel.cpp +++ b/src/qml/AuthModel.cpp @@ -1,5 +1,5 @@ /*! - * \copyright Copyright (c) 2015-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2015-2018 Governikus GmbH & Co. KG, Germany */ #include "AuthModel.h" diff --git a/src/qml/AuthModel.h b/src/qml/AuthModel.h index 674cb2691..0ef479c04 100644 --- a/src/qml/AuthModel.h +++ b/src/qml/AuthModel.h @@ -1,7 +1,7 @@ /*! * \brief Model implementation for the authentication action. * - * \copyright Copyright (c) 2015-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2015-2018 Governikus GmbH & Co. KG, Germany */ #pragma once diff --git a/src/qml/CertificateDescriptionModel.cpp b/src/qml/CertificateDescriptionModel.cpp index 1b82b6e1f..0d08a56af 100644 --- a/src/qml/CertificateDescriptionModel.cpp +++ b/src/qml/CertificateDescriptionModel.cpp @@ -1,5 +1,5 @@ /*! - * \copyright Copyright (c) 2016-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2016-2018 Governikus GmbH & Co. KG, Germany */ #include "asn1/CertificateDescription.h" @@ -21,12 +21,7 @@ QSharedPointer CertificateDescriptionModel::getCer return mContext->getDidAuthenticateEac1()->getCertificateDescription(); } - const bool useTestUri = Env::getSingleton()->getGeneralSettings().useSelfAuthTestUri(); - const auto& rawCertDescr = SecureStorage::getInstance().getSelfAuthenticationCertDescr(useTestUri); - QSharedPointer selfAuthCertificateDescription(CertificateDescription::fromHex(rawCertDescr)); - Q_ASSERT(selfAuthCertificateDescription); - - return selfAuthCertificateDescription; + return QSharedPointer(); } diff --git a/src/qml/CertificateDescriptionModel.h b/src/qml/CertificateDescriptionModel.h index 1417c948f..0becc1c18 100644 --- a/src/qml/CertificateDescriptionModel.h +++ b/src/qml/CertificateDescriptionModel.h @@ -1,7 +1,7 @@ /*! * \brief Model implementation for the CV certificate description. * - * \copyright Copyright (c) 2016-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2016-2018 Governikus GmbH & Co. KG, Germany */ #pragma once diff --git a/src/qml/ChangePinModel.cpp b/src/qml/ChangePinModel.cpp index 75371087e..eb499e1f0 100644 --- a/src/qml/ChangePinModel.cpp +++ b/src/qml/ChangePinModel.cpp @@ -1,5 +1,5 @@ /*! - * \copyright Copyright (c) 2015-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2015-2018 Governikus GmbH & Co. KG, Germany */ #include "ChangePinModel.h" diff --git a/src/qml/ChangePinModel.h b/src/qml/ChangePinModel.h index fd4c920c1..fd04b8240 100644 --- a/src/qml/ChangePinModel.h +++ b/src/qml/ChangePinModel.h @@ -1,7 +1,7 @@ /*! * \brief Model implementation for the PIN action. * - * \copyright Copyright (c) 2015-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2015-2018 Governikus GmbH & Co. KG, Germany */ #pragma once diff --git a/src/qml/ChatModel.cpp b/src/qml/ChatModel.cpp index cc2f02b31..b315db627 100644 --- a/src/qml/ChatModel.cpp +++ b/src/qml/ChatModel.cpp @@ -1,7 +1,7 @@ /*! * \brief Model implementation for the chat. * - * \copyright Copyright (c) 2015-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2015-2018 Governikus GmbH & Co. KG, Germany */ #include "ChatModel.h" diff --git a/src/qml/ChatModel.h b/src/qml/ChatModel.h index 69ee2d234..2eb738341 100644 --- a/src/qml/ChatModel.h +++ b/src/qml/ChatModel.h @@ -1,7 +1,7 @@ /*! * \brief Model implementation for the chat. * - * \copyright Copyright (c) 2015-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2015-2018 Governikus GmbH & Co. KG, Germany */ #pragma once diff --git a/src/qml/ConnectivityManager.cpp b/src/qml/ConnectivityManager.cpp index 3b89529f4..330a4a6df 100644 --- a/src/qml/ConnectivityManager.cpp +++ b/src/qml/ConnectivityManager.cpp @@ -1,5 +1,5 @@ /*! - * \copyright Copyright (c) 2016-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2016-2018 Governikus GmbH & Co. KG, Germany */ #include "ConnectivityManager.h" diff --git a/src/qml/ConnectivityManager.h b/src/qml/ConnectivityManager.h index c249db396..2986ab7b1 100644 --- a/src/qml/ConnectivityManager.h +++ b/src/qml/ConnectivityManager.h @@ -1,7 +1,7 @@ /*! * \brief Utility class providing information about network connectivity status. * - * \copyright Copyright (c) 2016-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2016-2018 Governikus GmbH & Co. KG, Germany */ #pragma once diff --git a/src/qml/DpiCalculator.h b/src/qml/DpiCalculator.h index e9fad39f0..710a11252 100644 --- a/src/qml/DpiCalculator.h +++ b/src/qml/DpiCalculator.h @@ -1,5 +1,5 @@ /*! - * \copyright Copyright (c) 2015-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2015-2018 Governikus GmbH & Co. KG, Germany */ #pragma once diff --git a/src/qml/DpiCalculator_generic.cpp b/src/qml/DpiCalculator_generic.cpp index 36505a4f6..a9140d976 100644 --- a/src/qml/DpiCalculator_generic.cpp +++ b/src/qml/DpiCalculator_generic.cpp @@ -1,5 +1,5 @@ /* - * \copyright Copyright (c) 2015-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2015-2018 Governikus GmbH & Co. KG, Germany */ #include "DpiCalculator.h" diff --git a/src/qml/DpiCalculator_ios.mm b/src/qml/DpiCalculator_ios.mm index f59da6638..1018af920 100644 --- a/src/qml/DpiCalculator_ios.mm +++ b/src/qml/DpiCalculator_ios.mm @@ -1,3 +1,7 @@ +/*! + * \copyright Copyright (c) 2015-2018 Governikus GmbH & Co. KG, Germany + */ + #include "DpiCalculator.h" #include diff --git a/src/qml/HistoryModel.cpp b/src/qml/HistoryModel.cpp index 819ba0eee..a2a8fb3d7 100644 --- a/src/qml/HistoryModel.cpp +++ b/src/qml/HistoryModel.cpp @@ -1,7 +1,7 @@ /*! * \brief Model implementation for the history entries. * - * \copyright Copyright (c) 2015-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2015-2018 Governikus GmbH & Co. KG, Germany */ #include "HistoryModel.h" diff --git a/src/qml/HistoryModel.h b/src/qml/HistoryModel.h index 7e08c75ef..dc75f9837 100644 --- a/src/qml/HistoryModel.h +++ b/src/qml/HistoryModel.h @@ -1,7 +1,7 @@ /*! * \brief Model implementation for the history entries. * - * \copyright Copyright (c) 2015-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2015-2018 Governikus GmbH & Co. KG, Germany */ #pragma once diff --git a/src/qml/HistoryModelSearchFilter.cpp b/src/qml/HistoryModelSearchFilter.cpp index 2df4085b0..d46560df5 100644 --- a/src/qml/HistoryModelSearchFilter.cpp +++ b/src/qml/HistoryModelSearchFilter.cpp @@ -1,5 +1,5 @@ /*! - * \copyright Copyright (c) 2016-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2016-2018 Governikus GmbH & Co. KG, Germany */ #include "HistoryModelSearchFilter.h" diff --git a/src/qml/HistoryModelSearchFilter.h b/src/qml/HistoryModelSearchFilter.h index 8b6ef8c94..dd04dcbc6 100644 --- a/src/qml/HistoryModelSearchFilter.h +++ b/src/qml/HistoryModelSearchFilter.h @@ -1,7 +1,7 @@ /*! * \brief A filter to search the history model * - * \copyright Copyright (c) 2016-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2016-2018 Governikus GmbH & Co. KG, Germany */ #pragma once diff --git a/src/qml/NumberModel.cpp b/src/qml/NumberModel.cpp index 5a1997471..6bd54cbe8 100644 --- a/src/qml/NumberModel.cpp +++ b/src/qml/NumberModel.cpp @@ -1,10 +1,11 @@ /*! - * \copyright Copyright (c) 2016-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2016-2018 Governikus GmbH & Co. KG, Germany */ #include "NumberModel.h" #include "context/ChangePinContext.h" +#include "context/RemoteServiceContext.h" #include "context/WorkflowContext.h" #include "ReaderManager.h" @@ -111,6 +112,12 @@ void NumberModel::setNewPin(const QString& pNewPin) { changePinContext->setNewPin(pNewPin); } + + const auto remoteServiceContext = mContext.objectCast(); + if (remoteServiceContext) + { + remoteServiceContext->setNewPin(pNewPin); + } } diff --git a/src/qml/NumberModel.h b/src/qml/NumberModel.h index 675326c8d..8cb9d7836 100644 --- a/src/qml/NumberModel.h +++ b/src/qml/NumberModel.h @@ -2,7 +2,7 @@ * \brief Model for accessing PIN, CAN, PUK, according to the * currently active workflow. * - * \copyright Copyright (c) 2016-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2016-2018 Governikus GmbH & Co. KG, Germany */ #pragma once diff --git a/src/qml/ProviderCategoryFilterModel.cpp b/src/qml/ProviderCategoryFilterModel.cpp index 9750571c2..27491f7a3 100644 --- a/src/qml/ProviderCategoryFilterModel.cpp +++ b/src/qml/ProviderCategoryFilterModel.cpp @@ -1,5 +1,5 @@ /*! - * \copyright Copyright (c) 2015-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2015-2018 Governikus GmbH & Co. KG, Germany */ #include "ProviderCategoryFilterModel.h" diff --git a/src/qml/ProviderCategoryFilterModel.h b/src/qml/ProviderCategoryFilterModel.h index 7b12d4a43..6d996ac49 100644 --- a/src/qml/ProviderCategoryFilterModel.h +++ b/src/qml/ProviderCategoryFilterModel.h @@ -1,7 +1,7 @@ /*! * \brief Model implementation for the providers. * - * \copyright Copyright (c) 2015-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2015-2018 Governikus GmbH & Co. KG, Germany */ #pragma once diff --git a/src/qml/ProviderModel.cpp b/src/qml/ProviderModel.cpp index 192357ac5..607c2ed77 100644 --- a/src/qml/ProviderModel.cpp +++ b/src/qml/ProviderModel.cpp @@ -1,5 +1,5 @@ /*! - * \copyright Copyright (c) 2015-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2015-2018 Governikus GmbH & Co. KG, Germany */ #include "ProviderModel.h" diff --git a/src/qml/ProviderModel.h b/src/qml/ProviderModel.h index a30d89f7f..e4d864fac 100644 --- a/src/qml/ProviderModel.h +++ b/src/qml/ProviderModel.h @@ -1,7 +1,7 @@ /*! * \brief Model implementation for the providers. * - * \copyright Copyright (c) 2015-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2015-2018 Governikus GmbH & Co. KG, Germany */ #pragma once diff --git a/src/qml/QmlExtension.h b/src/qml/QmlExtension.h index 143aef809..0bba89aab 100644 --- a/src/qml/QmlExtension.h +++ b/src/qml/QmlExtension.h @@ -1,7 +1,7 @@ /*! * \brief Utility for sharing text. * - * \copyright Copyright (c) 2016-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2016-2018 Governikus GmbH & Co. KG, Germany */ #pragma once diff --git a/src/qml/QmlExtension_android.cpp b/src/qml/QmlExtension_android.cpp index 1dcf4badb..06d441f7a 100644 --- a/src/qml/QmlExtension_android.cpp +++ b/src/qml/QmlExtension_android.cpp @@ -1,5 +1,5 @@ /*! - * \copyright Copyright (c) 2016-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2016-2018 Governikus GmbH & Co. KG, Germany */ #include "QmlExtension.h" diff --git a/src/qml/QmlExtension_generic.cpp b/src/qml/QmlExtension_generic.cpp index 149bd01f7..c593f2a4d 100644 --- a/src/qml/QmlExtension_generic.cpp +++ b/src/qml/QmlExtension_generic.cpp @@ -1,5 +1,5 @@ /*! - * \copyright Copyright (c) 2016-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2016-2018 Governikus GmbH & Co. KG, Germany */ #include "QmlExtension.h" diff --git a/src/qml/QmlExtension_ios.mm b/src/qml/QmlExtension_ios.mm index f34833d22..2db9b0c0c 100644 --- a/src/qml/QmlExtension_ios.mm +++ b/src/qml/QmlExtension_ios.mm @@ -1,5 +1,5 @@ /*! - * \copyright Copyright (c) 2016 Governikus GmbH & Co. KG + * \copyright Copyright (c) 2016-2018 Governikus GmbH & Co. KG, Germany */ #include "QmlExtension.h" diff --git a/src/qml/RemoteServiceModel.cpp b/src/qml/RemoteServiceModel.cpp index 18f5ac354..e6e2cc16d 100644 --- a/src/qml/RemoteServiceModel.cpp +++ b/src/qml/RemoteServiceModel.cpp @@ -1,5 +1,5 @@ /*! - * \copyright Copyright (c) 2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2017-2018 Governikus GmbH & Co. KG, Germany */ #include "RemoteServiceModel.h" @@ -21,6 +21,8 @@ RemoteServiceModel::RemoteServiceModel() , mPsk() , mAvailableRemoteDevices(this, false, true) , mKnownDevices(this, true, false) + , mConnectedClientDeviceName() + , mConnectedServerDeviceNames() { connect(&ReaderManager::getInstance(), &ReaderManager::firePluginAdded, this, &RemoteServiceModel::onEnvironmentChanged); connect(&ReaderManager::getInstance(), &ReaderManager::fireStatusChanged, this, &RemoteServiceModel::onEnvironmentChanged); @@ -30,7 +32,8 @@ RemoteServiceModel::RemoteServiceModel() const QSharedPointer& remoteClient = ReaderManager::getInstance().getRemoteClient(); connect(remoteClient.data(), &RemoteClient::fireDetectionChanged, this, &RemoteServiceModel::fireDetectionChanged); - + connect(remoteClient.data(), &RemoteClient::fireNewRemoteDispatcher, this, &RemoteServiceModel::onConnectedDevicesChanged); + connect(remoteClient.data(), &RemoteClient::fireDispatcherDestroyed, this, &RemoteServiceModel::onConnectedDevicesChanged); onEnvironmentChanged(); } @@ -172,6 +175,7 @@ void RemoteServiceModel::connectToServer(const QString& pDeviceId, const QString { const QSharedPointer& remoteClient = Env::getSingleton()->getRemoteClient(); connect(remoteClient.data(), &RemoteClient::fireEstablishConnectionDone, this, &RemoteServiceModel::onEstablishConnectionDone); + remoteClient->establishConnection(mAvailableRemoteDevices.getRemoteDeviceListEntry(pDeviceId), pServerPsk); } } @@ -189,6 +193,16 @@ void RemoteServiceModel::onEstablishConnectionDone(const QSharedPointer()->getRemoteServiceSettings(); + const QString peerName = settings.getRemoteInfo(getCurrentFingerprint()).getName(); + mConnectedClientDeviceName = peerName; + Q_EMIT fireConnectedClientDeviceNameChanged(); + Q_EMIT fireConnectedChanged(pConnected); +} + + void RemoteServiceModel::resetContext(const QSharedPointer& pContext) { mPsk.clear(); @@ -202,7 +216,7 @@ void RemoteServiceModel::resetContext(const QSharedPointer mPsk = pPsk; }); connect(mContext->getRemoteServer().data(), &RemoteServer::firePskChanged, this, &RemoteServiceModel::firePskChanged); - connect(mContext->getRemoteServer().data(), &RemoteServer::fireConnectedChanged, this, &RemoteServiceModel::fireConnectedChanged); + connect(mContext->getRemoteServer().data(), &RemoteServer::fireConnectedChanged, this, &RemoteServiceModel::onClientConnectedChanged); } Q_EMIT fireConnectedChanged(isConnected()); @@ -306,6 +320,20 @@ void RemoteServiceModel::cancelPasswordRequest() { if (mContext) { - Q_EMIT mContext->fireCancelEstablishPaceChannel(); + Q_EMIT mContext->fireCancelPasswordRequest(); + } +} + + +void RemoteServiceModel::onConnectedDevicesChanged() +{ + const QSharedPointer& remoteClient = Env::getSingleton()->getRemoteClient(); + const auto deviceInfos = remoteClient->getConnectedDeviceInfos(); + QStringList deviceNames; + for (const auto& info : deviceInfos) + { + deviceNames.append(QLatin1Char('"') + info.getName() + QLatin1Char('"')); } + mConnectedServerDeviceNames = deviceNames.join(QLatin1String(", ")); + Q_EMIT fireConnectedServerDeviceNamesChanged(); } diff --git a/src/qml/RemoteServiceModel.h b/src/qml/RemoteServiceModel.h index e0f43ce1c..e8a5e8bd0 100644 --- a/src/qml/RemoteServiceModel.h +++ b/src/qml/RemoteServiceModel.h @@ -1,7 +1,7 @@ /*! * \brief Model implementation for the remote service component * - * \copyright Copyright (c) 2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2017-2018 Governikus GmbH & Co. KG, Germany */ #pragma once @@ -30,6 +30,8 @@ class RemoteServiceModel Q_PROPERTY(QByteArray psk MEMBER mPsk NOTIFY firePskChanged) Q_PROPERTY(QString currentFingerprint READ getCurrentFingerprint NOTIFY fireConnectedChanged) Q_PROPERTY(bool connected READ isConnected NOTIFY fireConnectedChanged) + Q_PROPERTY(QString connectedClientDeviceName MEMBER mConnectedClientDeviceName NOTIFY fireConnectedClientDeviceNameChanged) + Q_PROPERTY(QString connectedServerDeviceNames MEMBER mConnectedServerDeviceNames NOTIFY fireConnectedServerDeviceNamesChanged) Q_PROPERTY(QString readerPlugInType READ getReaderPlugInType WRITE setReaderPlugInType NOTIFY fireReaderPlugInTypeChanged) Q_PROPERTY(RemoteDeviceModel * availableRemoteDevices READ getAvailableRemoteDevices CONSTANT) Q_PROPERTY(RemoteDeviceModel * knownDevices READ getKnownDevices CONSTANT) @@ -44,12 +46,16 @@ class RemoteServiceModel QByteArray mPsk; RemoteDeviceModel mAvailableRemoteDevices; RemoteDeviceModel mKnownDevices; + QString mConnectedClientDeviceName; + QString mConnectedServerDeviceNames; void onEnvironmentChanged(); QString getErrorMessage(bool pNfcPluginAvailable, bool pNfcPluginEnabled, bool pWifiEnabled) const; private Q_SLOTS: void onEstablishConnectionDone(const QSharedPointer& pEntry, const GlobalStatus& pStatus); + void onClientConnectedChanged(bool pConnected); + void onConnectedDevicesChanged(); public: RemoteServiceModel(); @@ -87,6 +93,8 @@ class RemoteServiceModel void fireServerPskChanged(); void fireDetectionChanged(); void firePairingFailed(); + void fireConnectedClientDeviceNameChanged(); + void fireConnectedServerDeviceNamesChanged(); }; diff --git a/src/qml/SelfAuthenticationModel.cpp b/src/qml/SelfAuthenticationModel.cpp index e71cf1f31..c58020a37 100644 --- a/src/qml/SelfAuthenticationModel.cpp +++ b/src/qml/SelfAuthenticationModel.cpp @@ -1,5 +1,5 @@ /*! - * \copyright Copyright (c) 2015-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2015-2018 Governikus GmbH & Co. KG, Germany */ #include "SelfAuthenticationModel.h" diff --git a/src/qml/SelfAuthenticationModel.h b/src/qml/SelfAuthenticationModel.h index b4af7e4df..5e26c6284 100644 --- a/src/qml/SelfAuthenticationModel.h +++ b/src/qml/SelfAuthenticationModel.h @@ -1,7 +1,7 @@ /*! * \brief Model implementation for the self authentication workflow. * - * \copyright Copyright (c) 2015-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2015-2018 Governikus GmbH & Co. KG, Germany */ #pragma once diff --git a/src/qml/SettingsModel.cpp b/src/qml/SettingsModel.cpp index 739241d6e..5945108b3 100644 --- a/src/qml/SettingsModel.cpp +++ b/src/qml/SettingsModel.cpp @@ -1,11 +1,12 @@ /*! - * \copyright Copyright (c) 2016-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2016-2018 Governikus GmbH & Co. KG, Germany */ #include "SettingsModel.h" #include "AppSettings.h" #include "Env.h" +#include "HistorySettings.h" #include "LanguageLoader.h" using namespace governikus; @@ -13,6 +14,8 @@ using namespace governikus; SettingsModel::SettingsModel() { + const HistorySettings& settings = Env::getSingleton()->getHistorySettings(); + connect(&settings, &HistorySettings::fireEnabledChanged, this, &SettingsModel::fireHistoryEnabledChanged); } @@ -114,3 +117,27 @@ void SettingsModel::setPinPadMode(bool pPinPadMode) settings.setPinPadMode(pPinPadMode); settings.save(); } + + +bool SettingsModel::isHistoryEnabled() const +{ + const HistorySettings& settings = Env::getSingleton()->getHistorySettings(); + return settings.isEnabled(); +} + + +void SettingsModel::setHistoryEnabled(bool pEnabled) +{ + HistorySettings& settings = Env::getSingleton()->getHistorySettings(); + settings.setEnabled(pEnabled); + settings.save(); +} + + +int SettingsModel::removeHistory(const QString& pPeriodToRemove) +{ + HistorySettings& settings = Env::getSingleton()->getHistorySettings(); + int removedItemCount = settings.deleteSettings(Enum::fromString(pPeriodToRemove, TimePeriod::UNKNOWN)); + settings.save(); + return removedItemCount; +} diff --git a/src/qml/SettingsModel.h b/src/qml/SettingsModel.h index 37366697e..50b48d95f 100644 --- a/src/qml/SettingsModel.h +++ b/src/qml/SettingsModel.h @@ -1,7 +1,7 @@ /*! * \brief Model implementation for the settings. * - * \copyright Copyright (c) 2016-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2016-2018 Governikus GmbH & Co. KG, Germany */ #pragma once @@ -21,6 +21,7 @@ class SettingsModel Q_PROPERTY(bool useSelfauthenticationTestUri READ useSelfauthenticationTestUri WRITE setUseSelfauthenticationTestUri NOTIFY fireUseSelfauthenticationTestUriChanged) Q_PROPERTY(bool pinPadMode READ getPinPadMode WRITE setPinPadMode NOTIFY firePinPadModeChanged) Q_PROPERTY(QString serverName READ getServerName WRITE setServerName NOTIFY fireDeviceNameChanged) + Q_PROPERTY(bool historyEnabled READ isHistoryEnabled WRITE setHistoryEnabled NOTIFY fireHistoryEnabledChanged) public: SettingsModel(); @@ -40,16 +41,21 @@ class SettingsModel void setServerName(const QString& name); Q_INVOKABLE void removeTrustedCertificate(const QString& pFingerprint); + Q_INVOKABLE int removeHistory(const QString& pPeriodToRemove); bool getPinPadMode() const; void setPinPadMode(bool pPinPadMode); + bool isHistoryEnabled() const; + void setHistoryEnabled(bool pEnabled); + Q_SIGNALS: void fireLanguageChanged(); void fireDeveloperModeChanged(); void fireUseSelfauthenticationTestUriChanged(); void fireDeviceNameChanged(); void firePinPadModeChanged(); + void fireHistoryEnabledChanged(); }; } /* namespace governikus */ diff --git a/src/qml/ShareUtil.java b/src/qml/ShareUtil.java index cbbb90759..6c70b3357 100644 --- a/src/qml/ShareUtil.java +++ b/src/qml/ShareUtil.java @@ -1,25 +1,25 @@ /* - * \copyright Copyright (c) 2016-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2016-2018 Governikus GmbH & Co. KG, Germany */ package com.governikus.ausweisapp2; +import java.io.File; + import android.app.Activity; -import android.content.*; -import android.Manifest; +import android.content.Context; +import android.content.Intent; import android.net.Uri; -import android.os.Environment; import android.util.Log; -import java.io.*; -import java.nio.channels.FileChannel; -import java.text.*; -import java.util.*; - -public class ShareUtil +public final class ShareUtil { - private static final String TAG = "AusweisApp2"; + private static final String LOG_TAG = AusweisApp2Service.LOG_TAG; + + private ShareUtil() + { + } public static void shareText(Context ctx, final String text, final String chooserTitle) @@ -36,8 +36,6 @@ public static void shareLog(Activity activity, final String email, final String { try { - File logFile = new File(logFilePath); - Intent shareData = new Intent(); shareData.setType("message/rfc822"); shareData.setAction(Intent.ACTION_SEND); @@ -49,7 +47,7 @@ public static void shareLog(Activity activity, final String email, final String } catch (Exception e) { - Log.e(TAG, "Error sharing log file", e); + Log.e(LOG_TAG, "Error sharing log file", e); } } diff --git a/src/qml/StatusBarUtil.cpp b/src/qml/StatusBarUtil.cpp index ad35609e8..f3952fbf8 100644 --- a/src/qml/StatusBarUtil.cpp +++ b/src/qml/StatusBarUtil.cpp @@ -1,7 +1,7 @@ /*! * \brief Utility for changing the color of the status bar. * - * \copyright Copyright (c) 2016-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2016-2018 Governikus GmbH & Co. KG, Germany */ #include "StatusBarUtil.h" diff --git a/src/qml/StatusBarUtil.h b/src/qml/StatusBarUtil.h index 0aa709d6f..4971d9014 100644 --- a/src/qml/StatusBarUtil.h +++ b/src/qml/StatusBarUtil.h @@ -1,7 +1,7 @@ /*! * \brief Utility for changing the color of the status bar. * - * \copyright Copyright (c) 2016-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2016-2018 Governikus GmbH & Co. KG, Germany */ #pragma once diff --git a/src/qml/UIPlugInQml.cpp b/src/qml/UIPlugInQml.cpp index d09db54fa..87f378308 100644 --- a/src/qml/UIPlugInQml.cpp +++ b/src/qml/UIPlugInQml.cpp @@ -1,5 +1,5 @@ /*! - * \copyright Copyright (c) 2015-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2015-2018 Governikus GmbH & Co. KG, Germany */ #include "UIPlugInQml.h" @@ -152,6 +152,10 @@ QString UIPlugInQml::getPlatformSelectors() const void UIPlugInQml::onWorkflowStarted(QSharedPointer pContext) { +#if defined(Q_OS_ANDROID) + mQmlExtension.keepScreenOn(true); +#endif + mApplicationModel.resetContext(pContext); mNumberModel.resetContext(pContext); @@ -182,6 +186,10 @@ void UIPlugInQml::onWorkflowStarted(QSharedPointer pContext) void UIPlugInQml::onWorkflowFinished(QSharedPointer pContext) { +#if defined(Q_OS_ANDROID) + mQmlExtension.keepScreenOn(false); +#endif + mApplicationModel.resetContext(); mNumberModel.resetContext(); diff --git a/src/qml/UIPlugInQml.h b/src/qml/UIPlugInQml.h index 4b0efd85a..88e7c0875 100644 --- a/src/qml/UIPlugInQml.h +++ b/src/qml/UIPlugInQml.h @@ -1,7 +1,7 @@ /*! * \brief UIPlugIn implementation of QML. * - * \copyright Copyright (c) 2015-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2015-2018 Governikus GmbH & Co. KG, Germany */ #pragma once diff --git a/src/qml/VersionInformationModel.cpp b/src/qml/VersionInformationModel.cpp index 8e99ce937..574b8cf75 100644 --- a/src/qml/VersionInformationModel.cpp +++ b/src/qml/VersionInformationModel.cpp @@ -1,7 +1,7 @@ /*! * \brief Model implementation for version information. * - * \copyright Copyright (c) 2016-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2016-2018 Governikus GmbH & Co. KG, Germany */ #include "VersionInformationModel.h" diff --git a/src/qml/VersionInformationModel.h b/src/qml/VersionInformationModel.h index 8abcc1885..f5544491b 100644 --- a/src/qml/VersionInformationModel.h +++ b/src/qml/VersionInformationModel.h @@ -1,5 +1,5 @@ /*! - * \copyright Copyright (c) 2016-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2016-2018 Governikus GmbH & Co. KG, Germany */ #pragma once diff --git a/src/qml/WorkflowModel.cpp b/src/qml/WorkflowModel.cpp index f25f163a3..4e0444dc5 100644 --- a/src/qml/WorkflowModel.cpp +++ b/src/qml/WorkflowModel.cpp @@ -1,10 +1,12 @@ /*! - * \copyright Copyright (c) 2015-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2015-2018 Governikus GmbH & Co. KG, Germany */ #include "WorkflowModel.h" +#include "AppSettings.h" #include "context/AuthContext.h" +#include "GeneralSettings.h" using namespace governikus; @@ -70,10 +72,21 @@ QString WorkflowModel::getReaderPlugInType() const void WorkflowModel::setReaderPlugInType(const QString& pReaderPlugInType) { - if (mContext) + setReaderPlugInType(Enum::fromString(pReaderPlugInType, ReaderManagerPlugInType::UNKNOWN)); +} + + +void WorkflowModel::setReaderPlugInType(const ReaderManagerPlugInType pReaderPlugInType) +{ + if (!mContext) { - mContext->setReaderPlugInTypes({Enum::fromString(pReaderPlugInType, ReaderManagerPlugInType::UNKNOWN)}); + return; } + mContext->setReaderPlugInTypes({pReaderPlugInType}); + + GeneralSettings& settings = AppSettings::getInstance().getGeneralSettings(); + settings.setLastReaderPluginType(getEnumName(pReaderPlugInType)); + settings.save(); } @@ -120,3 +133,25 @@ bool WorkflowModel::isBasicReader() return true; } + + +void WorkflowModel::setInitialPluginType() +{ + const GeneralSettings& settings = AppSettings::getInstance().getGeneralSettings(); + + const QString& lastReaderPluginTypeString = settings.getLastReaderPluginType(); + const auto& lastReaderPluginType = Enum::fromString(lastReaderPluginTypeString, ReaderManagerPlugInType::UNKNOWN); + + if (lastReaderPluginType == ReaderManagerPlugInType::UNKNOWN) + { +#if defined(Q_OS_ANDROID) + setReaderPlugInType(ReaderManagerPlugInType::NFC); +#elif defined(Q_OS_IOS) + setReaderPlugInType(ReaderManagerPlugInType::BLUETOOTH); +#else + setReaderPlugInType(ReaderManagerPlugInType::PCSC); +#endif + return; + } + setReaderPlugInType(lastReaderPluginType); +} diff --git a/src/qml/WorkflowModel.h b/src/qml/WorkflowModel.h index e6e4ad990..b7f45f149 100644 --- a/src/qml/WorkflowModel.h +++ b/src/qml/WorkflowModel.h @@ -1,11 +1,13 @@ /*! * \brief Model implementation for the authentication action. * - * \copyright Copyright (c) 2015-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2015-2018 Governikus GmbH & Co. KG, Germany */ #pragma once +#include "ReaderManagerPlugInInfo.h" + #include #include #include @@ -28,6 +30,8 @@ class WorkflowModel private: QSharedPointer mContext; + void setReaderPlugInType(const ReaderManagerPlugInType pReaderPlugInType); + public: WorkflowModel(QObject* pParent = nullptr); virtual ~WorkflowModel(); @@ -47,6 +51,7 @@ class WorkflowModel Q_INVOKABLE void cancelWorkflow(); Q_INVOKABLE void cancelWorkflowOnPinBlocked(); Q_INVOKABLE void continueWorkflow(); + Q_INVOKABLE void setInitialPluginType(); Q_SIGNALS: void fireStartWorkflow(); diff --git a/src/remote_device/DataChannel.cpp b/src/remote_device/DataChannel.cpp index 4428fe0c4..55c674180 100644 --- a/src/remote_device/DataChannel.cpp +++ b/src/remote_device/DataChannel.cpp @@ -1,5 +1,5 @@ /*! - * \copyright Copyright (c) 2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2017-2018 Governikus GmbH & Co. KG, Germany */ #include "DataChannel.h" diff --git a/src/remote_device/DataChannel.h b/src/remote_device/DataChannel.h index 1fbebd9b6..5a06563c9 100644 --- a/src/remote_device/DataChannel.h +++ b/src/remote_device/DataChannel.h @@ -2,7 +2,7 @@ * \brief Interface modelling a component that can send and receive data blocks in the form * of QByteArray objects. * - * \copyright Copyright (c) 2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2017-2018 Governikus GmbH & Co. KG, Germany */ #pragma once diff --git a/src/remote_device/RemoteClientImpl.cpp b/src/remote_device/RemoteClientImpl.cpp index 2c7d066cf..199dd6916 100644 --- a/src/remote_device/RemoteClientImpl.cpp +++ b/src/remote_device/RemoteClientImpl.cpp @@ -1,5 +1,5 @@ /*! - * \copyright Copyright (c) 2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2017-2018 Governikus GmbH & Co. KG, Germany */ #include "RemoteClientImpl.h" @@ -164,9 +164,9 @@ void RemoteClientImpl::onRemoteDispatcherError(const RemoteDeviceDescriptor& pRe if (pErrorCode == RemoteErrorCode::REMOTE_HOST_REFUSED_CONNECTION || pErrorCode == RemoteErrorCode::NO_SUPPORTED_API_LEVEL) { mErrorCounter[pRemoteDeviceDescriptor.getIfdId()] += 1; - if (mErrorCounter[pRemoteDeviceDescriptor.getIfdId()] >= 3) + if (mErrorCounter[pRemoteDeviceDescriptor.getIfdId()] >= 7) { - qCCritical(remote_device) << "Remote device refused connection three times, removing certificate with fingerprint:" << pRemoteDeviceDescriptor.getIfdId(); + qCCritical(remote_device) << "Remote device refused connection seven times, removing certificate with fingerprint:" << pRemoteDeviceDescriptor.getIfdId(); RemoteServiceSettings& settings = AppSettings::getInstance().getRemoteServiceSettings(); QString deviceName; const auto& infos = settings.getRemoteInfos(); diff --git a/src/remote_device/RemoteClientImpl.h b/src/remote_device/RemoteClientImpl.h index cd8bd198b..ab1ee3d17 100644 --- a/src/remote_device/RemoteClientImpl.h +++ b/src/remote_device/RemoteClientImpl.h @@ -1,7 +1,7 @@ /*! * \brief Send RemoteReaderDiscoverCmds and maintain a list of responsive peers. * - * \copyright Copyright (c) 2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2017-2018 Governikus GmbH & Co. KG, Germany */ #pragma once diff --git a/src/remote_device/RemoteConnector.cpp b/src/remote_device/RemoteConnector.cpp index 9a64f2d52..c8b602e2a 100644 --- a/src/remote_device/RemoteConnector.cpp +++ b/src/remote_device/RemoteConnector.cpp @@ -1,5 +1,5 @@ /*! - * \copyright Copyright (c) 2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2017-2018 Governikus GmbH & Co. KG, Germany */ #include "RemoteConnector.h" diff --git a/src/remote_device/RemoteConnector.h b/src/remote_device/RemoteConnector.h index 56ff00a7a..1e952ee3b 100644 --- a/src/remote_device/RemoteConnector.h +++ b/src/remote_device/RemoteConnector.h @@ -1,7 +1,7 @@ /*! * \brief Module that creates and manages connections from a remote client to a remote server. * - * \copyright Copyright (c) 2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2017-2018 Governikus GmbH & Co. KG, Germany */ #pragma once @@ -10,7 +10,6 @@ #include "messages/RemoteMessage.h" #include "RemoteDeviceDescriptor.h" #include "RemoteDispatcher.h" -#include "RemoteDispatcher.h" #include diff --git a/src/remote_device/RemoteConnectorImpl.cpp b/src/remote_device/RemoteConnectorImpl.cpp index 15d20ea9d..aab10c917 100644 --- a/src/remote_device/RemoteConnectorImpl.cpp +++ b/src/remote_device/RemoteConnectorImpl.cpp @@ -1,5 +1,5 @@ /*! - * \copyright Copyright (c) 2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2017-2018 Governikus GmbH & Co. KG, Germany */ #include "RemoteConnectorImpl.h" @@ -299,7 +299,7 @@ void RemoteConnectorImpl::onConnectRequest(const RemoteDeviceDescriptor& pRemote } // Currently, we only support API level 1. - if (!pRemoteDeviceDescriptor.getSupportedApis().contains(QLatin1String("IFDInterface_WebSocket_v0"))) + if (!pRemoteDeviceDescriptor.isSupported()) { Q_EMIT fireRemoteDispatcherError(pRemoteDeviceDescriptor, RemoteErrorCode::NO_SUPPORTED_API_LEVEL); return; diff --git a/src/remote_device/RemoteConnectorImpl.h b/src/remote_device/RemoteConnectorImpl.h index 1adef7273..3276f7ec8 100644 --- a/src/remote_device/RemoteConnectorImpl.h +++ b/src/remote_device/RemoteConnectorImpl.h @@ -1,7 +1,7 @@ /*! * \brief Module that creates and manages connections from a remote client to a remote server. * - * \copyright Copyright (c) 2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2017-2018 Governikus GmbH & Co. KG, Germany */ #pragma once diff --git a/src/remote_device/RemoteDeviceDescriptor.cpp b/src/remote_device/RemoteDeviceDescriptor.cpp index 4cc447f9b..319c0b3f3 100644 --- a/src/remote_device/RemoteDeviceDescriptor.cpp +++ b/src/remote_device/RemoteDeviceDescriptor.cpp @@ -1,5 +1,5 @@ /*! - * \copyright Copyright (c) 2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2017-2018 Governikus GmbH & Co. KG, Germany */ #include "RemoteDeviceDescriptor.h" @@ -73,11 +73,11 @@ QUrl urlFromMsgAndHost(const QSharedPointer& pMsg, RemoteDeviceDescriptor::RemoteDeviceDescriptorData::RemoteDeviceDescriptorData(const QString& pIfdName, const QString& pIfdId, - const QStringList& pSupportedApis, + const QVector& pApiVersions, const QUrl& pRemoteUrl) : mIfdName(pIfdName) , mIfdId(pIfdId) - , mSupportedApis(pSupportedApis) + , mApiVersions(pApiVersions) , mUrl(pRemoteUrl) { } @@ -92,7 +92,7 @@ bool RemoteDeviceDescriptor::RemoteDeviceDescriptorData::operator==(const Remote { return mIfdName == pOther.mIfdName && mIfdId == pOther.mIfdId && - mSupportedApis == pOther.mSupportedApis && + mApiVersions == pOther.mApiVersions && mUrl == pOther.mUrl; } @@ -109,7 +109,7 @@ RemoteDeviceDescriptor::RemoteDeviceDescriptorData* RemoteDeviceDescriptor::crea const QString& ifdName = pMsg->getIfdName(); const QString& ifdId = pMsg->getIfdId(); - const QStringList& supportedApis = pMsg->getSupportedApis(); + const QVector& supportedApis = pMsg->getSupportedApis(); return new RemoteDeviceDescriptorData(ifdName, ifdId, supportedApis, url); } @@ -139,11 +139,17 @@ const QString& RemoteDeviceDescriptor::getIfdId() const } -const QStringList& RemoteDeviceDescriptor::getSupportedApis() const +const QVector& RemoteDeviceDescriptor::getApiVersions() const { - static const QStringList EMPTY_VECTOR; + static const QVector EMPTY_VECTOR; - return d.data() == nullptr ? EMPTY_VECTOR : d->mSupportedApis; + return d.data() == nullptr ? EMPTY_VECTOR : d->mApiVersions; +} + + +bool RemoteDeviceDescriptor::isSupported() const +{ + return IfdVersion::selectLatestSupported(getApiVersions()).isValid(); } diff --git a/src/remote_device/RemoteDeviceDescriptor.h b/src/remote_device/RemoteDeviceDescriptor.h index bec85ba33..2683ee3eb 100644 --- a/src/remote_device/RemoteDeviceDescriptor.h +++ b/src/remote_device/RemoteDeviceDescriptor.h @@ -2,11 +2,13 @@ * \brief Information needed to display a remote device in the GUI and to open * a websocket connection to it. * - * \copyright Copyright (c) 2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2017-2018 Governikus GmbH & Co. KG, Germany */ #pragma once +#include "messages/IfdVersion.h" + #include #include #include @@ -27,14 +29,14 @@ class RemoteDeviceDescriptor public: RemoteDeviceDescriptorData(const QString& pIfdName, const QString& pIfdId, - const QStringList& pSupportedApis, + const QVector& pApiVersions, const QUrl& pUrl); virtual ~RemoteDeviceDescriptorData(); const QString mIfdName; const QString mIfdId; - const QStringList mSupportedApis; + const QVector mApiVersions; const QUrl mUrl; bool operator==(const RemoteDeviceDescriptorData& pOther) const; }; @@ -56,7 +58,8 @@ class RemoteDeviceDescriptor const QString& getIfdName() const; const QString& getIfdId() const; - const QStringList& getSupportedApis() const; + const QVector& getApiVersions() const; + bool isSupported() const; const QUrl& getUrl() const; bool isNull() const; @@ -71,7 +74,7 @@ inline QDebug operator<<(QDebug pDbg, const RemoteDeviceDescriptor& pRemoteDevic return pDbg.noquote().nospace() << "RemoteDevice(" << pRemoteDeviceDescriptor.getIfdName() << ", " << pRemoteDeviceDescriptor.getIfdId() << ", " << pRemoteDeviceDescriptor.getUrl() << ", " << - pRemoteDeviceDescriptor.getSupportedApis() << ")"; + pRemoteDeviceDescriptor.getApiVersions() << ")"; } diff --git a/src/remote_device/RemoteDeviceList.cpp b/src/remote_device/RemoteDeviceList.cpp index 70be0dbd0..036c4b7c5 100644 --- a/src/remote_device/RemoteDeviceList.cpp +++ b/src/remote_device/RemoteDeviceList.cpp @@ -1,5 +1,5 @@ /*! - * \copyright Copyright (c) 2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2017-2018 Governikus GmbH & Co. KG, Germany */ #include "RemoteDeviceList.h" diff --git a/src/remote_device/RemoteDeviceList.h b/src/remote_device/RemoteDeviceList.h index d6d5f9459..91c4350c7 100644 --- a/src/remote_device/RemoteDeviceList.h +++ b/src/remote_device/RemoteDeviceList.h @@ -1,7 +1,7 @@ /*! * \brief Interface for RemoteDeviceList * - * \copyright Copyright (c) 2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2017-2018 Governikus GmbH & Co. KG, Germany */ #pragma once diff --git a/src/remote_device/RemoteDeviceModel.cpp b/src/remote_device/RemoteDeviceModel.cpp index 1f687abcb..73b807b2b 100644 --- a/src/remote_device/RemoteDeviceModel.cpp +++ b/src/remote_device/RemoteDeviceModel.cpp @@ -1,5 +1,5 @@ /*! - * \copyright Copyright (c) 2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2017-2018 Governikus GmbH & Co. KG, Germany */ #include "RemoteDeviceModel.h" @@ -19,6 +19,7 @@ RemoteDeviceModelEntry::RemoteDeviceModelEntry(const QString pDeviceName, const , mId(pId) , mPaired(false) , mNetworkVisible(false) + , mSupported(pRemoteDeviceListEntry->getRemoteDeviceDescriptor().isSupported()) , mLastConnected() , mRemoteDeviceListEntry(pRemoteDeviceListEntry) { @@ -26,11 +27,12 @@ RemoteDeviceModelEntry::RemoteDeviceModelEntry(const QString pDeviceName, const } -RemoteDeviceModelEntry::RemoteDeviceModelEntry(const QString pDeviceName, const QString pId, bool pPaired, bool pNetworkVisible, const QDateTime& pLastConnected) +RemoteDeviceModelEntry::RemoteDeviceModelEntry(const QString pDeviceName, const QString pId, bool pPaired, bool pNetworkVisible, bool pSupported, const QDateTime& pLastConnected) : mDeviceName(pDeviceName) , mId(pId) , mPaired(pPaired) , mNetworkVisible(pNetworkVisible) + , mSupported(pSupported) , mLastConnected(pLastConnected) , mRemoteDeviceListEntry(nullptr) { @@ -43,6 +45,7 @@ RemoteDeviceModelEntry::RemoteDeviceModelEntry(const QString pDeviceName) , mId() , mPaired(false) , mNetworkVisible(false) + , mSupported(false) , mLastConnected() , mRemoteDeviceListEntry(nullptr) { @@ -92,6 +95,12 @@ bool RemoteDeviceModelEntry::isNetworkVisible() const } +bool RemoteDeviceModelEntry::isSupported() const +{ + return mSupported; +} + + void RemoteDeviceModelEntry::setNetworkVisible(bool pNetworkVisible) { mNetworkVisible = pNetworkVisible; @@ -120,15 +129,10 @@ RemoteDeviceModel::RemoteDeviceModel(QObject* pParent, bool pShowPairedReaders, RemoteServiceSettings& settings = AppSettings::getInstance().getRemoteServiceSettings(); connect(&settings, &RemoteServiceSettings::fireTrustedRemoteInfosChanged, this, &RemoteDeviceModel::onKnownRemoteReadersChanged); onKnownRemoteReadersChanged(); -} - -RemoteDeviceModel::~RemoteDeviceModel() -{ - if (mShowUnpairedReaders) - { - onWidgetHidden(); - } + const QSharedPointer& remoteClient = Env::getSingleton()->getRemoteClient(); + connect(remoteClient.data(), &RemoteClient::fireDeviceAppeared, this, &RemoteDeviceModel::constructReaderList); + connect(remoteClient.data(), &RemoteClient::fireDeviceVanished, this, &RemoteDeviceModel::constructReaderList); } @@ -139,6 +143,7 @@ QHash RemoteDeviceModel::roleNames() const roles.insert(LAST_CONNECTED, QByteArrayLiteral("lastConnected")); roles.insert(DEVICE_ID, QByteArrayLiteral("deviceId")); roles.insert(IS_NETWORK_VISIBLE, QByteArrayLiteral("isNetworkVisible")); + roles.insert(IS_SUPPORTED, QByteArrayLiteral("isSupported")); return roles; } @@ -154,17 +159,21 @@ QString RemoteDeviceModel::getStatus(const RemoteDeviceModelEntry& pRemoteDevice { if (pRemoteDeviceModelEntry.isNetworkVisible()) { - return tr("Paired and available"); - } - else - { - return tr("Paired and not available"); + if (pRemoteDeviceModelEntry.isSupported()) + { + return tr("Paired and available"); + } + return tr("Paired, but unsupported"); } + return tr("Paired, but unavailable"); } - else + + if (!pRemoteDeviceModelEntry.isSupported()) { - return tr("Not paired"); + return tr("Unsupported version"); } + + return tr("Not paired"); } @@ -231,6 +240,9 @@ QVariant RemoteDeviceModel::data(const QModelIndex& pIndex, int pRole) const case IS_NETWORK_VISIBLE: return reader.isNetworkVisible(); + case IS_SUPPORTED: + return reader.isSupported(); + default: return QVariant(); } @@ -270,36 +282,35 @@ bool RemoteDeviceModel::isPaired(const QModelIndex& pIndex) const } -void RemoteDeviceModel::onWidgetShown() +bool RemoteDeviceModel::isSupported(const QModelIndex& pIndex) const { - const QSharedPointer& remoteClient = Env::getSingleton()->getRemoteClient(); - connect(remoteClient.data(), &RemoteClient::fireDeviceAppeared, this, &RemoteDeviceModel::constructReaderList); - connect(remoteClient.data(), &RemoteClient::fireDeviceVanished, this, &RemoteDeviceModel::constructReaderList); + return mAllRemoteReaders.at(pIndex.row()).isSupported(); +} + +void RemoteDeviceModel::onWidgetShown() +{ if (!mShowUnpairedReaders) { return; } qDebug() << "Starting Remote Device Detection"; - remoteClient->startDetection(); + Env::getSingleton()->getRemoteClient()->startDetection(); constructReaderList(); } void RemoteDeviceModel::onWidgetHidden() { - const QSharedPointer& remoteClient = Env::getSingleton()->getRemoteClient(); - disconnect(remoteClient.data(), &RemoteClient::fireDeviceAppeared, this, &RemoteDeviceModel::constructReaderList); - disconnect(remoteClient.data(), &RemoteClient::fireDeviceVanished, this, &RemoteDeviceModel::constructReaderList); - if (!mShowUnpairedReaders) { return; } qDebug() << "Stopping Remote Device Detection"; - remoteClient->stopDetection(); + Env::getSingleton()->getRemoteClient()->stopDetection(); + constructReaderList(); } @@ -330,6 +341,7 @@ void RemoteDeviceModel::constructReaderList() for (const auto& pairedReader : qAsConst(mPairedReaders)) { bool found = false; + bool supported = true; if (remoteClient) { const QVector >& foundDevices = remoteClient->getRemoteDevices(); @@ -339,6 +351,9 @@ void RemoteDeviceModel::constructReaderList() if (foundDevice && foundDevice->getRemoteDeviceDescriptor().getIfdId() == pairedReader.getFingerprint()) { found = true; + supported = foundDevice->getRemoteDeviceDescriptor().isSupported(); + + break; } } } @@ -347,6 +362,7 @@ void RemoteDeviceModel::constructReaderList() , pairedReader.getFingerprint() , true , found + , supported , pairedReader.getLastConnected()); mAllRemoteReaders.append(newEntry); } diff --git a/src/remote_device/RemoteDeviceModel.h b/src/remote_device/RemoteDeviceModel.h index a5966ddf1..82b6cf675 100644 --- a/src/remote_device/RemoteDeviceModel.h +++ b/src/remote_device/RemoteDeviceModel.h @@ -1,7 +1,7 @@ /*! * \brief Model implementation for the remote device table * - * \copyright Copyright (c) 2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2017-2018 Governikus GmbH & Co. KG, Germany */ #pragma once @@ -29,12 +29,13 @@ class RemoteDeviceModelEntry QString mId; bool mPaired; bool mNetworkVisible; + bool mSupported; QDateTime mLastConnected; QSharedPointer mRemoteDeviceListEntry; public: RemoteDeviceModelEntry(const QString pDeviceName, const QString mId, QSharedPointer& pRemoteDeviceListEntry); - RemoteDeviceModelEntry(const QString pDeviceName, const QString mId, bool pPaired, bool pNetworkVisible, const QDateTime& pLastConnected); + RemoteDeviceModelEntry(const QString pDeviceName, const QString mId, bool pPaired, bool pNetworkVisible, bool pSupported, const QDateTime& pLastConnected); RemoteDeviceModelEntry(const QString pDeviceName = QStringLiteral("UnknownReader")); bool isPaired() const; @@ -42,6 +43,7 @@ class RemoteDeviceModelEntry const QString& getId() const; void setId(QString pId); bool isNetworkVisible() const; + bool isSupported() const; void setNetworkVisible(bool pNetworkVisible); const QDateTime& getLastConnected() const; void setLastConnected(const QDateTime& pLastConnected); @@ -73,7 +75,8 @@ class RemoteDeviceModel REMOTE_DEVICE_NAME = Qt::UserRole + 1, LAST_CONNECTED, DEVICE_ID, - IS_NETWORK_VISIBLE + IS_NETWORK_VISIBLE, + IS_SUPPORTED }; enum ColumnId : int @@ -83,7 +86,6 @@ class RemoteDeviceModel }; RemoteDeviceModel(QObject* pParent = nullptr, bool pShowPairedReaders = true, bool pShowUnpairedReaders = true); - virtual ~RemoteDeviceModel() override; virtual QVariant headerData(int pSection, Qt::Orientation pOrientation, int pRole) const override; virtual int rowCount(const QModelIndex& pParent = QModelIndex()) const override; @@ -94,6 +96,7 @@ class RemoteDeviceModel const QSharedPointer getRemoteDeviceListEntry(const QModelIndex& pIndex) const; const QSharedPointer getRemoteDeviceListEntry(QString pDeviceId) const; bool isPaired(const QModelIndex& pIndex) const; + bool isSupported(const QModelIndex& pIndex) const; void forgetDevice(const QModelIndex& pIndex); void forgetDevice(const QString& pDeviceId); diff --git a/src/remote_device/RemoteDispatcherImpl.cpp b/src/remote_device/RemoteDispatcherImpl.cpp index 450e20539..2658107b9 100644 --- a/src/remote_device/RemoteDispatcherImpl.cpp +++ b/src/remote_device/RemoteDispatcherImpl.cpp @@ -1,5 +1,5 @@ /*! - * \copyright Copyright (c) 2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2017-2018 Governikus GmbH & Co. KG, Germany */ #include "RemoteDispatcherImpl.h" @@ -42,9 +42,9 @@ void RemoteDispatcherImpl::createAndSendContext(const QJsonObject& pMessageObjec } IfdEstablishContext establishContext(pMessageObject); - if (establishContext.getProtocol() != QLatin1String("IFDInterface_WebSocket_v0")) + if (!establishContext.getProtocol().isSupported()) { - qCWarning(remote_device) << "Unsupported API protocol requested:" << establishContext.getProtocol(); + qCWarning(remote_device) << "Unsupported API protocol requested:" << establishContext.getProtocolRaw(); fail = QStringLiteral("/al/common#unknownError"); } @@ -89,12 +89,6 @@ void RemoteDispatcherImpl::onReceived(const QByteArray& pDataBlock) return; } - if (remoteMessage.getType() == RemoteCardMessageType::IFDError) - { - qCWarning(remote_device) << "Error message received:" << pDataBlock; - return; - } - if (remoteMessage.getType() == RemoteCardMessageType::IFDEstablishContext) { IfdEstablishContext establishContext(msgObject); @@ -130,6 +124,12 @@ void RemoteDispatcherImpl::onReceived(const QByteArray& pDataBlock) } +void RemoteDispatcherImpl::close() +{ + mDataChannel->close(); +} + + void RemoteDispatcherImpl::onClosed(GlobalStatus::Code pCloseCode) { qCDebug(remote_device) << "Connection closed"; diff --git a/src/remote_device/RemoteDispatcherImpl.h b/src/remote_device/RemoteDispatcherImpl.h index 67ebfd00d..4e86a40ee 100644 --- a/src/remote_device/RemoteDispatcherImpl.h +++ b/src/remote_device/RemoteDispatcherImpl.h @@ -1,7 +1,7 @@ /*! * \brief Class that dispatches incoming and outgoing remote messages. * - * \copyright Copyright (c) 2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2017-2018 Governikus GmbH & Co. KG, Germany */ #pragma once @@ -36,6 +36,7 @@ class RemoteDispatcherImpl virtual const QString& getId() const override; virtual const QString& getContextHandle() const override; + Q_INVOKABLE virtual void close() override; Q_INVOKABLE virtual void send(const QSharedPointer& pMessage) override; }; diff --git a/src/remote_device/RemoteHelper.cpp b/src/remote_device/RemoteHelper.cpp index e1b23d08f..625a50e7a 100644 --- a/src/remote_device/RemoteHelper.cpp +++ b/src/remote_device/RemoteHelper.cpp @@ -1,5 +1,5 @@ /*! - * \copyright Copyright (c) 2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2017-2018 Governikus GmbH & Co. KG, Germany */ #include "RemoteHelper.h" diff --git a/src/remote_device/RemoteHelper.h b/src/remote_device/RemoteHelper.h index f7f34dd33..13fc94065 100644 --- a/src/remote_device/RemoteHelper.h +++ b/src/remote_device/RemoteHelper.h @@ -1,7 +1,7 @@ /*! * \brief Helper for some miscellaneous methods. * - * \copyright Copyright (c) 2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2017-2018 Governikus GmbH & Co. KG, Germany */ #pragma once diff --git a/src/remote_device/RemoteReaderAdvertiser.cpp b/src/remote_device/RemoteReaderAdvertiser.cpp index 3e7c0668e..949b39480 100644 --- a/src/remote_device/RemoteReaderAdvertiser.cpp +++ b/src/remote_device/RemoteReaderAdvertiser.cpp @@ -1,5 +1,5 @@ /*! - * \copyright Copyright (c) 2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2017-2018 Governikus GmbH & Co. KG, Germany */ #include "RemoteReaderAdvertiser.h" @@ -60,7 +60,7 @@ RemoteReaderAdvertiserImpl::RemoteReaderAdvertiserImpl(const QString& pIfdName, : RemoteReaderAdvertiser() , mHandler(Env::create(false)) , mTimerId(startTimer(pTimerInterval)) - , mDiscovery(Discovery(pIfdName, pIfdId, pPort, {QStringLiteral("IFDInterface_WebSocket_v0")}).toJson()) + , mDiscovery(Discovery(pIfdName, pIfdId, pPort, {IfdVersion::supported()}).toJson()) { qCDebug(remote_device) << "Start advertising every" << pTimerInterval << "msecs"; } diff --git a/src/remote_device/RemoteReaderAdvertiser.h b/src/remote_device/RemoteReaderAdvertiser.h index 6934e31ae..8faf29b10 100644 --- a/src/remote_device/RemoteReaderAdvertiser.h +++ b/src/remote_device/RemoteReaderAdvertiser.h @@ -3,7 +3,7 @@ * on the server side. According to the concept this is done by * sending the message REMOTE_READER_OFFER as a UDP broadcast. * - * \copyright Copyright (c) 2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2017-2018 Governikus GmbH & Co. KG, Germany */ #pragma once diff --git a/src/remote_device/RemoteServer.cpp b/src/remote_device/RemoteServer.cpp index 7b053aa42..f0baeb294 100644 --- a/src/remote_device/RemoteServer.cpp +++ b/src/remote_device/RemoteServer.cpp @@ -1,5 +1,5 @@ /*! - * \copyright Copyright (c) 2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2017-2018 Governikus GmbH & Co. KG, Germany */ #include "RemoteServer.h" diff --git a/src/remote_device/RemoteServer.h b/src/remote_device/RemoteServer.h index c28189f98..5b1b772d8 100644 --- a/src/remote_device/RemoteServer.h +++ b/src/remote_device/RemoteServer.h @@ -2,7 +2,7 @@ * \brief Remote server service to offer remote readers. * This class controls the advertising over UDP as well as the Websocket connection management. * - * \copyright Copyright (c) 2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2017-2018 Governikus GmbH & Co. KG, Germany */ #pragma once diff --git a/src/remote_device/RemoteTlsServer.cpp b/src/remote_device/RemoteTlsServer.cpp index 321023bb5..80d3e4cca 100644 --- a/src/remote_device/RemoteTlsServer.cpp +++ b/src/remote_device/RemoteTlsServer.cpp @@ -1,5 +1,5 @@ /*! - * \copyright Copyright (c) 2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2017-2018 Governikus GmbH & Co. KG, Germany */ #include "RemoteTlsServer.h" diff --git a/src/remote_device/RemoteTlsServer.h b/src/remote_device/RemoteTlsServer.h index 1f1f2c343..fddc71ef6 100644 --- a/src/remote_device/RemoteTlsServer.h +++ b/src/remote_device/RemoteTlsServer.h @@ -1,7 +1,7 @@ /*! * \brief QTcpServer with necessary TLS handling of remote device configuration. * - * \copyright Copyright (c) 2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2017-2018 Governikus GmbH & Co. KG, Germany */ #pragma once diff --git a/src/remote_device/RemoteWebSocketServer.cpp b/src/remote_device/RemoteWebSocketServer.cpp index 1955d8240..659f55366 100644 --- a/src/remote_device/RemoteWebSocketServer.cpp +++ b/src/remote_device/RemoteWebSocketServer.cpp @@ -1,5 +1,5 @@ /*! - * \copyright Copyright (c) 2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2017-2018 Governikus GmbH & Co. KG, Germany */ #include "RemoteWebSocketServer.h" diff --git a/src/remote_device/RemoteWebSocketServer.h b/src/remote_device/RemoteWebSocketServer.h index fa5bcb100..10db6d6df 100644 --- a/src/remote_device/RemoteWebSocketServer.h +++ b/src/remote_device/RemoteWebSocketServer.h @@ -1,7 +1,7 @@ /*! * \brief WebSocketServer on the server side of a remote reader scenario. * - * \copyright Copyright (c) 2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2017-2018 Governikus GmbH & Co. KG, Germany */ #pragma once diff --git a/src/remote_device/ServerMessageHandler.cpp b/src/remote_device/ServerMessageHandler.cpp index 6b83e24f4..1135531a9 100644 --- a/src/remote_device/ServerMessageHandler.cpp +++ b/src/remote_device/ServerMessageHandler.cpp @@ -1,5 +1,5 @@ /*! - * \copyright Copyright (c) 2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2017-2018 Governikus GmbH & Co. KG, Germany */ #include "ServerMessageHandler.h" @@ -15,9 +15,12 @@ #include "messages/IfdEstablishContext.h" #include "messages/IfdEstablishPaceChannel.h" #include "messages/IfdEstablishPaceChannelResponse.h" +#include "messages/IfdModifyPin.h" +#include "messages/IfdModifyPinResponse.h" #include "messages/IfdStatus.h" #include "messages/IfdTransmit.h" #include "messages/IfdTransmitResponse.h" +#include "PinModifyOutput.h" #include "ReaderManager.h" #include "RemoteDispatcher.h" @@ -128,41 +131,66 @@ void ServerMessageHandlerImpl::onCreateCardConnectionCommandDone(QSharedPointer< return; } - qCInfo(remote_device) << "Card successfully connected" << pCommand->getReaderName(); - mCardConnections.insert(pCommand->getReaderName(), pCommand->getCardConnection()); - const QSharedPointer response(new IfdConnectResponse(pCommand->getReaderName())); + QString slotHandle = QUuid::createUuid().toString(); + qCInfo(remote_device) << "Card successfully connected" << pCommand->getReaderName() << ", using handle " << slotHandle; + mCardConnections.insert(slotHandle, pCommand->getCardConnection()); + + const QSharedPointer response(new IfdConnectResponse(slotHandle)); mRemoteDispatcher->send(response); } +QString ServerMessageHandlerImpl::convertSlotHandleBackwardsCompatibility(const QString& pSlotHandle) +{ + if (!mCardConnections.contains(pSlotHandle)) + { + const auto& slotHandles = mCardConnections.keys(); + for (const auto& slotHandle : slotHandles) + { + if (mCardConnections[slotHandle]->getReaderInfo().getName() == pSlotHandle) + { + return slotHandle; + } + } + } + return pSlotHandle; +} + + void ServerMessageHandlerImpl::process(const QSharedPointer& pMessage) { - if (!mCardConnections.contains(pMessage->getSlotHandle())) + QString slotHandle = pMessage->getSlotHandle(); + slotHandle = convertSlotHandleBackwardsCompatibility(slotHandle); + + if (!mCardConnections.contains(slotHandle)) { - qCWarning(remote_device) << "Card is not connected" << pMessage->getSlotHandle(); - const QSharedPointer response(new IfdDisconnectResponse(pMessage->getSlotHandle(), QStringLiteral("/ifdl/common#invalidSlotHandle"))); + qCWarning(remote_device) << "Card is not connected" << slotHandle; + const QSharedPointer response(new IfdDisconnectResponse(slotHandle, QStringLiteral("/ifdl/common#invalidSlotHandle"))); mRemoteDispatcher->send(response); return; } - mCardConnections.remove(pMessage->getSlotHandle()); - qCInfo(remote_device) << "Card successfully disconnected" << pMessage->getSlotHandle(); - const QSharedPointer response(new IfdDisconnectResponse(pMessage->getSlotHandle())); + mCardConnections.remove(slotHandle); + qCInfo(remote_device) << "Card successfully disconnected" << slotHandle; + const QSharedPointer response(new IfdDisconnectResponse(slotHandle)); mRemoteDispatcher->send(response); } void ServerMessageHandlerImpl::process(const QSharedPointer& pMessage) { - if (!mCardConnections.contains(pMessage->getSlotHandle())) + QString slotHandle = pMessage->getSlotHandle(); + slotHandle = convertSlotHandleBackwardsCompatibility(slotHandle); + + if (!mCardConnections.contains(slotHandle)) { - qCWarning(remote_device) << "Card is not connected" << pMessage->getSlotHandle(); - const QSharedPointer response(new IfdTransmitResponse(pMessage->getSlotHandle(), QByteArray(), QStringLiteral("/ifdl/common#invalidSlotHandle"))); + qCWarning(remote_device) << "Card is not connected" << slotHandle; + const QSharedPointer response(new IfdTransmitResponse(slotHandle, QByteArray(), QStringLiteral("/ifdl/common#invalidSlotHandle"))); mRemoteDispatcher->send(response); return; } - const QSharedPointer& cardConnection = mCardConnections.value(pMessage->getSlotHandle()); + const QSharedPointer& cardConnection = mCardConnections.value(slotHandle); const auto& commandApdu = pMessage->getInputApdu(); const bool pinPadMode = Env::getSingleton()->getRemoteServiceSettings().getPinPadMode(); @@ -175,47 +203,116 @@ void ServerMessageHandlerImpl::process(const QSharedPointer& } } - qCDebug(remote_device) << "Transmit card APDU for" << pMessage->getSlotHandle(); + qCDebug(remote_device) << "Transmit card APDU for" << slotHandle; InputAPDUInfo inputApduInfo(commandApdu, MSEBuilder::isUpdateRetryCounterCommand(commandApdu)); - cardConnection->callTransmitCommand(this, &ServerMessageHandlerImpl::onTransmitCardCommandDone, {inputApduInfo}); + cardConnection->callTransmitCommand(this, &ServerMessageHandlerImpl::onTransmitCardCommandDone, {inputApduInfo}, slotHandle); } void ServerMessageHandlerImpl::process(const QSharedPointer& pMessage) { + QString slotHandle = pMessage->getSlotHandle(); + slotHandle = convertSlotHandleBackwardsCompatibility(slotHandle); + const bool pinPadMode = Env::getSingleton()->getRemoteServiceSettings().getPinPadMode(); if (!pinPadMode) { qCWarning(remote_device) << "EstablishPaceChannel is only available in pin pad mode."; - const QSharedPointer response(new IfdEstablishPaceChannelResponse(pMessage->getSlotHandle(), QByteArray(), QStringLiteral("/al/common#unknownError"))); + const QSharedPointer response(new IfdEstablishPaceChannelResponse(slotHandle, QByteArray(), QStringLiteral("/al/common#unknownError"))); mRemoteDispatcher->send(response); return; } - if (!mCardConnections.contains(pMessage->getSlotHandle())) + if (!mCardConnections.contains(slotHandle)) { - qCWarning(remote_device) << "Card is not connected" << pMessage->getSlotHandle(); - const QSharedPointer response(new IfdEstablishPaceChannelResponse(pMessage->getSlotHandle(), QByteArray(), QStringLiteral("/ifdl/common#invalidSlotHandle"))); + qCWarning(remote_device) << "Card is not connected" << slotHandle; + const QSharedPointer response(new IfdEstablishPaceChannelResponse(slotHandle, QByteArray(), QStringLiteral("/ifdl/common#invalidSlotHandle"))); mRemoteDispatcher->send(response); return; } - QSharedPointer connection = mCardConnections[pMessage->getSlotHandle()]; + QSharedPointer connection = mCardConnections[slotHandle]; Q_EMIT fireEstablishPaceChannel(pMessage, connection); } -void ServerMessageHandlerImpl::sendEstablishPaceChannelResponse(const QString& pSlotName, const EstablishPACEChannelOutput& pChannelOutput) +void ServerMessageHandlerImpl::sendEstablishPaceChannelResponse(const QString& pSlotHandle, const EstablishPACEChannelOutput& pChannelOutput) { const QByteArray& ccid = pChannelOutput.toCcid(); if (pChannelOutput.getPaceReturnCode() == CardReturnCode::UNKNOWN) { - const QSharedPointer response(new IfdEstablishPaceChannelResponse(pSlotName, ccid, QStringLiteral("/al/common#unknownError"))); + const QSharedPointer response(new IfdEstablishPaceChannelResponse(pSlotHandle, ccid, QStringLiteral("/al/common#unknownError"))); mRemoteDispatcher->send(response); return; } - const QSharedPointer response(new IfdEstablishPaceChannelResponse(pSlotName, ccid)); + const QSharedPointer response(new IfdEstablishPaceChannelResponse(pSlotHandle, ccid)); + mRemoteDispatcher->send(response); +} + + +void ServerMessageHandlerImpl::process(const QSharedPointer& pMessage) +{ + QString slotHandle = pMessage->getSlotHandle(); + slotHandle = convertSlotHandleBackwardsCompatibility(slotHandle); + + const bool pinPadMode = Env::getSingleton()->getRemoteServiceSettings().getPinPadMode(); + if (!pinPadMode) + { + qCWarning(remote_device) << "ModifyPin is only available in pin pad mode."; + const QSharedPointer response(new IfdModifyPinResponse(slotHandle, QByteArray(), QStringLiteral("/al/common#unknownError"))); + mRemoteDispatcher->send(response); + return; + } + + if (!mCardConnections.contains(slotHandle)) + { + qCWarning(remote_device) << "Card is not connected" << slotHandle; + const QSharedPointer response(new IfdModifyPinResponse(slotHandle, QByteArray(), QStringLiteral("/ifdl/common#invalidSlotHandle"))); + mRemoteDispatcher->send(response); + return; + } + + Q_EMIT fireModifyPin(pMessage, mCardConnections[slotHandle]); +} + + +void ServerMessageHandlerImpl::sendModifyPinResponse(const QString& pSlotHandle, const ResponseApdu& pResponseApdu) +{ + PinModifyOutput pinModifyOutput(pResponseApdu); + const QByteArray& ccid = pinModifyOutput.toCcid(); + + QString minor; + switch (pResponseApdu.getReturnCode()) + { + case StatusCode::SUCCESS: + break; + + case StatusCode::EMPTY: + minor = QStringLiteral("/ifdl/terminal#noCard"); + break; + + case StatusCode::INPUT_TIMEOUT: + minor = QStringLiteral("/ifdl/common#timeoutError"); + break; + + case StatusCode::INPUT_CANCELLED: + minor = QStringLiteral("/ifdl#cancellationByUser"); + break; + + case StatusCode::PASSWORDS_DIFFER: + minor = QStringLiteral("/ifdl/IO#repeatedDataMismatch"); + break; + + case StatusCode::PASSWORD_OUTOF_RANGE: + minor = QStringLiteral("/ifdl/IO#unknownPINFormat"); + break; + + default: + minor = QStringLiteral("/al/common#unknownError"); + } + + const QSharedPointer response(new IfdModifyPinResponse(pSlotHandle, ccid, minor)); mRemoteDispatcher->send(response); } @@ -223,10 +320,13 @@ void ServerMessageHandlerImpl::sendEstablishPaceChannelResponse(const QString& p void ServerMessageHandlerImpl::onTransmitCardCommandDone(QSharedPointer pCommand) { auto transmitCommand = pCommand.staticCast(); + QString slotHandle = transmitCommand->getSlotHandle(); + slotHandle = convertSlotHandleBackwardsCompatibility(slotHandle); + if (transmitCommand->getReturnCode() != CardReturnCode::OK) { - qCWarning(remote_device) << "Card transmit for" << transmitCommand->getReaderName() << "failed" << transmitCommand->getReturnCode(); - QSharedPointer response(new IfdTransmitResponse(transmitCommand->getReaderName(), QByteArray(), QStringLiteral("/al/common#unknownError"))); + qCWarning(remote_device) << "Card transmit for" << slotHandle << "failed" << transmitCommand->getReturnCode(); + QSharedPointer response(new IfdTransmitResponse(slotHandle, QByteArray(), QStringLiteral("/al/common#unknownError"))); mRemoteDispatcher->send(response); return; } @@ -237,8 +337,8 @@ void ServerMessageHandlerImpl::onTransmitCardCommandDone(QSharedPointergetOutputApduAsHex().first()); } - qCInfo(remote_device) << "Card transmit succeeded" << transmitCommand->getReaderName(); - QSharedPointer response(new IfdTransmitResponse(transmitCommand->getReaderName(), responseApdu)); + qCInfo(remote_device) << "Card transmit succeeded" << slotHandle; + QSharedPointer response(new IfdTransmitResponse(slotHandle, responseApdu)); mRemoteDispatcher->send(response); } @@ -276,7 +376,8 @@ void ServerMessageHandlerImpl::onReceived(const QSharedPointergetType())) diff --git a/src/remote_device/ServerMessageHandler.h b/src/remote_device/ServerMessageHandler.h index 56092b426..53efd1a57 100644 --- a/src/remote_device/ServerMessageHandler.h +++ b/src/remote_device/ServerMessageHandler.h @@ -1,7 +1,7 @@ /*! * \brief Handler for messages on the server side of a remote reader scenario. * - * \copyright Copyright (c) 2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2017-2018 Governikus GmbH & Co. KG, Germany */ #pragma once @@ -33,10 +33,12 @@ class ServerMessageHandler public: virtual ~ServerMessageHandler(); - virtual void sendEstablishPaceChannelResponse(const QString& pSlotName, const EstablishPACEChannelOutput&) = 0; + virtual void sendEstablishPaceChannelResponse(const QString& pSlotHandle, const EstablishPACEChannelOutput&) = 0; + virtual void sendModifyPinResponse(const QString& pSlotHandle, const ResponseApdu& pResponseApdu) = 0; Q_SIGNALS: void fireEstablishPaceChannel(const QSharedPointer& pMessage, const QSharedPointer& pConnection); + void fireModifyPin(const QSharedPointer& pMessage, const QSharedPointer& pConnection); void fireClosed(); }; @@ -52,11 +54,14 @@ class ServerMessageHandlerImpl const QSharedPointer mRemoteDispatcher; QMap > mCardConnections; + QString convertSlotHandleBackwardsCompatibility(const QString& pSlotHandle); + virtual void process(const QSharedPointer& pMessage) override; virtual void process(const QSharedPointer& pMessage) override; virtual void process(const QSharedPointer& pMessage) override; virtual void process(const QSharedPointer& pMessage) override; virtual void process(const QSharedPointer& pMessage) override; + virtual void process(const QSharedPointer& pMessage) override; virtual void unprocessed(const QSharedPointer& pMessage) override; void unexpectedMessage(const QSharedPointer& pMessage, bool pSendMessage = false); @@ -72,7 +77,8 @@ class ServerMessageHandlerImpl public: ServerMessageHandlerImpl(const QSharedPointer& pDataChannel); - virtual void sendEstablishPaceChannelResponse(const QString& pSlotName, const EstablishPACEChannelOutput& pChannelOutput) override; + virtual void sendEstablishPaceChannelResponse(const QString& pSlotHandle, const EstablishPACEChannelOutput& pChannelOutput) override; + virtual void sendModifyPinResponse(const QString& pSlotHandle, const ResponseApdu& pResponseApdu) override; }; diff --git a/src/remote_device/WebSocketChannel.cpp b/src/remote_device/WebSocketChannel.cpp index fab605d09..ecd139a67 100644 --- a/src/remote_device/WebSocketChannel.cpp +++ b/src/remote_device/WebSocketChannel.cpp @@ -1,5 +1,5 @@ /*! - * \copyright Copyright (c) 2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2017-2018 Governikus GmbH & Co. KG, Germany */ #include "WebSocketChannel.h" diff --git a/src/remote_device/WebSocketChannel.h b/src/remote_device/WebSocketChannel.h index 9066d1f51..a260f8f97 100644 --- a/src/remote_device/WebSocketChannel.h +++ b/src/remote_device/WebSocketChannel.h @@ -1,7 +1,7 @@ /*! * \brief Implementation of DataChannel base on web sockets. * - * \copyright Copyright (c) 2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2017-2018 Governikus GmbH & Co. KG, Germany */ #pragma once diff --git a/src/remote_device/messages/Discovery.cpp b/src/remote_device/messages/Discovery.cpp index 00b99e002..52c1c240e 100644 --- a/src/remote_device/messages/Discovery.cpp +++ b/src/remote_device/messages/Discovery.cpp @@ -1,5 +1,5 @@ /*! - * \copyright Copyright (c) 2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2017-2018 Governikus GmbH & Co. KG, Germany */ @@ -23,7 +23,7 @@ static Initializer::Entry E([] { }); -Discovery::Discovery(const QString& pIfdName, const QString& pIfdId, quint16 pPort, const QStringList& pSupportedApis) +Discovery::Discovery(const QString& pIfdName, const QString& pIfdId, quint16 pPort, const QVector& pSupportedApis) : mIfdName(pIfdName) , mIfdId(pIfdId) , mPort(pPort) @@ -50,7 +50,7 @@ quint16 Discovery::getPort() const } -const QStringList& Discovery::getSupportedApis() const +const QVector& Discovery::getSupportedApis() const { return mSupportedApis; } @@ -68,7 +68,7 @@ QJsonDocument Discovery::toJson() const QJsonArray levels; for (const auto& level : qAsConst(mSupportedApis)) { - levels += level; + levels += IfdVersion(level).toString(); } result[QLatin1String("SupportedAPI")] = levels; diff --git a/src/remote_device/messages/Discovery.h b/src/remote_device/messages/Discovery.h index 85e254a4a..a822e2348 100644 --- a/src/remote_device/messages/Discovery.h +++ b/src/remote_device/messages/Discovery.h @@ -1,9 +1,10 @@ /*! - * \copyright Copyright (c) 2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2017-2018 Governikus GmbH & Co. KG, Germany */ #pragma once +#include "IfdVersion.h" #include "RemoteMessage.h" #include @@ -17,16 +18,16 @@ class Discovery const QString mIfdName; const QString mIfdId; const quint16 mPort; - const QStringList mSupportedApis; + const QVector mSupportedApis; public: - Discovery(const QString& pIfdName, const QString& pIfdId, quint16 pPort, const QStringList& pSupportedApis); + Discovery(const QString& pIfdName, const QString& pIfdId, quint16 pPort, const QVector& pSupportedApis); ~Discovery() = default; const QString& getIfdName() const; const QString& getIfdId() const; quint16 getPort() const; - const QStringList& getSupportedApis() const; + const QVector& getSupportedApis() const; QJsonDocument toJson() const; }; diff --git a/src/remote_device/messages/GetIfdStatus.cpp b/src/remote_device/messages/GetIfdStatus.cpp index 3976bb09d..5f5e4839f 100644 --- a/src/remote_device/messages/GetIfdStatus.cpp +++ b/src/remote_device/messages/GetIfdStatus.cpp @@ -1,5 +1,5 @@ /*! - * \copyright Copyright (c) 2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2017-2018 Governikus GmbH & Co. KG, Germany */ diff --git a/src/remote_device/messages/GetIfdStatus.h b/src/remote_device/messages/GetIfdStatus.h index 165d0821f..12f7929fa 100644 --- a/src/remote_device/messages/GetIfdStatus.h +++ b/src/remote_device/messages/GetIfdStatus.h @@ -1,7 +1,7 @@ /*! * \brief Classes that model the GetIFDStatus message. * - * \copyright Copyright (c) 2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2017-2018 Governikus GmbH & Co. KG, Germany */ #pragma once diff --git a/src/remote_device/messages/IfdConnect.cpp b/src/remote_device/messages/IfdConnect.cpp index 79e178023..ac4f3212c 100644 --- a/src/remote_device/messages/IfdConnect.cpp +++ b/src/remote_device/messages/IfdConnect.cpp @@ -1,5 +1,5 @@ /*! - * \copyright Copyright (c) 2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2017-2018 Governikus GmbH & Co. KG, Germany */ diff --git a/src/remote_device/messages/IfdConnect.h b/src/remote_device/messages/IfdConnect.h index b22cc7825..b8ba257ac 100644 --- a/src/remote_device/messages/IfdConnect.h +++ b/src/remote_device/messages/IfdConnect.h @@ -1,5 +1,5 @@ /*! - * \copyright Copyright (c) 2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2017-2018 Governikus GmbH & Co. KG, Germany */ #pragma once diff --git a/src/remote_device/messages/IfdConnectResponse.cpp b/src/remote_device/messages/IfdConnectResponse.cpp index f5a6314f4..1fe519863 100644 --- a/src/remote_device/messages/IfdConnectResponse.cpp +++ b/src/remote_device/messages/IfdConnectResponse.cpp @@ -1,5 +1,5 @@ /*! - * \copyright Copyright (c) 2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2017-2018 Governikus GmbH & Co. KG, Germany */ diff --git a/src/remote_device/messages/IfdConnectResponse.h b/src/remote_device/messages/IfdConnectResponse.h index 7bf10b5e8..b17cf8c91 100644 --- a/src/remote_device/messages/IfdConnectResponse.h +++ b/src/remote_device/messages/IfdConnectResponse.h @@ -1,5 +1,5 @@ /*! - * \copyright Copyright (c) 2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2017-2018 Governikus GmbH & Co. KG, Germany */ #pragma once diff --git a/src/remote_device/messages/IfdDisconnect.cpp b/src/remote_device/messages/IfdDisconnect.cpp index 0791304c6..fcf3d0cc4 100644 --- a/src/remote_device/messages/IfdDisconnect.cpp +++ b/src/remote_device/messages/IfdDisconnect.cpp @@ -1,5 +1,5 @@ /*! - * \copyright Copyright (c) 2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2017-2018 Governikus GmbH & Co. KG, Germany */ diff --git a/src/remote_device/messages/IfdDisconnect.h b/src/remote_device/messages/IfdDisconnect.h index f3062d142..092510d26 100644 --- a/src/remote_device/messages/IfdDisconnect.h +++ b/src/remote_device/messages/IfdDisconnect.h @@ -1,5 +1,5 @@ /*! - * \copyright Copyright (c) 2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2017-2018 Governikus GmbH & Co. KG, Germany */ #pragma once diff --git a/src/remote_device/messages/IfdDisconnectResponse.cpp b/src/remote_device/messages/IfdDisconnectResponse.cpp index 7102f4cb3..bfebb7a6e 100644 --- a/src/remote_device/messages/IfdDisconnectResponse.cpp +++ b/src/remote_device/messages/IfdDisconnectResponse.cpp @@ -1,5 +1,5 @@ /*! - * \copyright Copyright (c) 2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2017-2018 Governikus GmbH & Co. KG, Germany */ diff --git a/src/remote_device/messages/IfdDisconnectResponse.h b/src/remote_device/messages/IfdDisconnectResponse.h index e0619b015..35dd22e3a 100644 --- a/src/remote_device/messages/IfdDisconnectResponse.h +++ b/src/remote_device/messages/IfdDisconnectResponse.h @@ -1,5 +1,5 @@ /*! - * \copyright Copyright (c) 2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2017-2018 Governikus GmbH & Co. KG, Germany */ #pragma once diff --git a/src/remote_device/messages/IfdError.cpp b/src/remote_device/messages/IfdError.cpp index a39c9f7cc..899cd8413 100644 --- a/src/remote_device/messages/IfdError.cpp +++ b/src/remote_device/messages/IfdError.cpp @@ -1,5 +1,5 @@ /*! - * \copyright Copyright (c) 2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2017-2018 Governikus GmbH & Co. KG, Germany */ diff --git a/src/remote_device/messages/IfdError.h b/src/remote_device/messages/IfdError.h index f0e164218..376e514c9 100644 --- a/src/remote_device/messages/IfdError.h +++ b/src/remote_device/messages/IfdError.h @@ -1,5 +1,5 @@ /*! - * \copyright Copyright (c) 2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2017-2018 Governikus GmbH & Co. KG, Germany */ #pragma once diff --git a/src/remote_device/messages/IfdEstablishContext.cpp b/src/remote_device/messages/IfdEstablishContext.cpp index c91253532..fa3f44c99 100644 --- a/src/remote_device/messages/IfdEstablishContext.cpp +++ b/src/remote_device/messages/IfdEstablishContext.cpp @@ -1,5 +1,5 @@ /*! - * \copyright Copyright (c) 2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2017-2018 Governikus GmbH & Co. KG, Germany */ @@ -22,7 +22,7 @@ VALUE_NAME(UD_NAME, "UDName") } -IfdEstablishContext::IfdEstablishContext(const QString& pProtocol, const QString& pUdName) +IfdEstablishContext::IfdEstablishContext(const IfdVersion& pProtocol, const QString& pUdName) : RemoteMessage(RemoteCardMessageType::IFDEstablishContext) , mProtocol(pProtocol) , mUdName(pUdName) @@ -32,18 +32,25 @@ IfdEstablishContext::IfdEstablishContext(const QString& pProtocol, const QString IfdEstablishContext::IfdEstablishContext(const QJsonObject& pMessageObject) : RemoteMessage(pMessageObject) - , mProtocol(getStringValue(pMessageObject, PROTOCOL())) + , mProtocolRaw(getStringValue(pMessageObject, PROTOCOL())) + , mProtocol(IfdVersion(mProtocolRaw)) , mUdName(getStringValue(pMessageObject, UD_NAME())) { } -const QString& IfdEstablishContext::getProtocol() const +const IfdVersion& IfdEstablishContext::getProtocol() const { return mProtocol; } +const QString& IfdEstablishContext::getProtocolRaw() const +{ + return mProtocolRaw; +} + + const QString& IfdEstablishContext::getUdName() const { return mUdName; @@ -53,7 +60,7 @@ const QString& IfdEstablishContext::getUdName() const QJsonDocument IfdEstablishContext::toJson(const QString& pContextHandle) const { QJsonObject result = createMessageBody(pContextHandle); - result[PROTOCOL()] = mProtocol; + result[PROTOCOL()] = mProtocol.toString(); result[UD_NAME()] = mUdName; return QJsonDocument(result); } diff --git a/src/remote_device/messages/IfdEstablishContext.h b/src/remote_device/messages/IfdEstablishContext.h index f88181313..8dedcb455 100644 --- a/src/remote_device/messages/IfdEstablishContext.h +++ b/src/remote_device/messages/IfdEstablishContext.h @@ -1,10 +1,11 @@ /*! - * \copyright Copyright (c) 2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2017-2018 Governikus GmbH & Co. KG, Germany */ #pragma once #include "DeviceInfo.h" +#include "IfdVersion.h" #include "RemoteMessage.h" #include @@ -17,15 +18,17 @@ class IfdEstablishContext : public RemoteMessage { private: - QString mProtocol; + QString mProtocolRaw; + IfdVersion mProtocol; QString mUdName; public: - IfdEstablishContext(const QString& pProtocol, const QString& pUdName); + IfdEstablishContext(const IfdVersion& pProtocol, const QString& pUdName); IfdEstablishContext(const QJsonObject& pMessageObject); virtual ~IfdEstablishContext() override = default; - const QString& getProtocol() const; + const IfdVersion& getProtocol() const; + const QString& getProtocolRaw() const; const QString& getUdName() const; virtual QJsonDocument toJson(const QString& pContextHandle) const override; }; diff --git a/src/remote_device/messages/IfdEstablishContextResponse.cpp b/src/remote_device/messages/IfdEstablishContextResponse.cpp index 7c8db0ac0..f1615a6f2 100644 --- a/src/remote_device/messages/IfdEstablishContextResponse.cpp +++ b/src/remote_device/messages/IfdEstablishContextResponse.cpp @@ -1,5 +1,5 @@ /*! - * \copyright Copyright (c) 2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2017-2018 Governikus GmbH & Co. KG, Germany */ diff --git a/src/remote_device/messages/IfdEstablishContextResponse.h b/src/remote_device/messages/IfdEstablishContextResponse.h index 8ac311acb..5d656575d 100644 --- a/src/remote_device/messages/IfdEstablishContextResponse.h +++ b/src/remote_device/messages/IfdEstablishContextResponse.h @@ -1,5 +1,5 @@ /*! - * \copyright Copyright (c) 2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2017-2018 Governikus GmbH & Co. KG, Germany */ #pragma once diff --git a/src/remote_device/messages/IfdEstablishPaceChannel.cpp b/src/remote_device/messages/IfdEstablishPaceChannel.cpp index 7ab254845..9347af873 100644 --- a/src/remote_device/messages/IfdEstablishPaceChannel.cpp +++ b/src/remote_device/messages/IfdEstablishPaceChannel.cpp @@ -1,5 +1,5 @@ /*! - * \copyright Copyright (c) 2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2017-2018 Governikus GmbH & Co. KG, Germany */ #include "IfdEstablishPaceChannel.h" diff --git a/src/remote_device/messages/IfdEstablishPaceChannel.h b/src/remote_device/messages/IfdEstablishPaceChannel.h index d2cc48b36..6aa229eb7 100644 --- a/src/remote_device/messages/IfdEstablishPaceChannel.h +++ b/src/remote_device/messages/IfdEstablishPaceChannel.h @@ -1,5 +1,5 @@ /*! - * \copyright Copyright (c) 2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2017-2018 Governikus GmbH & Co. KG, Germany */ #pragma once diff --git a/src/remote_device/messages/IfdEstablishPaceChannelResponse.cpp b/src/remote_device/messages/IfdEstablishPaceChannelResponse.cpp index f98100fdf..8eabbdeb7 100644 --- a/src/remote_device/messages/IfdEstablishPaceChannelResponse.cpp +++ b/src/remote_device/messages/IfdEstablishPaceChannelResponse.cpp @@ -1,5 +1,5 @@ /*! - * \copyright Copyright (c) 2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2017-2018 Governikus GmbH & Co. KG, Germany */ #include "IfdEstablishPaceChannelResponse.h" diff --git a/src/remote_device/messages/IfdEstablishPaceChannelResponse.h b/src/remote_device/messages/IfdEstablishPaceChannelResponse.h index 9629113bd..ba36c48a0 100644 --- a/src/remote_device/messages/IfdEstablishPaceChannelResponse.h +++ b/src/remote_device/messages/IfdEstablishPaceChannelResponse.h @@ -1,5 +1,5 @@ /*! - * \copyright Copyright (c) 2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2017-2018 Governikus GmbH & Co. KG, Germany */ #pragma once diff --git a/src/remote_device/messages/IfdModifyPin.cpp b/src/remote_device/messages/IfdModifyPin.cpp new file mode 100644 index 000000000..51791d0df --- /dev/null +++ b/src/remote_device/messages/IfdModifyPin.cpp @@ -0,0 +1,65 @@ +/*! + * \copyright Copyright (c) 2018 Governikus GmbH & Co. KG, Germany + */ + +#include "IfdModifyPin.h" + +#include +#include + + +Q_DECLARE_LOGGING_CATEGORY(remote_device) + + +using namespace governikus; + + +namespace +{ +VALUE_NAME(SLOT_HANDLE, "SlotHandle") +VALUE_NAME(INPUT_DATA, "InputData") +} + + +IfdModifyPin::IfdModifyPin(const QString& pSlotHandle, const QByteArray& pInputData) + : RemoteMessage(RemoteCardMessageType::IFDModifyPIN) + , mSlotHandle(pSlotHandle) + , mInputData(pInputData) +{ + +} + + +IfdModifyPin::IfdModifyPin(const QJsonObject& pMessageObject) + : RemoteMessage(pMessageObject) + , mSlotHandle() + , mInputData() +{ + mSlotHandle = getStringValue(pMessageObject, SLOT_HANDLE()); + + const QString& inputData = getStringValue(pMessageObject, INPUT_DATA()); + mInputData = QByteArray::fromHex(inputData.toUtf8()); +} + + +const QString& IfdModifyPin::getSlotHandle() const +{ + return mSlotHandle; +} + + +const QByteArray& IfdModifyPin::getInputData() const +{ + return mInputData; +} + + +QJsonDocument IfdModifyPin::toJson(const QString& pContextHandle) const +{ + QJsonObject result = createMessageBody(pContextHandle); + + result[SLOT_HANDLE()] = mSlotHandle; + result[INPUT_DATA()] = QString::fromLatin1(mInputData.toHex()); + + return QJsonDocument(result); +} diff --git a/src/remote_device/messages/IfdModifyPin.h b/src/remote_device/messages/IfdModifyPin.h new file mode 100644 index 000000000..dafc0c323 --- /dev/null +++ b/src/remote_device/messages/IfdModifyPin.h @@ -0,0 +1,32 @@ +/*! + * \copyright Copyright (c) 2018 Governikus GmbH & Co. KG, Germany + */ + +#pragma once + +#include "RemoteMessage.h" + + +namespace governikus +{ + + +class IfdModifyPin + : public RemoteMessage +{ + private: + QString mSlotHandle; + QByteArray mInputData; + + public: + IfdModifyPin(const QString& pSlotHandle = QString(), const QByteArray& pInputData = QByteArray()); + IfdModifyPin(const QJsonObject& pMessageObject); + virtual ~IfdModifyPin() override = default; + + const QString& getSlotHandle() const; + const QByteArray& getInputData() const; + virtual QJsonDocument toJson(const QString& pContextHandle) const override; +}; + + +} /* namespace governikus */ diff --git a/src/remote_device/messages/IfdModifyPinResponse.cpp b/src/remote_device/messages/IfdModifyPinResponse.cpp new file mode 100644 index 000000000..da88d33ae --- /dev/null +++ b/src/remote_device/messages/IfdModifyPinResponse.cpp @@ -0,0 +1,97 @@ +/*! + * \copyright Copyright (c) 2018 Governikus GmbH & Co. KG, Germany + */ + +#include "IfdModifyPinResponse.h" + +#include +#include + + +Q_DECLARE_LOGGING_CATEGORY(remote_device) + + +using namespace governikus; + + +namespace +{ +VALUE_NAME(SLOT_HANDLE, "SlotHandle") +VALUE_NAME(OUTPUT_DATA, "OutputData") +} + + +IfdModifyPinResponse::IfdModifyPinResponse(const QString& pSlotHandle, const QByteArray& pOutputData, const QString& pResultMinor) + : RemoteMessageResponse(RemoteCardMessageType::IFDModifyPINResponse, pResultMinor) + , mSlotHandle(pSlotHandle) + , mOutputData(pOutputData) +{ +} + + +IfdModifyPinResponse::IfdModifyPinResponse(const QJsonObject& pMessageObject) + : RemoteMessageResponse(pMessageObject) + , mSlotHandle() + , mOutputData() +{ + mSlotHandle = getStringValue(pMessageObject, SLOT_HANDLE()); + + const QString& inputData = getStringValue(pMessageObject, OUTPUT_DATA()); + mOutputData = QByteArray::fromHex(inputData.toUtf8()); +} + + +const QString& IfdModifyPinResponse::getSlotHandle() const +{ + return mSlotHandle; +} + + +const QByteArray& IfdModifyPinResponse::getOutputData() const +{ + return mOutputData; +} + + +CardReturnCode IfdModifyPinResponse::getReturnCode() const +{ + if (!resultHasError()) + { + return CardReturnCode::OK; + } + + const auto& minor = getResultMinor(); + if (minor == QLatin1String("http://www.bsi.bund.de/ecard/api/1.1/resultminor/ifdl/common#timeoutError")) + { + return CardReturnCode::INPUT_TIME_OUT; + } + if (minor == QLatin1String("http://www.bsi.bund.de/ecard/api/1.1/resultminor/ifdl#cancellationByUser")) + { + return CardReturnCode::CANCELLATION_BY_USER; + } + if (minor == QLatin1String("http://www.bsi.bund.de/ecard/api/1.1/resultminor/ifdl/IO#repeatedDataMismatch")) + { + return CardReturnCode::NEW_PIN_MISMATCH; + } + if (minor == QLatin1String("http://www.bsi.bund.de/ecard/api/1.1/resultminor/ifdl/IO#unknownPINFormat")) + { + return CardReturnCode::NEW_PIN_INVALID_LENGTH; + } + if (minor == QLatin1String("http://www.bsi.bund.de/ecard/api/1.1/resultminor/al/common#unknownError")) + { + return CardReturnCode::UNKNOWN; + } + + return CardReturnCode::COMMAND_FAILED; +} + + +QJsonDocument IfdModifyPinResponse::toJson(const QString& pContextHandle) const +{ + QJsonObject result = createMessageBody(pContextHandle); + + result[SLOT_HANDLE()] = mSlotHandle; + result[OUTPUT_DATA()] = QString::fromLatin1(mOutputData.toHex()); + + return QJsonDocument(result); +} diff --git a/src/remote_device/messages/IfdModifyPinResponse.h b/src/remote_device/messages/IfdModifyPinResponse.h new file mode 100644 index 000000000..0d41af34e --- /dev/null +++ b/src/remote_device/messages/IfdModifyPinResponse.h @@ -0,0 +1,32 @@ +/*! + * \copyright Copyright (c) 2018 Governikus GmbH & Co. KG, Germany + */ + +#pragma once + +#include "CardReturnCode.h" +#include "RemoteMessageResponse.h" + + +namespace governikus +{ +class IfdModifyPinResponse + : public RemoteMessageResponse +{ + private: + QString mSlotHandle; + QByteArray mOutputData; + + public: + IfdModifyPinResponse(const QString& pSlotHandle, const QByteArray& pOutputData, const QString& pResultMinor = QString()); + IfdModifyPinResponse(const QJsonObject& pMessageObject); + virtual ~IfdModifyPinResponse() override = default; + + const QString& getSlotHandle() const; + const QByteArray& getOutputData() const; + CardReturnCode getReturnCode() const; + virtual QJsonDocument toJson(const QString& pContextHandle) const override; +}; + + +} /* namespace governikus */ diff --git a/src/remote_device/messages/IfdStatus.cpp b/src/remote_device/messages/IfdStatus.cpp index 46b0236f5..f6a85f245 100644 --- a/src/remote_device/messages/IfdStatus.cpp +++ b/src/remote_device/messages/IfdStatus.cpp @@ -1,5 +1,5 @@ /*! - * \copyright Copyright (c) 2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2017-2018 Governikus GmbH & Co. KG, Germany */ diff --git a/src/remote_device/messages/IfdStatus.h b/src/remote_device/messages/IfdStatus.h index 3bd9743ac..bc70c674d 100644 --- a/src/remote_device/messages/IfdStatus.h +++ b/src/remote_device/messages/IfdStatus.h @@ -1,7 +1,7 @@ /*! * \brief Classes that model the IFDStatus message. * - * \copyright Copyright (c) 2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2017-2018 Governikus GmbH & Co. KG, Germany */ #pragma once diff --git a/src/remote_device/messages/IfdTransmit.cpp b/src/remote_device/messages/IfdTransmit.cpp index 98064655a..d7469a839 100644 --- a/src/remote_device/messages/IfdTransmit.cpp +++ b/src/remote_device/messages/IfdTransmit.cpp @@ -1,5 +1,5 @@ /*! - * \copyright Copyright (c) 2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2017-2018 Governikus GmbH & Co. KG, Germany */ diff --git a/src/remote_device/messages/IfdTransmit.h b/src/remote_device/messages/IfdTransmit.h index 507552224..80a9c907e 100644 --- a/src/remote_device/messages/IfdTransmit.h +++ b/src/remote_device/messages/IfdTransmit.h @@ -1,5 +1,5 @@ /*! - * \copyright Copyright (c) 2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2017-2018 Governikus GmbH & Co. KG, Germany */ #pragma once diff --git a/src/remote_device/messages/IfdTransmitResponse.cpp b/src/remote_device/messages/IfdTransmitResponse.cpp index e439c3c6b..6d0f2ed38 100644 --- a/src/remote_device/messages/IfdTransmitResponse.cpp +++ b/src/remote_device/messages/IfdTransmitResponse.cpp @@ -1,5 +1,5 @@ /*! - * \copyright Copyright (c) 2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2017-2018 Governikus GmbH & Co. KG, Germany */ diff --git a/src/remote_device/messages/IfdTransmitResponse.h b/src/remote_device/messages/IfdTransmitResponse.h index d16c4ed4b..20212b4ef 100644 --- a/src/remote_device/messages/IfdTransmitResponse.h +++ b/src/remote_device/messages/IfdTransmitResponse.h @@ -1,5 +1,5 @@ /*! - * \copyright Copyright (c) 2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2017-2018 Governikus GmbH & Co. KG, Germany */ #pragma once diff --git a/src/remote_device/messages/IfdVersion.cpp b/src/remote_device/messages/IfdVersion.cpp new file mode 100644 index 000000000..f9f989a6d --- /dev/null +++ b/src/remote_device/messages/IfdVersion.cpp @@ -0,0 +1,119 @@ +/*! + * \copyright Copyright (c) 2018 Governikus GmbH & Co. KG, Germany + */ + + +#include "IfdVersion.h" + + +using namespace governikus; + + +IfdVersion::IfdVersion(IfdVersion::Version pVersion) + : mVersion(pVersion) +{ +} + + +IfdVersion::IfdVersion(const QString& pVersionString) + : IfdVersion(fromString(pVersionString).getVersion()) +{ +} + + +bool IfdVersion::isValid() const +{ + return mVersion != Version::Unknown; +} + + +IfdVersion::Version IfdVersion::getVersion() const +{ + return mVersion; +} + + +QString IfdVersion::toString() const +{ + switch (mVersion) + { + case IfdVersion::Version::Unknown: + return QString(); + + case IfdVersion::Version::v0: + return QStringLiteral("IFDInterface_WebSocket_v0"); + } + + Q_UNREACHABLE(); +} + + +IfdVersion IfdVersion::fromString(const QString& pVersionString) +{ + const IfdVersion& v0 = Version::v0; + if (pVersionString == v0.toString()) + { + return v0; + } + + return Version::Unknown; +} + + +IfdVersion IfdVersion::latest() +{ + return Version::v0; +} + + +QVector IfdVersion::supported() +{ + return { + Version::v0 + }; +} + + +IfdVersion IfdVersion::selectLatestSupported(const QVector& pVersions) +{ + QVector supported; + supported += IfdVersion::Version::Unknown; + + for (const IfdVersion version : pVersions) + { + if (version.isSupported()) + { + supported += version.getVersion(); + } + } + + Q_ASSERT(!supported.isEmpty()); + return supported.last(); +} + + +bool IfdVersion::isSupported() const +{ + const QVector& supportedVersions = supported(); + for (const auto& supportedVersion : supportedVersions) + { + if (mVersion == supportedVersion) + { + return true; + } + } + + return false; +} + + +bool IfdVersion::operator==(const IfdVersion& pOther) const +{ + return mVersion == pOther.mVersion; +} + + +bool IfdVersion::operator!=(const IfdVersion& pOther) const +{ + return !(*this == pOther); +} diff --git a/src/remote_device/messages/IfdVersion.h b/src/remote_device/messages/IfdVersion.h new file mode 100644 index 000000000..3a144dfa7 --- /dev/null +++ b/src/remote_device/messages/IfdVersion.h @@ -0,0 +1,52 @@ +/*! + * \copyright Copyright (c) 2018 Governikus GmbH & Co. KG, Germany + */ + +#pragma once + +#include +#include +#include + +namespace governikus +{ +class IfdVersion +{ + public: + enum class Version : int + { + Unknown = -1, + v0 + }; + + private: + const Version mVersion; + + public: + IfdVersion(Version pVersion); + IfdVersion(const QString& pVersionString); + + Version getVersion() const; + bool isValid() const; + bool isSupported() const; + + bool operator==(const IfdVersion& pOther) const; + bool operator!=(const IfdVersion& pOther) const; + + QString toString() const; + static IfdVersion fromString(const QString& pVersionString); + + static IfdVersion latest(); + static QVector supported(); + static IfdVersion selectLatestSupported(const QVector& pVersions); +}; + + +inline QDebug operator<<(QDebug pDbg, const IfdVersion& pVersion) +{ + pDbg << pVersion.toString(); + return pDbg; +} + + +} // namespace governikus diff --git a/src/remote_device/messages/MessageReceiver.cpp b/src/remote_device/messages/MessageReceiver.cpp index 775302099..6d7b34b0d 100644 --- a/src/remote_device/messages/MessageReceiver.cpp +++ b/src/remote_device/messages/MessageReceiver.cpp @@ -1,5 +1,5 @@ /*! - * \copyright Copyright (c) 2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2017-2018 Governikus GmbH & Co. KG, Germany */ #include "MessageReceiver.h" @@ -15,6 +15,8 @@ #include "IfdEstablishContextResponse.h" #include "IfdEstablishPaceChannel.h" #include "IfdEstablishPaceChannelResponse.h" +#include "IfdModifyPin.h" +#include "IfdModifyPinResponse.h" #include "IfdStatus.h" #include "IfdTransmit.h" #include "IfdTransmitResponse.h" @@ -101,6 +103,18 @@ void MessageReceiver::process(const QSharedPointer& pMessage) +{ + unprocessed(pMessage); +} + + +void MessageReceiver::process(const QSharedPointer& pMessage) +{ + unprocessed(pMessage); +} + + void MessageReceiver::unprocessed(const QSharedPointer& /*pMessage*/) { } @@ -205,6 +219,20 @@ void MessageReceiver::receive(const QSharedPointer& pMessag break; } + case RemoteCardMessageType::IFDModifyPIN: + { + const QSharedPointer castMessage = pMessage.dynamicCast(); + process(castMessage); + break; + } + + case RemoteCardMessageType::IFDModifyPINResponse: + { + const QSharedPointer castMessage = pMessage.dynamicCast(); + process(castMessage); + break; + } + case RemoteCardMessageType::UNDEFINED: { unprocessed(pMessage); diff --git a/src/remote_device/messages/MessageReceiver.h b/src/remote_device/messages/MessageReceiver.h index 281fef506..daf2f2963 100644 --- a/src/remote_device/messages/MessageReceiver.h +++ b/src/remote_device/messages/MessageReceiver.h @@ -1,5 +1,5 @@ /*! - * \copyright Copyright (c) 2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2017-2018 Governikus GmbH & Co. KG, Germany */ #pragma once @@ -24,6 +24,8 @@ class IfdTransmit; class IfdTransmitResponse; class IfdEstablishPaceChannel; class IfdEstablishPaceChannelResponse; +class IfdModifyPin; +class IfdModifyPinResponse; class RemoteDispatcher; class MessageReceiver @@ -47,6 +49,8 @@ class MessageReceiver virtual void process(const QSharedPointer& pMessage); virtual void process(const QSharedPointer& pMessage); virtual void process(const QSharedPointer& pMessage); + virtual void process(const QSharedPointer& pMessage); + virtual void process(const QSharedPointer& pMessage); virtual void unprocessed(const QSharedPointer& pMessage); diff --git a/src/remote_device/messages/RemoteMessage.cpp b/src/remote_device/messages/RemoteMessage.cpp index 350b08fab..5bc454b83 100644 --- a/src/remote_device/messages/RemoteMessage.cpp +++ b/src/remote_device/messages/RemoteMessage.cpp @@ -1,5 +1,5 @@ /*! - * \copyright Copyright (c) 2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2017-2018 Governikus GmbH & Co. KG, Germany */ diff --git a/src/remote_device/messages/RemoteMessage.h b/src/remote_device/messages/RemoteMessage.h index 4370edbd3..fdf23bb18 100644 --- a/src/remote_device/messages/RemoteMessage.h +++ b/src/remote_device/messages/RemoteMessage.h @@ -1,7 +1,7 @@ /*! * \brief Classes that model remote card reader messages. * - * \copyright Copyright (c) 2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2017-2018 Governikus GmbH & Co. KG, Germany */ #pragma once @@ -35,6 +35,8 @@ defineEnumType(RemoteCardMessageType, IFDTransmitResponse, IFDEstablishPACEChannel, IFDEstablishPACEChannelResponse, + IFDModifyPIN, + IFDModifyPINResponse, UNDEFINED) diff --git a/src/remote_device/messages/RemoteMessageParser.cpp b/src/remote_device/messages/RemoteMessageParser.cpp index 10d459324..9aa8cd73e 100644 --- a/src/remote_device/messages/RemoteMessageParser.cpp +++ b/src/remote_device/messages/RemoteMessageParser.cpp @@ -1,5 +1,5 @@ /*! - * \copyright Copyright (c) 2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2017-2018 Governikus GmbH & Co. KG, Germany */ @@ -16,6 +16,8 @@ #include "messages/IfdEstablishContextResponse.h" #include "messages/IfdEstablishPaceChannel.h" #include "messages/IfdEstablishPaceChannelResponse.h" +#include "messages/IfdModifyPin.h" +#include "messages/IfdModifyPinResponse.h" #include "messages/IfdStatus.h" #include "messages/IfdTransmit.h" #include "messages/IfdTransmitResponse.h" @@ -101,6 +103,12 @@ static QSharedPointer parseMessage(const QJsonObject& pJson case RemoteCardMessageType::IFDEstablishPACEChannelResponse: return QSharedPointer(new IfdEstablishPaceChannelResponse(pJsonObject)); + case RemoteCardMessageType::IFDModifyPIN: + return QSharedPointer(new IfdModifyPin(pJsonObject)); + + case RemoteCardMessageType::IFDModifyPINResponse: + return QSharedPointer(new IfdModifyPinResponse(pJsonObject)); + case RemoteCardMessageType::UNDEFINED: return fail(QStringLiteral("Unknown RemoteMessage received")); } @@ -177,7 +185,17 @@ QSharedPointer RemoteMessageParser::parseDiscovery(const QJsonD qCWarning(remote_device) << "The value of \"availableApiLevels\" should be of type string array"; return QSharedPointer(); } - const QStringList& availableApiLevels = parseArrayOfString(supportedApisValue.toArray()); + const QStringList& availableApiLevelStrings = parseArrayOfString(supportedApisValue.toArray()); + + QVector availableApiLevels; + for (const QString& levelString : availableApiLevelStrings) + { + const IfdVersion& level = IfdVersion::fromString(levelString); + if (level.isValid()) + { + availableApiLevels += level.getVersion(); + } + } return QSharedPointer(new Discovery(idfName, ifdId, port, availableApiLevels)); } diff --git a/src/remote_device/messages/RemoteMessageParser.h b/src/remote_device/messages/RemoteMessageParser.h index 639de00f6..3e42125f6 100644 --- a/src/remote_device/messages/RemoteMessageParser.h +++ b/src/remote_device/messages/RemoteMessageParser.h @@ -1,7 +1,7 @@ /*! * \brief Class for parsing JSON data to remote card message objects. * - * \copyright Copyright (c) 2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2017-2018 Governikus GmbH & Co. KG, Germany */ #pragma once diff --git a/src/remote_device/messages/RemoteMessageResponse.cpp b/src/remote_device/messages/RemoteMessageResponse.cpp index 1b9936c0c..27e0c4d0e 100644 --- a/src/remote_device/messages/RemoteMessageResponse.cpp +++ b/src/remote_device/messages/RemoteMessageResponse.cpp @@ -1,5 +1,5 @@ /*! - * \copyright Copyright (c) 2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2017-2018 Governikus GmbH & Co. KG, Germany */ diff --git a/src/remote_device/messages/RemoteMessageResponse.h b/src/remote_device/messages/RemoteMessageResponse.h index c46cda0b5..abbabc2ab 100644 --- a/src/remote_device/messages/RemoteMessageResponse.h +++ b/src/remote_device/messages/RemoteMessageResponse.h @@ -1,7 +1,7 @@ /*! * \brief Classes that model remote card reader response messages. * - * \copyright Copyright (c) 2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2017-2018 Governikus GmbH & Co. KG, Germany */ #pragma once diff --git a/src/secure_storage/SecureStorage.cpp b/src/secure_storage/SecureStorage.cpp index dbbfd187b..dcf115ddc 100644 --- a/src/secure_storage/SecureStorage.cpp +++ b/src/secure_storage/SecureStorage.cpp @@ -1,5 +1,5 @@ /*! - * \copyright Copyright (c) 2014-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2014-2018 Governikus GmbH & Co. KG, Germany */ @@ -45,8 +45,6 @@ CONFIG_NAME(CONFIGURATION_GROUP_NAME_MIN_EPHEMERAL_KEY_SIZES, "minEphemeralKeySi CONFIG_NAME(CONFIGURATION_GROUP_NAME_SELF_AUTHENTICATION, "selfAuthentication") CONFIG_NAME(CONFIGURATION_NAME_SELF_AUTHENTICATION_URL, "url") CONFIG_NAME(CONFIGURATION_NAME_SELF_AUTHENTICATION_TEST_URL, "testUrl") -CONFIG_NAME(CONFIGURATION_NAME_SELF_AUTHENTICATION_CERTDESCR, "certDescr") -CONFIG_NAME(CONFIGURATION_NAME_SELF_AUTHENTICATION_TEST_CERTDESCR, "testCertDescr") CONFIG_NAME(CONFIGURATION_GROUP_NAME_UPDATE_SERVER, "updateServer") CONFIG_NAME(CONFIGURATION_NAME_UPDATE_SERVER_BASE_URL, "baseUrl") @@ -67,8 +65,6 @@ SecureStorage::SecureStorage() , mSelfAuthenticationUrl() , mSelfAuthenticationTestUrl() , mUpdateServerBaseUrl() - , mSelfAuthenticationCertDescr() - , mSelfAuthenticationTestCertDescr() , mAppcastUpdateUrl() , mAppcastBetaUpdateUrl() , mTlsConfig() @@ -175,8 +171,6 @@ void SecureStorage::load() mSelfAuthenticationUrl = readGroup(config, CONFIGURATION_GROUP_NAME_SELF_AUTHENTICATION(), CONFIGURATION_NAME_SELF_AUTHENTICATION_URL()); mSelfAuthenticationTestUrl = readGroup(config, CONFIGURATION_GROUP_NAME_SELF_AUTHENTICATION(), CONFIGURATION_NAME_SELF_AUTHENTICATION_TEST_URL()); - mSelfAuthenticationCertDescr = readGroup(config, CONFIGURATION_GROUP_NAME_SELF_AUTHENTICATION(), CONFIGURATION_NAME_SELF_AUTHENTICATION_CERTDESCR()).toLatin1(); - mSelfAuthenticationTestCertDescr = readGroup(config, CONFIGURATION_GROUP_NAME_SELF_AUTHENTICATION(), CONFIGURATION_NAME_SELF_AUTHENTICATION_TEST_CERTDESCR()).toLatin1(); mUpdateServerBaseUrl = readGroup(config, CONFIGURATION_GROUP_NAME_UPDATE_SERVER(), CONFIGURATION_NAME_UPDATE_SERVER_BASE_URL()); @@ -206,12 +200,6 @@ const QUrl& SecureStorage::getSelfAuthenticationUrl(bool pTest) const } -const QByteArray& SecureStorage::getSelfAuthenticationCertDescr(bool pTest) const -{ - return pTest ? mSelfAuthenticationTestCertDescr : mSelfAuthenticationCertDescr; -} - - const QUrl& SecureStorage::getUpdateServerBaseUrl() const { return mUpdateServerBaseUrl; diff --git a/src/secure_storage/SecureStorage.h b/src/secure_storage/SecureStorage.h index bbeefc709..3798a0b45 100644 --- a/src/secure_storage/SecureStorage.h +++ b/src/secure_storage/SecureStorage.h @@ -2,7 +2,7 @@ * \brief Utility class that provides access to the "secure storage" of the application, which contains * the certificates for preverification and update checks. * - * \copyright Copyright (c) 2014-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2014-2018 Governikus GmbH & Co. KG, Germany */ #pragma once @@ -40,8 +40,6 @@ class SecureStorage QUrl mSelfAuthenticationUrl; QUrl mSelfAuthenticationTestUrl; QUrl mUpdateServerBaseUrl; - QByteArray mSelfAuthenticationCertDescr; - QByteArray mSelfAuthenticationTestCertDescr; QUrl mAppcastUpdateUrl; QUrl mAppcastBetaUpdateUrl; @@ -71,7 +69,6 @@ class SecureStorage const QByteArrayList& getCVRootCertificates(bool pProductive) const; const QVector& getUpdateCertificates() const; const QUrl& getSelfAuthenticationUrl(bool pTest = false) const; - const QByteArray& getSelfAuthenticationCertDescr(bool pTest = false) const; const QUrl& getUpdateServerBaseUrl() const; const QUrl& getAppcastUpdateUrl() const; const QUrl& getAppcastBetaUpdateUrl() const; diff --git a/src/secure_storage/TlsConfiguration.cpp b/src/secure_storage/TlsConfiguration.cpp index 19a3dcd2a..cc63cb421 100644 --- a/src/secure_storage/TlsConfiguration.cpp +++ b/src/secure_storage/TlsConfiguration.cpp @@ -1,5 +1,5 @@ /*! - * \copyright Copyright (c) 2016-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2016-2018 Governikus GmbH & Co. KG, Germany */ #include "TlsConfiguration.h" @@ -88,6 +88,7 @@ void TlsConfiguration::load(const QJsonObject& pConfig) const auto& signatureAlgorithms = readSignatureAlgorithms(pConfig, SETTINGS_GROUP_NAME_SIGNATURE_ALGORITHMS); mConfiguration = QSslConfiguration::defaultConfiguration(); + mConfiguration.setSslOption(QSsl::SslOptionDisableSessionPersistence, false); // enable SessionTicket, otherwise "sessionTicket()" returns empty data mConfiguration.setCaCertificates(QList()); // disable fetching of system CA certificates. Set allowRootCertOnDemandLoading to false in Qt mConfiguration.setProtocol(protocolVersion); mConfiguration.setCiphers(ciphers); diff --git a/src/secure_storage/TlsConfiguration.h b/src/secure_storage/TlsConfiguration.h index e3a60f4ad..22816a55e 100644 --- a/src/secure_storage/TlsConfiguration.h +++ b/src/secure_storage/TlsConfiguration.h @@ -1,7 +1,7 @@ /*! * \brief Configuration options for TLS channels * - * \copyright Copyright (c) 2016-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2016-2018 Governikus GmbH & Co. KG, Germany */ #pragma once diff --git a/src/services/AppUpdateData.cpp b/src/services/AppUpdateData.cpp index 3e0837620..50d3024b4 100644 --- a/src/services/AppUpdateData.cpp +++ b/src/services/AppUpdateData.cpp @@ -1,5 +1,5 @@ /*! - * \copyright Copyright (c) 2016-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2016-2018 Governikus GmbH & Co. KG, Germany */ #include "AppUpdateData.h" diff --git a/src/services/AppUpdateData.h b/src/services/AppUpdateData.h index a584b9e3b..0e472d0d6 100644 --- a/src/services/AppUpdateData.h +++ b/src/services/AppUpdateData.h @@ -1,7 +1,7 @@ /*! * \brief Update data implementation for application version. * - * \copyright Copyright (c) 2016-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2016-2018 Governikus GmbH & Co. KG, Germany */ #pragma once diff --git a/src/services/AppUpdater.cpp b/src/services/AppUpdater.cpp index ad911dbe5..fd4669716 100644 --- a/src/services/AppUpdater.cpp +++ b/src/services/AppUpdater.cpp @@ -1,5 +1,5 @@ /*! - * \copyright Copyright (c) 2016-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2016-2018 Governikus GmbH & Co. KG, Germany */ #include "AppUpdater.h" diff --git a/src/services/AppUpdater.h b/src/services/AppUpdater.h index 1b5fc0c22..3ea01a530 100644 --- a/src/services/AppUpdater.h +++ b/src/services/AppUpdater.h @@ -1,5 +1,5 @@ /*! - * \copyright Copyright (c) 2016-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2016-2018 Governikus GmbH & Co. KG, Germany */ #pragma once diff --git a/src/services/Service.cpp b/src/services/Service.cpp index bf111902c..665ffc955 100644 --- a/src/services/Service.cpp +++ b/src/services/Service.cpp @@ -1,5 +1,5 @@ /*! - * \copyright Copyright (c) 2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2017-2018 Governikus GmbH & Co. KG, Germany */ #include "Service.h" diff --git a/src/services/Service.h b/src/services/Service.h index 9e118c3af..8bd6651d7 100644 --- a/src/services/Service.h +++ b/src/services/Service.h @@ -1,5 +1,5 @@ /*! - * \copyright Copyright (c) 2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2017-2018 Governikus GmbH & Co. KG, Germany */ #pragma once diff --git a/src/settings/AbstractSettings.cpp b/src/settings/AbstractSettings.cpp index 8f5e234bb..6d2783b12 100644 --- a/src/settings/AbstractSettings.cpp +++ b/src/settings/AbstractSettings.cpp @@ -1,5 +1,5 @@ /*! - * \copyright Copyright (c) 2014-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2014-2018 Governikus GmbH & Co. KG, Germany */ diff --git a/src/settings/AbstractSettings.h b/src/settings/AbstractSettings.h index fcd45e75c..a0a5f5c63 100644 --- a/src/settings/AbstractSettings.h +++ b/src/settings/AbstractSettings.h @@ -1,5 +1,5 @@ /*! - * \copyright Copyright (c) 2014-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2014-2018 Governikus GmbH & Co. KG, Germany */ #pragma once diff --git a/src/settings/AppSettings.cpp b/src/settings/AppSettings.cpp index b69b838a8..916af6d20 100644 --- a/src/settings/AppSettings.cpp +++ b/src/settings/AppSettings.cpp @@ -1,5 +1,5 @@ /*! - * \copyright Copyright (c) 2014-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2014-2018 Governikus GmbH & Co. KG, Germany */ #include "AppSettings.h" diff --git a/src/settings/AppSettings.h b/src/settings/AppSettings.h index a650d91c7..5fc77c701 100644 --- a/src/settings/AppSettings.h +++ b/src/settings/AppSettings.h @@ -1,7 +1,7 @@ /*! * \brief Contains the definition of the AppSettings class. * - * \copyright Copyright (c) 2014-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2014-2018 Governikus GmbH & Co. KG, Germany */ #pragma once diff --git a/src/settings/AutoStart.h b/src/settings/AutoStart.h index 4db37f149..02840377a 100644 --- a/src/settings/AutoStart.h +++ b/src/settings/AutoStart.h @@ -1,5 +1,5 @@ /*! - * \copyright Copyright (c) 2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2017-2018 Governikus GmbH & Co. KG, Germany */ #pragma once diff --git a/src/settings/AutoStart_generic.cpp b/src/settings/AutoStart_generic.cpp index 47ce711bd..7b5170ca3 100644 --- a/src/settings/AutoStart_generic.cpp +++ b/src/settings/AutoStart_generic.cpp @@ -1,14 +1,15 @@ /*! - * \copyright Copyright (c) 2014-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2014-2018 Governikus GmbH & Co. KG, Germany */ #include "AutoStart.h" -#include +#include using namespace governikus; +Q_DECLARE_LOGGING_CATEGORY(settings) bool AutoStart::enabled() { @@ -20,6 +21,6 @@ void AutoStart::set(bool pEnabled) { if (pEnabled) { - qDebug() << "Autostart not supported on this system"; + qCDebug(settings) << "Autostart not supported on this system"; } } diff --git a/src/settings/AutoStart_osx.cpp b/src/settings/AutoStart_osx.cpp index cd56f3b65..5da987a10 100644 --- a/src/settings/AutoStart_osx.cpp +++ b/src/settings/AutoStart_osx.cpp @@ -1,11 +1,11 @@ /*! - * \copyright Copyright (c) 2014-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2014-2018 Governikus GmbH & Co. KG, Germany */ #include "AutoStart.h" #include -#include +#include #include #import @@ -13,10 +13,11 @@ using namespace governikus; +Q_DECLARE_LOGGING_CATEGORY(settings) static bool checkAndRemoveAutoStart(bool pRemove) { - qDebug() << "Loading OSX login items"; + qCDebug(settings) << "Loading OSX login items"; QRegularExpression regex("/Contents/Resources$"); NSString* appPath = QCoreApplication::applicationDirPath().remove(regex).toNSString(); @@ -58,7 +59,7 @@ static bool checkAndRemoveAutoStart(bool pRemove) if (displayName.startsWith(QCoreApplication::applicationName())) { LSSharedFileListItemRemove(loginItems, itemRef); - qDebug() << "Removed the unresolvable application with diplay name" << displayName << "from OSX login items."; + qCDebug(settings) << "Removed the unresolvable application with diplay name" << displayName << "from OSX login items."; } } } diff --git a/src/settings/AutoStart_win.cpp b/src/settings/AutoStart_win.cpp index 5ddf214ac..5950a43da 100644 --- a/src/settings/AutoStart_win.cpp +++ b/src/settings/AutoStart_win.cpp @@ -1,5 +1,5 @@ /*! - * \copyright Copyright (c) 2014-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2014-2018 Governikus GmbH & Co. KG, Germany */ #include "AutoStart.h" @@ -8,26 +8,54 @@ #include #include - using namespace governikus; +namespace +{ + +static QString appPath() +{ + QString applicationFilePath = QCoreApplication::applicationFilePath(); + applicationFilePath.replace(QLatin1Char('/'), QLatin1Char('\\')); + applicationFilePath = QLatin1Char('"') + applicationFilePath + QLatin1Char('"'); + return applicationFilePath; +} + + +static QString registryPath() +{ + return QStringLiteral("HKEY_CURRENT_USER\\Software\\Microsoft\\Windows\\CurrentVersion\\Run"); +} + + +} bool AutoStart::enabled() { - QSettings windowsBootUpSettings("HKEY_CURRENT_USER\\Software\\Microsoft\\Windows\\CurrentVersion\\Run", QSettings::NativeFormat); - return windowsBootUpSettings.contains(QCoreApplication::applicationName()); + QSettings windowsBootUpSettings(registryPath(), QSettings::NativeFormat); + if (!windowsBootUpSettings.contains(QCoreApplication::applicationName())) + { + return false; + } + + if (windowsBootUpSettings.value(QCoreApplication::applicationName(), QString()).toString() != appPath()) + { + // Update entries from previous versions, e.g. + // C:\Program Files (x86)\AusweisApp2 1.13.0 -> C:\Program Files (x86)\AusweisApp2 1.14.0 + set(true); + } + + return true; } void AutoStart::set(bool pEnabled) { - QSettings windowsBootUpSettings("HKEY_CURRENT_USER\\Software\\Microsoft\\Windows\\CurrentVersion\\Run", QSettings::NativeFormat); + QSettings windowsBootUpSettings(registryPath(), QSettings::NativeFormat); if (pEnabled) { - QString applicationFilePath = QCoreApplication::applicationFilePath(); - applicationFilePath.replace(QStringLiteral("/"), QString("\\")); - windowsBootUpSettings.setValue(QCoreApplication::applicationName(), "\"" + applicationFilePath + "\""); + windowsBootUpSettings.setValue(QCoreApplication::applicationName(), appPath()); } else { diff --git a/src/settings/GeneralSettings.cpp b/src/settings/GeneralSettings.cpp index 76139bb07..0c5ac1634 100644 --- a/src/settings/GeneralSettings.cpp +++ b/src/settings/GeneralSettings.cpp @@ -1,7 +1,7 @@ /*! * \brief Contains the method definitions of the GeneralSettings class. * - * \copyright Copyright (c) 2014-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2014-2018 Governikus GmbH & Co. KG, Germany */ #include "GeneralSettings.h" @@ -9,12 +9,14 @@ #include "AutoStart.h" #include -#include +#include #include using namespace governikus; +Q_DECLARE_LOGGING_CATEGORY(settings) + namespace { SETTINGS_NAME(SETTINGS_NAME_PERSISTENT_SETTINGS_VERSION, "persistentSettingsVersion") @@ -30,6 +32,7 @@ SETTINGS_NAME(SETTINGS_NAME_LANGUAGE, "language") SETTINGS_NAME(SETTINGS_GROUP_NAME_COMMON, "common") SETTINGS_NAME(SETTINGS_NAME_AUTO, "autoUpdateCheck") SETTINGS_NAME(SETTINGS_NAME_KEYLESS_PASSWORD, "keylessPassword") +SETTINGS_NAME(SETTINGS_NAME_LAST_READER_PLUGIN_TYPE, "lastTechnology") } GeneralSettings::GeneralSettings() @@ -205,7 +208,7 @@ bool GeneralSettings::isDeveloperMode() const const bool developerMode = mStoreGeneral->value(SETTINGS_NAME_DEVELOPER_MODE(), false).toBool(); if (developerMode && appIsBackgroundService()) { - qDebug() << "Running as a background service. Developer mode is disallowed."; + qCDebug(settings) << "Running as a background service. Developer mode is disallowed."; return false; } @@ -291,3 +294,19 @@ void GeneralSettings::setUseScreenKeyboard(bool pKeylessPassword) Q_EMIT fireSettingsChanged(); } } + + +QString GeneralSettings::getLastReaderPluginType() const +{ + return mStoreGeneral->value(SETTINGS_NAME_LAST_READER_PLUGIN_TYPE(), QString()).toString(); +} + + +void GeneralSettings::setLastReaderPluginType(const QString& pLastReaderPluginType) +{ + if (pLastReaderPluginType != getLastReaderPluginType()) + { + mStoreGeneral->setValue(SETTINGS_NAME_LAST_READER_PLUGIN_TYPE(), pLastReaderPluginType); + Q_EMIT fireSettingsChanged(); + } +} diff --git a/src/settings/GeneralSettings.h b/src/settings/GeneralSettings.h index 2cd46622e..1bfab5bc7 100644 --- a/src/settings/GeneralSettings.h +++ b/src/settings/GeneralSettings.h @@ -1,7 +1,7 @@ /*! * \brief Contains the definition of the GeneralSettings class. * - * \copyright Copyright (c) 2014-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2014-2018 Governikus GmbH & Co. KG, Germany */ #pragma once @@ -78,6 +78,9 @@ class GeneralSettings bool isUseScreenKeyboard() const; void setUseScreenKeyboard(bool pUseScreenKeyboard); + + QString getLastReaderPluginType() const; + void setLastReaderPluginType(const QString& pLastReaderPluginType); }; diff --git a/src/settings/HistoryInfo.cpp b/src/settings/HistoryInfo.cpp index 63eced183..25e5ed7e5 100644 --- a/src/settings/HistoryInfo.cpp +++ b/src/settings/HistoryInfo.cpp @@ -1,5 +1,5 @@ /*! - * \copyright Copyright (c) 2015-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2015-2018 Governikus GmbH & Co. KG, Germany */ #include "HistoryInfo.h" diff --git a/src/settings/HistoryInfo.h b/src/settings/HistoryInfo.h index 7d2c46a97..e4aab61c4 100644 --- a/src/settings/HistoryInfo.h +++ b/src/settings/HistoryInfo.h @@ -1,7 +1,7 @@ /*! * \brief Represents history settings. * - * \copyright Copyright (c) 2015-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2015-2018 Governikus GmbH & Co. KG, Germany */ #pragma once diff --git a/src/settings/HistorySettings.cpp b/src/settings/HistorySettings.cpp index e31b8c07d..bd2daa65a 100644 --- a/src/settings/HistorySettings.cpp +++ b/src/settings/HistorySettings.cpp @@ -1,10 +1,10 @@ /*! - * \copyright Copyright (c) 2015-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2015-2018 Governikus GmbH & Co. KG, Germany */ #include "HistorySettings.h" -#include +#include #include namespace @@ -22,6 +22,7 @@ SETTINGS_NAME(SETTINGS_NAME_CHRONIC_REQUESTED_DATA, "requestedData") using namespace governikus; +Q_DECLARE_LOGGING_CATEGORY(settings) HistorySettings::HistorySettings() : AbstractSettings() @@ -110,7 +111,7 @@ void HistorySettings::addHistoryInfo(const HistoryInfo& pHistoryInfo) { if (appIsBackgroundService()) { - qDebug() << "Running as a background service. Ignoring save request for history."; + qCDebug(settings) << "Running as a background service. Ignoring save request for history."; return; } @@ -120,7 +121,7 @@ void HistorySettings::addHistoryInfo(const HistoryInfo& pHistoryInfo) } -void HistorySettings::deleteSettings(const QDateTime& pLatestToKeep) +int HistorySettings::deleteSettings(const QDateTime& pLatestToKeep) { const auto historyInfos = getHistoryInfos(); QVector remainingItems; @@ -131,5 +132,41 @@ void HistorySettings::deleteSettings(const QDateTime& pLatestToKeep) remainingItems += item; } } + int numberOfItemsToRemove = historyInfos.size() - remainingItems.size(); setHistoryInfos(remainingItems); + return numberOfItemsToRemove; +} + + +int HistorySettings::deleteSettings(const TimePeriod& pPeriodToRemove) +{ + QDateTime latestToKeep = QDateTime::currentDateTime(); + switch (pPeriodToRemove) + { + case TimePeriod::PAST_HOUR: + latestToKeep = latestToKeep.addSecs(-60 * 60); + break; + + case TimePeriod::PAST_DAY: + latestToKeep = latestToKeep.addDays(-1); + break; + + case TimePeriod::PAST_WEEK: + latestToKeep = latestToKeep.addDays(-7); + break; + + case TimePeriod::LAST_FOUR_WEEKS: + latestToKeep = latestToKeep.addDays(-7 * 4); + break; + + case TimePeriod::ALL_HISTORY: + latestToKeep = QDateTime(); + break; + + case TimePeriod::UNKNOWN: + return 0; + } + + qCDebug(settings) << "Remove history entries until timestamp:" << latestToKeep; + return deleteSettings(latestToKeep); } diff --git a/src/settings/HistorySettings.h b/src/settings/HistorySettings.h index 358709745..41bc79599 100644 --- a/src/settings/HistorySettings.h +++ b/src/settings/HistorySettings.h @@ -1,13 +1,14 @@ /*! * \brief Represents history settings. * - * \copyright Copyright (c) 2015-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2015-2018 Governikus GmbH & Co. KG, Germany */ #pragma once #include "AbstractSettings.h" +#include "EnumHelper.h" #include "HistoryInfo.h" #include @@ -19,6 +20,15 @@ class test_HistorySettings; namespace governikus { +defineEnumType(TimePeriod, + PAST_HOUR, + PAST_DAY, + PAST_WEEK, + LAST_FOUR_WEEKS, + ALL_HISTORY, + UNKNOWN + ) + class HistorySettings : public AbstractSettings { @@ -41,7 +51,8 @@ class HistorySettings QVector getHistoryInfos() const; void setHistoryInfos(const QVector& pHistoryInfos); void addHistoryInfo(const HistoryInfo& pHistoryInfo); - void deleteSettings(const QDateTime& pLatestToKeep = QDateTime()); + int deleteSettings(const QDateTime& pLatestToKeep = QDateTime()); + int deleteSettings(const TimePeriod& pPeriodToRemove); Q_SIGNALS: void fireEnabledChanged(bool pValue); diff --git a/src/settings/KeyPair.cpp b/src/settings/KeyPair.cpp index 62acb5404..5ac33277c 100644 --- a/src/settings/KeyPair.cpp +++ b/src/settings/KeyPair.cpp @@ -1,5 +1,5 @@ /* - * \copyright Copyright (c) 2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2017-2018 Governikus GmbH & Co. KG, Germany */ @@ -12,11 +12,13 @@ #include #include -#include +#include #include using namespace governikus; +Q_DECLARE_LOGGING_CATEGORY(settings) + namespace { struct OpenSslCustomDeleter @@ -65,7 +67,7 @@ KeyPair KeyPair::generate() { if (!Randomizer::getInstance().isSecureRandom()) { - qCritical() << "Cannot get enough entropy"; + qCCritical(settings) << "Cannot get enough entropy"; return KeyPair(); } @@ -107,20 +109,20 @@ EVP_PKEY* KeyPair::createKey() if (pkey.isNull() || rsa.isNull() || exponent.isNull()) { - qCritical() << "Cannot create EVP_PKEY/RSA/BIGNUM structure"; + qCCritical(settings) << "Cannot create EVP_PKEY/RSA/BIGNUM structure"; return nullptr; } BN_set_word(exponent.data(), RSA_F4); if (!RSA_generate_key_ex(rsa.data(), 2048, exponent.data(), nullptr)) { - qCritical() << "Cannot generate rsa key"; + qCCritical(settings) << "Cannot generate rsa key"; return nullptr; } if (!EVP_PKEY_assign(pkey.data(), EVP_PKEY_RSA, rsa.data())) { - qCritical() << "Cannot assign rsa key"; + qCCritical(settings) << "Cannot assign rsa key"; return nullptr; } @@ -134,7 +136,7 @@ QSharedPointer KeyPair::createCertificate(EVP_PKEY* pPkey) QSharedPointer x509(X509_new(), &X509_free); if (x509.isNull()) { - qCritical() << "Cannot create X509 structure"; + qCCritical(settings) << "Cannot create X509 structure"; return nullptr; } @@ -159,7 +161,7 @@ QSharedPointer KeyPair::createCertificate(EVP_PKEY* pPkey) if (!X509_sign(x509.data(), pPkey, EVP_sha256())) { - qCritical() << "Cannot sign certificate"; + qCCritical(settings) << "Cannot sign certificate"; return nullptr; } diff --git a/src/settings/KeyPair.h b/src/settings/KeyPair.h index 24f899578..bbf4e28b1 100644 --- a/src/settings/KeyPair.h +++ b/src/settings/KeyPair.h @@ -1,7 +1,7 @@ /* * \brief Generates a new private/public key with an X509 certificate. * - * \copyright Copyright (c) 2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2017-2018 Governikus GmbH & Co. KG, Germany */ #pragma once diff --git a/src/settings/PreVerificationSettings.cpp b/src/settings/PreVerificationSettings.cpp index 355ed97a7..519e94772 100644 --- a/src/settings/PreVerificationSettings.cpp +++ b/src/settings/PreVerificationSettings.cpp @@ -1,5 +1,5 @@ /*! - * \copyright Copyright (c) 2014-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2014-2018 Governikus GmbH & Co. KG, Germany */ #include "PreVerificationSettings.h" diff --git a/src/settings/PreVerificationSettings.h b/src/settings/PreVerificationSettings.h index dc888514e..323fa7f2c 100644 --- a/src/settings/PreVerificationSettings.h +++ b/src/settings/PreVerificationSettings.h @@ -1,7 +1,7 @@ /*! * \brief Settings to handle PreVerification and the corresponding linked certificates. * - * \copyright Copyright (c) 2014-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2014-2018 Governikus GmbH & Co. KG, Germany */ #pragma once diff --git a/src/settings/RemoteServiceSettings.cpp b/src/settings/RemoteServiceSettings.cpp index ccb8d4f7b..4e85b77b5 100644 --- a/src/settings/RemoteServiceSettings.cpp +++ b/src/settings/RemoteServiceSettings.cpp @@ -1,5 +1,5 @@ /*! - * \copyright Copyright (c) 2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2017-2018 Governikus GmbH & Co. KG, Germany */ #include "RemoteServiceSettings.h" diff --git a/src/settings/RemoteServiceSettings.h b/src/settings/RemoteServiceSettings.h index cf7a072f6..a512d5190 100644 --- a/src/settings/RemoteServiceSettings.h +++ b/src/settings/RemoteServiceSettings.h @@ -1,7 +1,7 @@ /*! * \brief RemoteService settings * - * \copyright Copyright (c) 2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2017-2018 Governikus GmbH & Co. KG, Germany */ #pragma once diff --git a/src/websocket/UIPlugInWebSocket.cpp b/src/websocket/UIPlugInWebSocket.cpp index ba0240ef0..aa838eb77 100644 --- a/src/websocket/UIPlugInWebSocket.cpp +++ b/src/websocket/UIPlugInWebSocket.cpp @@ -1,5 +1,5 @@ /*! - * \copyright Copyright (c) 2016-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2016-2018 Governikus GmbH & Co. KG, Germany */ #include "UIPlugInWebSocket.h" diff --git a/src/websocket/UIPlugInWebSocket.h b/src/websocket/UIPlugInWebSocket.h index e008a5256..02e845b41 100644 --- a/src/websocket/UIPlugInWebSocket.h +++ b/src/websocket/UIPlugInWebSocket.h @@ -1,7 +1,7 @@ /*! * \brief UIPlugIn implementation of the Websocket. * - * \copyright Copyright (c) 2016-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2016-2018 Governikus GmbH & Co. KG, Germany */ #pragma once diff --git a/src/widget/AboutDialog.cpp b/src/widget/AboutDialog.cpp index ff4f81365..c13087ca1 100644 --- a/src/widget/AboutDialog.cpp +++ b/src/widget/AboutDialog.cpp @@ -1,5 +1,5 @@ /*! - * \copyright Copyright (c) 2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2017-2018 Governikus GmbH & Co. KG, Germany */ #include "AboutDialog.h" diff --git a/src/widget/AboutDialog.h b/src/widget/AboutDialog.h index ff280b63f..ff41afe4b 100644 --- a/src/widget/AboutDialog.h +++ b/src/widget/AboutDialog.h @@ -1,7 +1,7 @@ /*! * \brief Dialog to display information about the application * - * \copyright Copyright (c) 2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2017-2018 Governikus GmbH & Co. KG, Germany */ #pragma once diff --git a/src/widget/AboutDialog.ui b/src/widget/AboutDialog.ui index d41b30bea..2c3f7d456 100644 --- a/src/widget/AboutDialog.ui +++ b/src/widget/AboutDialog.ui @@ -106,7 +106,7 @@ - AusweisApp2 is a product of Governikus GmbH & Co. KG - on behalf of the Federal Ministry of the Interior. + AusweisApp2 is a product of Governikus GmbH & Co. KG - on behalf of the Federal Ministry of the Interior, Building and Community. Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop diff --git a/src/widget/AppQtGui.cpp b/src/widget/AppQtGui.cpp index a6a879e11..cc12a7408 100644 --- a/src/widget/AppQtGui.cpp +++ b/src/widget/AppQtGui.cpp @@ -1,5 +1,5 @@ /*! - * \copyright Copyright (c) 2014-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2014-2018 Governikus GmbH & Co. KG, Germany */ #include "AppQtGui.h" @@ -11,6 +11,8 @@ #include "generic/HelpAction.h" #include "GuiProfile.h" #include "NetworkManager.h" +#include "ReaderManager.h" +#include "RemoteClient.h" #include "Service.h" #include "SetupAssistantGui.h" #include "UpdateWindow.h" @@ -23,13 +25,10 @@ #include #include #include -#include #include #include #include #include -#include -#include #ifndef QT_NO_NETWORKPROXY #include @@ -57,9 +56,10 @@ AppQtGui::AppQtGui() , mSetupAssistantGui(nullptr) , mDiagnosisGui(nullptr) , mUpdateInfo(nullptr) + , mCertificateInfo(nullptr) , mAggressiveToForeground(false) { - initGuiProfile(); + loadStyleSheet(); mMainWidget = new AppQtMainWidget(); mMainWidget->setWindowIcon(mIcon); @@ -68,6 +68,16 @@ AppQtGui::AppQtGui() mUpdateInfo->setWindowTitle(QApplication::applicationName() + QStringLiteral(" - ") + tr("Updates")); mUpdateInfo->setWindowIcon(QIcon(QStringLiteral(":/images/npa.svg"))); mUpdateInfo->setWindowModality(Qt::WindowModal); + mUpdateInfo->setStandardButtons(QMessageBox::Ok); + mUpdateInfo->button(QMessageBox::Ok)->setFocus(); + + mCertificateInfo = new QMessageBox(mMainWidget); + mCertificateInfo->setWindowModality(Qt::ApplicationModal); + mCertificateInfo->setWindowFlags(mCertificateInfo->windowFlags() & ~Qt::WindowContextHelpButtonHint); + mCertificateInfo->setWindowTitle(QCoreApplication::applicationName() + QStringLiteral(" - ") + tr("Information")); + mCertificateInfo->setIconPixmap(mMainWidget->windowIcon().pixmap(QSize(48, 48))); + mCertificateInfo->setStandardButtons(QMessageBox::Ok); + mCertificateInfo->button(QMessageBox::Ok)->setFocus(); Service* service = Env::getSingleton(); connect(service, &Service::fireAppUpdateFinished, this, &AppQtGui::onAppUpdateReady); @@ -88,6 +98,7 @@ AppQtGui::~AppQtGui() } delete mUpdateInfo; + delete mCertificateInfo; delete mMainWidget; } @@ -139,6 +150,9 @@ void AppQtGui::onApplicationStarted() { QMetaObject::invokeMethod(this, "onDeveloperModeQuestion", Qt::QueuedConnection); } + + const QSharedPointer& remoteClient = Env::getSingleton()->getRemoteClient(); + connect(remoteClient.data(), &RemoteClient::fireCertificateRemoved, this, &AppQtGui::onCertificateRemoved); } @@ -219,7 +233,8 @@ void AppQtGui::onShowUserInformation(const QString& pInformationMessage) msgBox.setWindowTitle(QCoreApplication::applicationName() + QStringLiteral(" - ") + tr("Information")); msgBox.setIcon(QMessageBox::Information); msgBox.setText(pInformationMessage); - msgBox.setStandardButtons(QMessageBox::StandardButton::Ok); + msgBox.setStandardButtons(QMessageBox::Ok); + msgBox.button(QMessageBox::Ok)->setFocus(); msgBox.exec(); } @@ -233,7 +248,18 @@ void AppQtGui::onSetupAssistantWizardRequest() mSetupAssistantGui = new SetupAssistantGui(mMainWidget); connect(mSetupAssistantGui, &SetupAssistantGui::fireChangePinButtonClicked, mMainWidget, &AppQtMainWidget::onChangePinButtonClicked); } + + bool stopRemoteScan = false; + if (!mMainWidget->remoteScanRunning()) + { + Env::getSingleton()->startScanAll(false); + stopRemoteScan = true; + } mSetupAssistantGui->activate(); + if (stopRemoteScan) + { + Env::getSingleton()->stopScanAll(); + } } @@ -247,6 +273,7 @@ void AppQtGui::onDeveloperModeQuestion() msgBox.setInformativeText(tr("Do you want to disable the developer mode?")); msgBox.setStandardButtons(QMessageBox::Yes | QMessageBox::No); msgBox.setDefaultButton(QMessageBox::Yes); + msgBox.button(QMessageBox::Yes)->setFocus(); if (msgBox.exec() == QMessageBox::Yes) { @@ -285,6 +312,7 @@ bool AppQtGui::askChangeTransportPinNow() messageBox.setWindowFlags(messageBox.windowFlags() & ~Qt::WindowContextHelpButtonHint); messageBox.setText(tr("Did you change the initial transport PIN already?

Prior to the first use of the online identification function you have to replace the transport PIN by an individual 6-digit PIN. Online identification with transport PIN is not possible.")); messageBox.setStandardButtons(QMessageBox::Yes); + messageBox.button(QMessageBox::Yes)->setFocus(); auto changePinButton = messageBox.addButton(tr("No, change transport PIN now"), QMessageBox::NoRole); messageBox.exec(); @@ -325,87 +353,19 @@ bool AppQtGui::eventFilter(QObject* /*pObject*/, QEvent* pEvent) } -void AppQtGui::initGuiProfile() -{ - GuiProfile& profile = GuiProfile::getProfile(); - - // set style sheet only if none has be specified on the command line - if (qApp->styleSheet().isEmpty()) - { - if (profile.getDebugStyleSheet().isEmpty()) - { - loadStyleSheet(profile.getStyleSheetName(), true); - } - else - { - QFileSystemWatcher* watcher = new QFileSystemWatcher(QStringList() << profile.getDebugStyleSheet(), this); - connect(watcher, &QFileSystemWatcher::fileChanged, this, &AppQtGui::onDebugStyleSheetChanged); - loadStyleSheet(profile.getDebugStyleSheet(), false); - } - } -} - - -void AppQtGui::loadStyleSheet(const QString& pStyleSheetName, bool pIsResource) +void AppQtGui::loadStyleSheet() { - QString styleSheetName = pIsResource ? QStringLiteral(":/stylesheets/") + pStyleSheetName : pStyleSheetName; + const auto& styleSheetName = QStringLiteral(":/stylesheets/desktop.qss"); qCDebug(gui) << "loading style sheet" << styleSheetName; - QString styleSheet = readStyleSheet(styleSheetName); - if (!styleSheet.isEmpty()) - { - qApp->setStyleSheet(styleSheet); - } - else - { - qCWarning(gui) << "Failed to load global style sheet!"; - } -} - -QString AppQtGui::readStyleSheet(const QString& pFileName) -{ - // read the file into a string - QFile file(pFileName); + QFile file(styleSheetName); if (!file.open(QIODevice::ReadOnly)) { - qCWarning(gui) << "Failed to read style sheet:" << pFileName; - return QString(); + qCWarning(gui) << "Failed to read style sheet"; + return; } - QString styleSheet = QString::fromLatin1(file.readAll()); - file.close(); - - // resolve imports - // Note: The algorithm is very simple and e.g. doesn't detect that an import is commented out. - QRegularExpression regExp(QStringLiteral("@import\\s+\"([^\"]*)\"\\s*;")); - QRegularExpressionMatchIterator it = regExp.globalMatch(styleSheet); - if (!it.hasNext()) - { - return styleSheet; - } - - QString result; - int lastOffset = 0; - - while (it.hasNext()) - { - QRegularExpressionMatch match = it.next(); - if (lastOffset < match.capturedStart()) - { - result += styleSheet.midRef(lastOffset, match.capturedStart() - lastOffset); - } - - result += readStyleSheet(match.captured(1)); - - lastOffset = match.capturedEnd(); - } - - if (lastOffset < styleSheet.length()) - { - result += styleSheet.midRef(lastOffset); - } - - return result; + qApp->setStyleSheet(QString::fromLatin1(file.readAll())); } @@ -417,7 +377,7 @@ void AppQtGui::onChangeHighContrast(bool* pHighContrastOn) } else { - initGuiProfile(); + loadStyleSheet(); } } @@ -515,6 +475,8 @@ void AppQtGui::onCloseWindowRequested(bool* pDoClose) messageBox.setText(tr("The user interface of the %1 is closed.").arg(QApplication::applicationName())); messageBox.setInformativeText(tr("The program remains available via the icon in the system tray. Click on the %1 icon to reopen the user interface.").arg(QApplication::applicationName())); messageBox.setCheckBox(new QCheckBox(tr("Do not show this dialog again."))); + messageBox.setStandardButtons(QMessageBox::Ok); + messageBox.button(QMessageBox::Ok)->setFocus(); messageBox.exec(); Q_EMIT fireCloseReminderFinished(messageBox.checkBox()->isChecked()); @@ -538,19 +500,6 @@ void AppQtGui::onCloseWindowRequested(bool* pDoClose) } -void AppQtGui::onDebugStyleSheetChanged(const QString& pPath) -{ - if (QFileSystemWatcher* watcher = qobject_cast(sender())) - { - // work-around for QFileSystemWatcher no longer knowing the file after receiving the first notification - watcher->removePath(pPath); - watcher->addPath(pPath); - } - - loadStyleSheet(pPath, false); -} - - #ifndef QT_NO_NETWORKPROXY void AppQtGui::onProxyAuthenticationRequired(const QNetworkProxy& pProxy, QAuthenticator* pAuthenticator) { @@ -653,7 +602,7 @@ void AppQtGui::onAppUpdateReady(bool pSuccess, const GlobalStatus& pError) else if (pSuccess) { const auto updateWindow = new UpdateWindow(mMainWidget); - connect(updateWindow, &UpdateWindow::fireShowUpdateDialog, + connect(updateWindow, &UpdateWindow::fireShowUpdateDialog, this, [this](QMessageBox::Icon pIcon, const QString& pMsg) { mUpdateInfo->setIcon(pIcon); @@ -680,6 +629,13 @@ void AppQtGui::onUpdateScheduled() } +void AppQtGui::onCertificateRemoved(QString pDeviceName) +{ + mCertificateInfo->setText(tr("The device \"%1\" was unpaired because it does not react to connection attempts. Retry the pairing process if you want to use this device to authenticate yourself.").arg(pDeviceName)); + mCertificateInfo->show(); +} + + void AppQtGui::shutdown() { if (mTrayIcon != nullptr) diff --git a/src/widget/AppQtGui.h b/src/widget/AppQtGui.h index e8753636e..3c92c04be 100644 --- a/src/widget/AppQtGui.h +++ b/src/widget/AppQtGui.h @@ -1,5 +1,5 @@ /*! - * \copyright Copyright (c) 2014-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2014-2018 Governikus GmbH & Co. KG, Germany */ #pragma once @@ -57,9 +57,7 @@ class AppQtGui virtual bool eventFilter(QObject* pObject, QEvent* pEvent) override; private: - void initGuiProfile(); - void loadStyleSheet(const QString& pStyleSheetName, bool pIsResource); - QString readStyleSheet(const QString& pFileName); + void loadStyleSheet(); void createTrayIcon(); void closeDialogs(); void hideFromTaskbar(); @@ -76,13 +74,13 @@ class AppQtGui private Q_SLOTS: void onActivated(QSystemTrayIcon::ActivationReason reason); void onCloseWindowRequested(bool* pDoClose); - void onDebugStyleSheetChanged(const QString& pPath); void onChangeHighContrast(bool* pHighContrastOn); void onSetupAssistantWizardRequest(); void onDeveloperModeQuestion(); void onDiagnosisRequested(); void onAppUpdateReady(bool pSuccess, const GlobalStatus& pError); void onUpdateScheduled(); + void onCertificateRemoved(QString pDeviceName); void onSwitchToReaderSettingsRequested(); private: @@ -93,6 +91,7 @@ class AppQtGui SetupAssistantGui* mSetupAssistantGui; DiagnosisGui* mDiagnosisGui; QMessageBox* mUpdateInfo; + QMessageBox* mCertificateInfo; bool mAggressiveToForeground; Q_SIGNALS: diff --git a/src/widget/AppQtMainWidget.cpp b/src/widget/AppQtMainWidget.cpp index 1bd1dcab4..d7d0060af 100644 --- a/src/widget/AppQtMainWidget.cpp +++ b/src/widget/AppQtMainWidget.cpp @@ -1,5 +1,5 @@ /*! - * \copyright Copyright (c) 2014-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2014-2018 Governikus GmbH & Co. KG, Germany */ #include "AppQtMainWidget.h" @@ -23,7 +23,6 @@ #include #include #include -#include #include #include @@ -200,6 +199,12 @@ void AppQtMainWidget::changeEvent(QEvent* pEvent) } +bool AppQtMainWidget::remoteScanRunning() const +{ + return mUi->settingsPage->remoteScanRunning(); +} + + void AppQtMainWidget::workflowActivated(WorkflowWidgetParent pParent, const QString& /*pName*/) { QAbstractButton* tabToolButton = nullptr; diff --git a/src/widget/AppQtMainWidget.h b/src/widget/AppQtMainWidget.h index 5980edc17..3c68aff38 100644 --- a/src/widget/AppQtMainWidget.h +++ b/src/widget/AppQtMainWidget.h @@ -1,7 +1,7 @@ /*! * \brief Main class for the top level main widget * - * \copyright Copyright (c) 2014-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2014-2018 Governikus GmbH & Co. KG, Germany */ #pragma once @@ -36,6 +36,7 @@ class AppQtMainWidget AppQtMainWidget(); virtual ~AppQtMainWidget() override; + bool remoteScanRunning() const; void workflowActivated(WorkflowWidgetParent pParent, const QString& pName); void workflowDeactivated(); diff --git a/src/widget/AppQtMainWidget.ui b/src/widget/AppQtMainWidget.ui index 6fee60274..9f00eadc1 100644 --- a/src/widget/AppQtMainWidget.ui +++ b/src/widget/AppQtMainWidget.ui @@ -742,7 +742,7 @@ - &Manual + &Online help diff --git a/src/widget/AppStartPage.cpp b/src/widget/AppStartPage.cpp index 19eaa6eca..95305724c 100644 --- a/src/widget/AppStartPage.cpp +++ b/src/widget/AppStartPage.cpp @@ -1,5 +1,5 @@ /*! - * \copyright Copyright (c) 2014-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2014-2018 Governikus GmbH & Co. KG, Germany */ #include "AppStartPage.h" diff --git a/src/widget/AppStartPage.h b/src/widget/AppStartPage.h index be91472a9..177a64e21 100644 --- a/src/widget/AppStartPage.h +++ b/src/widget/AppStartPage.h @@ -1,7 +1,7 @@ /*! * \brief Main page widget. * - * \copyright Copyright (c) 2014-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2014-2018 Governikus GmbH & Co. KG, Germany */ #pragma once diff --git a/src/widget/CredentialDialog.cpp b/src/widget/CredentialDialog.cpp index 0954296d4..4587702a7 100644 --- a/src/widget/CredentialDialog.cpp +++ b/src/widget/CredentialDialog.cpp @@ -1,5 +1,5 @@ /*! - * \copyright Copyright (c) 2014-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2014-2018 Governikus GmbH & Co. KG, Germany */ #include "CredentialDialog.h" diff --git a/src/widget/CredentialDialog.h b/src/widget/CredentialDialog.h index dd3c04b92..8f51da663 100644 --- a/src/widget/CredentialDialog.h +++ b/src/widget/CredentialDialog.h @@ -1,7 +1,7 @@ /*! * \brief Show a dialog to fill in proxy credentials. * - * \copyright Copyright (c) 2014-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2014-2018 Governikus GmbH & Co. KG, Germany */ #pragma once diff --git a/src/widget/DeleteHistoryDialog.cpp b/src/widget/DeleteHistoryDialog.cpp index 2900c1019..4d6d46476 100644 --- a/src/widget/DeleteHistoryDialog.cpp +++ b/src/widget/DeleteHistoryDialog.cpp @@ -1,5 +1,5 @@ /* - * \copyright Copyright (c) 2014-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2014-2018 Governikus GmbH & Co. KG, Germany */ #include "DeleteHistoryDialog.h" diff --git a/src/widget/DeleteHistoryDialog.h b/src/widget/DeleteHistoryDialog.h index 2c4200643..c37204fd0 100644 --- a/src/widget/DeleteHistoryDialog.h +++ b/src/widget/DeleteHistoryDialog.h @@ -1,10 +1,10 @@ /* - * \copyright Copyright (c) 2014-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2014-2018 Governikus GmbH & Co. KG, Germany */ #pragma once -#include "EnumHelper.h" +#include "HistorySettings.h" #include #include @@ -15,14 +15,6 @@ namespace governikus { -defineEnumType(TimePeriod, - PAST_HOUR, - PAST_DAY, - PAST_WEEK, - LAST_FOUR_WEEKS, - ALL_HISTORY - ) - class DeleteHistoryDialog : public QDialog { diff --git a/src/widget/DetailDialog.cpp b/src/widget/DetailDialog.cpp index 18367134f..790759520 100644 --- a/src/widget/DetailDialog.cpp +++ b/src/widget/DetailDialog.cpp @@ -1,12 +1,16 @@ /*! - * \copyright Copyright (c) 2014-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2014-2018 Governikus GmbH & Co. KG, Germany */ #include "DetailDialog.h" + +#include "ui_DetailDialog.h" + #include "DetailWidget.h" #include "generic/HelpAction.h" -#include "ui_DetailDialog.h" + #include +#include using namespace governikus; @@ -34,6 +38,7 @@ DetailDialog::~DetailDialog() void DetailDialog::setDetails(const QString& pDetails) { mUi->detailWidget->setDetails(pDetails); + mUi->buttonBox->button(QDialogButtonBox::Close)->setFocus(); adjustSize(); } diff --git a/src/widget/DetailDialog.h b/src/widget/DetailDialog.h index dbe570d1c..2f3022b65 100644 --- a/src/widget/DetailDialog.h +++ b/src/widget/DetailDialog.h @@ -1,7 +1,7 @@ /*! * \brief Detail dialog for certificate description * - * \copyright Copyright (c) 2014-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2014-2018 Governikus GmbH & Co. KG, Germany */ #pragma once diff --git a/src/widget/DetailWidget.cpp b/src/widget/DetailWidget.cpp index ed8746869..eb48c0d21 100644 --- a/src/widget/DetailWidget.cpp +++ b/src/widget/DetailWidget.cpp @@ -1,5 +1,5 @@ /*! - * \copyright Copyright (c) 2014-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2014-2018 Governikus GmbH & Co. KG, Germany */ #include "DetailWidget.h" @@ -7,6 +7,7 @@ #include "ui_DetailWidget.h" #include +#include using namespace governikus; diff --git a/src/widget/DetailWidget.h b/src/widget/DetailWidget.h index d98890179..038c982e7 100644 --- a/src/widget/DetailWidget.h +++ b/src/widget/DetailWidget.h @@ -1,7 +1,7 @@ /*! * \brief Widget for cvc description. * - * \copyright Copyright (c) 2014-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2014-2018 Governikus GmbH & Co. KG, Germany */ #pragma once diff --git a/src/widget/DeveloperModeHistoryWidget.cpp b/src/widget/DeveloperModeHistoryWidget.cpp index 1ed79a343..d161bde81 100644 --- a/src/widget/DeveloperModeHistoryWidget.cpp +++ b/src/widget/DeveloperModeHistoryWidget.cpp @@ -1,5 +1,5 @@ /* - * \copyright Copyright (c) 2016-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2016-2018 Governikus GmbH & Co. KG, Germany */ #include "AppSettings.h" diff --git a/src/widget/DeveloperModeHistoryWidget.h b/src/widget/DeveloperModeHistoryWidget.h index 485515c71..6ad62ef3f 100644 --- a/src/widget/DeveloperModeHistoryWidget.h +++ b/src/widget/DeveloperModeHistoryWidget.h @@ -1,7 +1,7 @@ /*! * \brief A Widget to display developer mode errors which occurred * - * \copyright Copyright (c) 2016-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2016-2018 Governikus GmbH & Co. KG, Germany */ #pragma once diff --git a/src/widget/DeveloperSettingsWidget.cpp b/src/widget/DeveloperSettingsWidget.cpp index 2c34fdbd6..eb3995258 100644 --- a/src/widget/DeveloperSettingsWidget.cpp +++ b/src/widget/DeveloperSettingsWidget.cpp @@ -1,5 +1,5 @@ /*! - * \copyright Copyright (c) 2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2017-2018 Governikus GmbH & Co. KG, Germany */ #include "DeveloperSettingsWidget.h" diff --git a/src/widget/DeveloperSettingsWidget.h b/src/widget/DeveloperSettingsWidget.h index dcd1fe182..6ce0c5aa6 100644 --- a/src/widget/DeveloperSettingsWidget.h +++ b/src/widget/DeveloperSettingsWidget.h @@ -1,7 +1,7 @@ /*! * \brief Widget for the developer settings. * - * \copyright Copyright (c) 2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2017-2018 Governikus GmbH & Co. KG, Germany */ #pragma once diff --git a/src/widget/DiagnosisDialog.cpp b/src/widget/DiagnosisDialog.cpp index a3c5a4219..c2b365121 100644 --- a/src/widget/DiagnosisDialog.cpp +++ b/src/widget/DiagnosisDialog.cpp @@ -1,5 +1,5 @@ /*! - * \copyright Copyright (c) 2014-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2014-2018 Governikus GmbH & Co. KG, Germany */ #include "DiagnosisDialog.h" @@ -44,25 +44,25 @@ DiagnosisDialog::~DiagnosisDialog() void DiagnosisDialog::onSaveButtonClicked() { - QString fileName = QFileDialog::getSaveFileName(this, QCoreApplication::applicationName() - + QStringLiteral(" - ") - + tr("Save diagnosis result") - , QDir::homePath() - + QLatin1Char('/') - + tr("AusweisApp2-diagnosis.txt") + const auto& creationTime = mDiagnosisWidget->getCreationTime(); + + QString filename = QStringLiteral("AusweisApp2.Diagnosis.%1.txt").arg(creationTime.toString(QStringLiteral("yyyy-MM-dd_HH-mm"))); + filename = QFileDialog::getSaveFileName(this, + QCoreApplication::applicationName() + QStringLiteral(" - ") + tr("Save"), + QDir::homePath() + QLatin1Char('/') + filename, #ifndef Q_OS_MACOS - , tr("Text files (*.txt)")); + tr("Text files") + QStringLiteral(" (*.txt)")); #else - , tr("Text files (*.txt)"), nullptr, QFileDialog::DontUseNativeDialog); + tr("Text files") + QStringLiteral(" (*.txt)"), nullptr, QFileDialog::DontUseNativeDialog); #endif - if (fileName.isEmpty()) + if (filename.isEmpty()) { return; } - if (!fileName.endsWith(QLatin1String(".txt"), Qt::CaseSensitivity::CaseInsensitive)) + if (!filename.endsWith(QLatin1String(".txt"), Qt::CaseSensitivity::CaseInsensitive)) { - fileName += QStringLiteral(".txt"); + filename += QStringLiteral(".txt"); } QString text = mDiagnosisWidget->getInfoTextEdit(); @@ -70,10 +70,18 @@ void DiagnosisDialog::onSaveButtonClicked() text.replace(QLatin1Char('\n'), QStringLiteral("\r\n")); #endif - QFile file(fileName); + QFile file(filename); if (!file.open(QIODevice::WriteOnly | QFile::Truncate) || file.write(text.toUtf8()) < 0) { - QMessageBox::warning(this, QCoreApplication::applicationName() + QStringLiteral(" - ") + tr("File error"), tr("An error occurred while saving the file.")); + QMessageBox box(this); + box.setWindowTitle(QApplication::applicationName() + QStringLiteral(" - ") + tr("File error")); + box.setWindowModality(Qt::ApplicationModal); + box.setIcon(QMessageBox::Warning); + box.setWindowFlags(box.windowFlags() & ~Qt::WindowContextHelpButtonHint); + box.setText(tr("An error occurred while saving the file.")); + box.setStandardButtons(QMessageBox::Ok); + box.button(QMessageBox::Ok)->setFocus(); + box.exec(); } } diff --git a/src/widget/DiagnosisDialog.h b/src/widget/DiagnosisDialog.h index ac0e81c77..d73ed2c8e 100644 --- a/src/widget/DiagnosisDialog.h +++ b/src/widget/DiagnosisDialog.h @@ -1,7 +1,7 @@ /*! * \brief Dialog for display the diagnosis information. * - * \copyright Copyright (c) 2014-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2014-2018 Governikus GmbH & Co. KG, Germany */ #pragma once diff --git a/src/widget/DiagnosisGui.cpp b/src/widget/DiagnosisGui.cpp index b0bfba284..f41bb04de 100644 --- a/src/widget/DiagnosisGui.cpp +++ b/src/widget/DiagnosisGui.cpp @@ -1,5 +1,5 @@ /*! - * \copyright Copyright (c) 2014-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2014-2018 Governikus GmbH & Co. KG, Germany */ #include "DiagnosisGui.h" diff --git a/src/widget/DiagnosisGui.h b/src/widget/DiagnosisGui.h index 4e74e6024..1e6697548 100644 --- a/src/widget/DiagnosisGui.h +++ b/src/widget/DiagnosisGui.h @@ -1,7 +1,7 @@ /*! * \brief Qt widget based DiagnosisUi implementation. * - * \copyright Copyright (c) 2014-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2014-2018 Governikus GmbH & Co. KG, Germany */ #pragma once diff --git a/src/widget/DiagnosisWidget.cpp b/src/widget/DiagnosisWidget.cpp index b4d33ea96..10660fbe1 100644 --- a/src/widget/DiagnosisWidget.cpp +++ b/src/widget/DiagnosisWidget.cpp @@ -1,5 +1,5 @@ /*! - * \copyright Copyright (c) 2014-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2014-2018 Governikus GmbH & Co. KG, Germany */ #include "DiagnosisWidget.h" @@ -303,19 +303,25 @@ void DiagnosisWidget::onReaderInfosChanged() void DiagnosisWidget::onTimestampChanged() { - QString timestamp = LanguageLoader::getInstance().getUsedLocale().toString(mContext->getTimestamp(), tr("d. MMMM yyyy, hh:mm:ss AP")); + QString timestamp = LanguageLoader::getInstance().getUsedLocale().toString(getCreationTime(), tr("d. MMMM yyyy, hh:mm:ss AP")); setFieldText(mTimestampField, timestamp); (new QTreeWidgetItem(mTimestampItem))->setText(0, timestamp); } -QString DiagnosisWidget::getInfoTextEdit() +QString DiagnosisWidget::getInfoTextEdit() const { return mUi->infoTextEdit->toPlainText(); } +QDateTime DiagnosisWidget::getCreationTime() const +{ + return mContext->getTimestamp(); +} + + DiagnosisWidget::Field* DiagnosisWidget::insertField(QTextCursor& pCursor, const QString& pHeading, bool pIsFirstField) { if (!pIsFirstField) diff --git a/src/widget/DiagnosisWidget.h b/src/widget/DiagnosisWidget.h index f2eb6fbcb..f7bc4efcc 100644 --- a/src/widget/DiagnosisWidget.h +++ b/src/widget/DiagnosisWidget.h @@ -1,11 +1,12 @@ /*! * \brief Widget for display the diagnosis information. * - * \copyright Copyright (c) 2014-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2014-2018 Governikus GmbH & Co. KG, Germany */ #pragma once +#include #include #include #include @@ -74,7 +75,8 @@ class DiagnosisWidget DiagnosisWidget(DiagnosisContext* pContext, QWidget* pParent = nullptr); virtual ~DiagnosisWidget() override; - QString getInfoTextEdit(); + QString getInfoTextEdit() const; + QDateTime getCreationTime() const; }; } /* namespace governikus */ diff --git a/src/widget/GeneralSettingsWidget.cpp b/src/widget/GeneralSettingsWidget.cpp index 026e4c64e..c51e2dffe 100644 --- a/src/widget/GeneralSettingsWidget.cpp +++ b/src/widget/GeneralSettingsWidget.cpp @@ -1,5 +1,5 @@ /*! - * \copyright Copyright (c) 2014-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2014-2018 Governikus GmbH & Co. KG, Germany */ #include "GeneralSettingsWidget.h" diff --git a/src/widget/GeneralSettingsWidget.h b/src/widget/GeneralSettingsWidget.h index 58c050d3d..eca43c3af 100644 --- a/src/widget/GeneralSettingsWidget.h +++ b/src/widget/GeneralSettingsWidget.h @@ -1,7 +1,7 @@ /*! * \brief Widget for the general settings. * - * \copyright Copyright (c) 2014-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2014-2018 Governikus GmbH & Co. KG, Germany */ #pragma once diff --git a/src/widget/GuiProfile.cpp b/src/widget/GuiProfile.cpp index 582390e94..a3df7e8dc 100644 --- a/src/widget/GuiProfile.cpp +++ b/src/widget/GuiProfile.cpp @@ -1,5 +1,5 @@ /*! - * \copyright Copyright (c) 2014-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2014-2018 Governikus GmbH & Co. KG, Germany */ #include "GuiProfile.h" @@ -8,14 +8,9 @@ using namespace governikus; GuiProfile GuiProfile::mProfile; + GuiProfile::GuiProfile() : mShowWindow(false) - , mDebugStyleSheet() -{ -} - - -GuiProfile::~GuiProfile() { } @@ -30,27 +25,3 @@ void GuiProfile::setShowWindow(bool pShow) { mShowWindow = pShow; } - - -const QString& GuiProfile::getDebugStyleSheet() const -{ - return mDebugStyleSheet; -} - - -void GuiProfile::setDebugStyleSheet(const QString& pStyleSheet) -{ - mDebugStyleSheet = pStyleSheet; -} - - -QLatin1String GuiProfile::getStyleSheetName() -{ -#if defined(Q_OS_MACOS) - return QLatin1String("macos.qss"); - -#else - return QLatin1String("windows.qss"); - -#endif -} diff --git a/src/widget/GuiProfile.h b/src/widget/GuiProfile.h index 86585e8f4..ed6a22550 100644 --- a/src/widget/GuiProfile.h +++ b/src/widget/GuiProfile.h @@ -2,30 +2,22 @@ * \brief Singleton GuiProfile specifies platform specific customizations the * GUI. * - * \copyright Copyright (c) 2014-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2014-2018 Governikus GmbH & Co. KG, Germany */ #pragma once -#include "EnumHelper.h" - -#include -#include - namespace governikus { class GuiProfile { - public: - GuiProfile(); - ~GuiProfile(); - private: static GuiProfile mProfile; + GuiProfile(); + ~GuiProfile() = default; bool mShowWindow; - QString mDebugStyleSheet; public: static GuiProfile& getProfile() @@ -34,12 +26,8 @@ class GuiProfile } - void setDebugStyleSheet(const QString& pStyleSheet); void setShowWindow(bool pShow); - bool getShowWindow() const; - const QString& getDebugStyleSheet() const; - QLatin1String getStyleSheetName(); }; } /* namespace governikus */ diff --git a/src/widget/HistoryDetailWidget.cpp b/src/widget/HistoryDetailWidget.cpp index 16005564d..8807245d6 100644 --- a/src/widget/HistoryDetailWidget.cpp +++ b/src/widget/HistoryDetailWidget.cpp @@ -1,5 +1,5 @@ /*! - * \copyright Copyright (c) 2014-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2014-2018 Governikus GmbH & Co. KG, Germany */ #include "HistoryDetailWidget.h" @@ -7,6 +7,7 @@ #include "ui_HistoryDetailWidget.h" #include +#include using namespace governikus; diff --git a/src/widget/HistoryDetailWidget.h b/src/widget/HistoryDetailWidget.h index bf71dfc95..3349addc0 100644 --- a/src/widget/HistoryDetailWidget.h +++ b/src/widget/HistoryDetailWidget.h @@ -1,7 +1,7 @@ /*! * \brief Widget for history item. * - * \copyright Copyright (c) 2014-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2014-2018 Governikus GmbH & Co. KG, Germany */ #pragma once diff --git a/src/widget/HistoryWidget.cpp b/src/widget/HistoryWidget.cpp index 6ed5eff85..267252d1e 100644 --- a/src/widget/HistoryWidget.cpp +++ b/src/widget/HistoryWidget.cpp @@ -1,5 +1,5 @@ /*! - * \copyright Copyright (c) 2014-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2014-2018 Governikus GmbH & Co. KG, Germany */ #include "HistoryWidget.h" @@ -205,32 +205,8 @@ void HistoryWidget::deleteHistory() return; } - QDateTime latestToKeep = QDateTime::currentDateTime(); - switch (deleteHistoryDialog->getTimePeriod()) - { - case TimePeriod::PAST_HOUR: - latestToKeep = latestToKeep.addSecs(-60 * 60); - break; - - case TimePeriod::PAST_DAY: - latestToKeep = latestToKeep.addDays(-1); - break; - - case TimePeriod::PAST_WEEK: - latestToKeep = latestToKeep.addDays(-7); - break; - - case TimePeriod::LAST_FOUR_WEEKS: - latestToKeep = latestToKeep.addDays(-7 * 4); - break; - - case TimePeriod::ALL_HISTORY: - latestToKeep = QDateTime(); - break; - } - auto& settings = AppSettings::getInstance().getHistorySettings(); - settings.deleteSettings(latestToKeep); + settings.deleteSettings(deleteHistoryDialog->getTimePeriod()); settings.save(); } diff --git a/src/widget/HistoryWidget.h b/src/widget/HistoryWidget.h index b3d658a03..335cd9a12 100644 --- a/src/widget/HistoryWidget.h +++ b/src/widget/HistoryWidget.h @@ -1,7 +1,7 @@ /*! * \brief Show history entries. * - * \copyright Copyright (c) 2014-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2014-2018 Governikus GmbH & Co. KG, Germany */ #pragma once diff --git a/src/widget/LogFilesDialog.cpp b/src/widget/LogFilesDialog.cpp index 51d15a528..300ad801b 100644 --- a/src/widget/LogFilesDialog.cpp +++ b/src/widget/LogFilesDialog.cpp @@ -1,5 +1,5 @@ /*! - * \copyright Copyright (c) 2016-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2016-2018 Governikus GmbH & Co. KG, Germany */ #include "LanguageLoader.h" @@ -132,8 +132,16 @@ void LogFilesDialog::onCurrentIndexChanged(int pIndex) void LogFilesDialog::onDeleteButtonClicked() { - QMessageBox::StandardButton reply = QMessageBox::question(this, tr("Delete log files"), tr("Do you really want to delete all old log files?"), QMessageBox::Yes | QMessageBox::No); - if (reply == QMessageBox::Yes) + QMessageBox box(this); + box.setWindowTitle(tr("Delete log files")); + box.setWindowModality(Qt::ApplicationModal); + box.setIcon(QMessageBox::Question); + box.setWindowFlags(box.windowFlags() & ~Qt::WindowContextHelpButtonHint); + box.setText(tr("Do you really want to delete all old log files?")); + box.setStandardButtons(QMessageBox::Yes | QMessageBox::No); + box.button(QMessageBox::Yes)->setFocus(); + + if (box.exec() == QMessageBox::Yes) { LogHandler::getInstance().removeOtherLogfiles(); init(); @@ -213,7 +221,15 @@ void LogFilesDialog::saveLogFile(QWidget* pParent, const QString& pSource) qCDebug(gui) << "Copy log to file location:" << copied; if (!copied) { - QMessageBox::warning(pParent, QCoreApplication::applicationName() + QStringLiteral(" - ") + tr("File error"), tr("An error occurred while saving the file.")); + QMessageBox box(pParent); + box.setWindowTitle(QApplication::applicationName() + QStringLiteral(" - ") + tr("File error")); + box.setWindowModality(Qt::ApplicationModal); + box.setIcon(QMessageBox::Warning); + box.setWindowFlags(box.windowFlags() & ~Qt::WindowContextHelpButtonHint); + box.setText(tr("An error occurred while saving the file.")); + box.setStandardButtons(QMessageBox::Ok); + box.button(QMessageBox::Ok)->setFocus(); + box.exec(); } } } diff --git a/src/widget/LogFilesDialog.h b/src/widget/LogFilesDialog.h index 02cc0e25c..fcdb05a5a 100644 --- a/src/widget/LogFilesDialog.h +++ b/src/widget/LogFilesDialog.h @@ -1,7 +1,7 @@ /*! * \brief Dialog for display the old log files. * - * \copyright Copyright (c) 2016-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2016-2018 Governikus GmbH & Co. KG, Germany */ #pragma once diff --git a/src/widget/PinSettingsInfoWidget.cpp b/src/widget/PinSettingsInfoWidget.cpp index a43734250..50a04c6ff 100644 --- a/src/widget/PinSettingsInfoWidget.cpp +++ b/src/widget/PinSettingsInfoWidget.cpp @@ -1,11 +1,12 @@ /*! - * \copyright Copyright (c) 2014-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2014-2018 Governikus GmbH & Co. KG, Germany */ #include "PinSettingsInfoWidget.h" #include "ui_PinSettingsInfoWidget.h" #include +#include using namespace governikus; diff --git a/src/widget/PinSettingsInfoWidget.h b/src/widget/PinSettingsInfoWidget.h index 73f59dace..48c1630d6 100644 --- a/src/widget/PinSettingsInfoWidget.h +++ b/src/widget/PinSettingsInfoWidget.h @@ -1,7 +1,7 @@ /*! * \brief Widget for PIN settings information. * - * \copyright Copyright (c) 2014-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2014-2018 Governikus GmbH & Co. KG, Germany */ #pragma once diff --git a/src/widget/PinSettingsWidget.cpp b/src/widget/PinSettingsWidget.cpp index 0ca6a50b9..6a03d0849 100644 --- a/src/widget/PinSettingsWidget.cpp +++ b/src/widget/PinSettingsWidget.cpp @@ -1,5 +1,5 @@ /*! - * \copyright Copyright (c) 2014-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2014-2018 Governikus GmbH & Co. KG, Germany */ #include "PinSettingsWidget.h" @@ -15,6 +15,7 @@ #include #include +#include #include Q_DECLARE_LOGGING_CATEGORY(gui) @@ -480,9 +481,9 @@ void PinSettingsWidget::onRepeatNewPinTextEdited(const QString& pText) mUi->repeatNewPinEdit->setText(pText); } - if (!mUi->repeatNewPinEdit->isEnabled() || mUi->newPinEdit->text().startsWith(mUi->repeatNewPinEdit->text())) + if (!mUi->repeatNewPinEdit->isEnabled() || mUi->newPinEdit->text().startsWith(mUi->repeatNewPinEdit->text()) || mUi->repeatNewPinEdit->text().length() != 6) { - mUi->repeatNewPinEdit->setDigitFieldInvalid(false, tr("PIN correct.")); + mUi->repeatNewPinEdit->setDigitFieldInvalid(false, QString()); bool inputOk = mUi->repeatNewPinEdit->text().length() == 6 && mUi->repeatNewPinEdit->text() == mUi->newPinEdit->text(); mPinButtonEnabled = inputOk; @@ -522,12 +523,12 @@ void PinSettingsWidget::setupPinBasicPage(const ReaderInfo& pReaderInfo) if (hasCard) { pixmap = pReaderInfo.getReaderConfigurationInfo().getIconWithNPA()->lookupPath(); - mUi->basicReaderImageLabel->setAccessibleName(tr("Card reader icon")); + mUi->basicReaderImageLabel->setAccessibleName(tr("card inserted")); } else { pixmap = pReaderInfo.getReaderConfigurationInfo().getIcon()->lookupPath(); - mUi->basicReaderImageLabel->setAccessibleName(tr("Empty card reader icon")); + mUi->basicReaderImageLabel->setAccessibleName(tr("no card inserted")); } mUi->basicReaderImageLabel->setPixmap(pixmap.scaledToWidth(SCALEWIDTH, Qt::SmoothTransformation)); diff --git a/src/widget/PinSettingsWidget.h b/src/widget/PinSettingsWidget.h index 93ee514f8..477f7e821 100644 --- a/src/widget/PinSettingsWidget.h +++ b/src/widget/PinSettingsWidget.h @@ -1,7 +1,7 @@ /*! * \brief Widget for the PIN settings. * - * \copyright Copyright (c) 2014-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2014-2018 Governikus GmbH & Co. KG, Germany */ #pragma once diff --git a/src/widget/PinSettingsWidget.ui b/src/widget/PinSettingsWidget.ui index e26ab891c..a7fc94ea6 100644 --- a/src/widget/PinSettingsWidget.ui +++ b/src/widget/PinSettingsWidget.ui @@ -600,17 +600,16 @@ However, you can change your PIN on your smartphone directly as long as the remo
- - - Qt::StrongFocus - - + Qt::StrongFocus + + open on screen keyboard + true @@ -627,17 +626,16 @@ However, you can change your PIN on your smartphone directly as long as the remo - - - Qt::StrongFocus - - + Qt::StrongFocus + + open on screen keyboard + true @@ -654,17 +652,16 @@ However, you can change your PIN on your smartphone directly as long as the remo - - - Qt::StrongFocus - - + Qt::StrongFocus + + open on screen keyboard + true @@ -734,14 +731,16 @@ However, you can change your PIN on your smartphone directly as long as the remo 0 - - - Qt::StrongFocus - - + + + Qt::StrongFocus + + + open on screen keyboard + true @@ -797,15 +796,21 @@ However, you can change your PIN on your smartphone directly as long as the remo - + + + + Qt::StrongFocus + + open on screen keyboard + + + true + - - - diff --git a/src/widget/ProviderWidget.cpp b/src/widget/ProviderWidget.cpp index ca5ef8638..ffa72bcd1 100644 --- a/src/widget/ProviderWidget.cpp +++ b/src/widget/ProviderWidget.cpp @@ -1,5 +1,5 @@ /*! - * \copyright Copyright (c) 2014-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2014-2018 Governikus GmbH & Co. KG, Germany */ #include "ProviderWidget.h" @@ -34,7 +34,6 @@ ProviderWidget::ProviderWidget(QWidget* pParent) fill(); mUi->noResultWidget->setVisible(false); - mUi->providerTableWidget->resizeColumnsToContents(); } @@ -75,8 +74,16 @@ void ProviderWidget::fill() providerName->setMargin(3); mUi->providerTableWidget->setCellWidget(row, 0, providerName); - QLabel* providerLink = new QLabel(QStringLiteral(R"(%1)").arg(provider.getAddress())); - providerLink->setToolTip(providerLink->text()); + const QString& url = provider.getAddress(); + QString displayUrl = url; + const int maxUrlLength = 70; + if (url.length() > maxUrlLength) + { + displayUrl = url.left(maxUrlLength) + QStringLiteral("..."); + } + + QLabel* providerLink = new QLabel(QStringLiteral(R"(%2)").arg(url, displayUrl)); + providerLink->setToolTip(url); providerLink->setFocusPolicy(Qt::TabFocus); providerLink->setTextFormat(Qt::RichText); providerLink->setTextInteractionFlags(Qt::TextBrowserInteraction); @@ -87,6 +94,11 @@ void ProviderWidget::fill() ++row; } + for (int i = 0; i < header.size(); ++i) + { + mUi->providerTableWidget->resizeColumnToContents(i); + } + mUi->providerTableWidget->verticalHeader()->setVisible(false); //Hide row number mUi->providerTableWidget->setEditTriggers(QAbstractItemView::NoEditTriggers); //Not allowed to change content mUi->providerTableWidget->setAlternatingRowColors(true); //Grey and white alternating row diff --git a/src/widget/ProviderWidget.h b/src/widget/ProviderWidget.h index 469050943..6a3baf155 100644 --- a/src/widget/ProviderWidget.h +++ b/src/widget/ProviderWidget.h @@ -1,7 +1,7 @@ /*! * \brief The provider page in gui. * - * \copyright Copyright (c) 2014-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2014-2018 Governikus GmbH & Co. KG, Germany */ #pragma once diff --git a/src/widget/ProviderWidget.ui b/src/widget/ProviderWidget.ui index 697f43b3a..a6f3b974e 100644 --- a/src/widget/ProviderWidget.ui +++ b/src/widget/ProviderWidget.ui @@ -79,6 +79,9 @@ QAbstractItemView::SelectItems + + QAbstractItemView::ScrollPerPixel + false diff --git a/src/widget/RandomPinDialog.cpp b/src/widget/RandomPinDialog.cpp index 90338a096..eccd191e4 100644 --- a/src/widget/RandomPinDialog.cpp +++ b/src/widget/RandomPinDialog.cpp @@ -1,5 +1,5 @@ /*! - * \copyright Copyright (c) 2014-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2014-2018 Governikus GmbH & Co. KG, Germany */ #include "RandomPinDialog.h" diff --git a/src/widget/RandomPinDialog.h b/src/widget/RandomPinDialog.h index 709da783c..d95419831 100644 --- a/src/widget/RandomPinDialog.h +++ b/src/widget/RandomPinDialog.h @@ -1,7 +1,7 @@ /*! * \brief Dialog for display the random PIN. * - * \copyright Copyright (c) 2014-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2014-2018 Governikus GmbH & Co. KG, Germany */ #pragma once diff --git a/src/widget/ReaderDeviceDialog.cpp b/src/widget/ReaderDeviceDialog.cpp index 7d8f2749b..9c81b16d9 100644 --- a/src/widget/ReaderDeviceDialog.cpp +++ b/src/widget/ReaderDeviceDialog.cpp @@ -1,5 +1,5 @@ /*! - * \copyright Copyright (c) 2015-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2015-2018 Governikus GmbH & Co. KG, Germany */ #include "ReaderDeviceDialog.h" diff --git a/src/widget/ReaderDeviceDialog.h b/src/widget/ReaderDeviceDialog.h index aa7ff1287..88a17600f 100644 --- a/src/widget/ReaderDeviceDialog.h +++ b/src/widget/ReaderDeviceDialog.h @@ -2,7 +2,7 @@ * \brief Dialog for detecting attached card readers or available * remote card readers. * - * \copyright Copyright (c) 2015-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2015-2018 Governikus GmbH & Co. KG, Germany */ #pragma once diff --git a/src/widget/ReaderDeviceGui.cpp b/src/widget/ReaderDeviceGui.cpp index 60391e6c3..007c8379f 100644 --- a/src/widget/ReaderDeviceGui.cpp +++ b/src/widget/ReaderDeviceGui.cpp @@ -1,5 +1,5 @@ /*! - * \copyright Copyright (c) 2015-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2015-2018 Governikus GmbH & Co. KG, Germany */ #include "ReaderDeviceGui.h" @@ -51,6 +51,15 @@ void ReaderDeviceGui::deactivate() } +void ReaderDeviceGui::reactToReaderCount(int pReaderCount) +{ + if (mDialog && pReaderCount > 0) + { + mDialog->close(); + } +} + + void ReaderDeviceGui::reactivate() { if (mDialog->isMinimized()) diff --git a/src/widget/ReaderDeviceGui.h b/src/widget/ReaderDeviceGui.h index fd9aac221..5afa5f5ba 100644 --- a/src/widget/ReaderDeviceGui.h +++ b/src/widget/ReaderDeviceGui.h @@ -1,7 +1,7 @@ /*! * \brief Qt widget based ReaderDriverUi implementation. * - * \copyright Copyright (c) 2015-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2015-2018 Governikus GmbH & Co. KG, Germany */ #pragma once @@ -27,6 +27,7 @@ class ReaderDeviceGui void activate(); void deactivate(); + void reactToReaderCount(int pReaderCount); Q_SIGNALS: void fireFinished(); diff --git a/src/widget/ReaderDeviceWidget.cpp b/src/widget/ReaderDeviceWidget.cpp index 5b5d60aae..6d5168d89 100644 --- a/src/widget/ReaderDeviceWidget.cpp +++ b/src/widget/ReaderDeviceWidget.cpp @@ -1,5 +1,5 @@ /*! - * \copyright Copyright (c) 2015-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2015-2018 Governikus GmbH & Co. KG, Germany */ #include "ReaderDeviceWidget.h" @@ -7,6 +7,7 @@ #include "ui_ReaderDeviceWidget.h" #include "Env.h" +#include "generic/HelpAction.h" #include "LanguageLoader.h" #include "ReaderConfiguration.h" #include "ReaderManager.h" @@ -32,6 +33,8 @@ ReaderDeviceWidget::ReaderDeviceWidget(QWidget* pParent) { mUi->setupUi(this); + setDisplayText(); + mUi->tableViewLocal->setModel(&mLocalReaderDataModel); mUi->tableViewLocal->horizontalHeader()->setStretchLastSection(true); mUi->tableViewLocal->verticalHeader()->setVisible(false); @@ -45,9 +48,6 @@ ReaderDeviceWidget::ReaderDeviceWidget(QWidget* pParent) connect(Env::getSingleton(), &ReaderConfiguration::fireUpdated, this, &ReaderDeviceWidget::onAdjustReaderNameColumnWidth); onAdjustReaderNameColumnWidth(); - connect(this, &ReaderDeviceWidget::fireWidgetShown, &mRemoteReaderDataModel, &RemoteDeviceModel::onWidgetShown); - connect(this, &ReaderDeviceWidget::fireWidgetHidden, &mRemoteReaderDataModel, &RemoteDeviceModel::onWidgetHidden); - connect(&mLocalReaderDataModel, &ReaderDriverModel::fireModelChanged, this, &ReaderDeviceWidget::onUpdateLocalTableSelection); connect(&mRemoteReaderDataModel, &RemoteDeviceModel::fireModelChanged, this, &ReaderDeviceWidget::onUpdateRemoteTableSelection); onUpdateLocalTableSelection(); @@ -99,7 +99,7 @@ void ReaderDeviceWidget::onRemoteSelectionChanged() } else { - mUi->connectRemote->setEnabled(true); + mUi->connectRemote->setEnabled(mRemoteReaderDataModel.isSupported(index)); mUi->forgetRemote->setEnabled(false); } } @@ -115,6 +115,22 @@ void ReaderDeviceWidget::onUpdateInfo() } +void ReaderDeviceWidget::setDisplayText() +{ + const QString& url = HelpAction::getOnlineUrl(QStringLiteral("readerDeviceTab")); + //: Is embedded in a sentence. + const QString hyperlink = QStringLiteral("%2").arg(url, tr("online help")); + + const QString remoteEmptyListDescriptionString = tr("No smartphone with enabled remote service found. See %1 for details of use.").arg(hyperlink); + mUi->remoteEmptyListDescription->setText(remoteEmptyListDescriptionString); + mUi->remoteEmptyListDescription->setAccessibleName(remoteEmptyListDescriptionString); + + const QString localEmptyListDescriptionString = tr("No connected card reader found. See %1 for installation of card readers.").arg(hyperlink); + mUi->localEmptyListDescription->setText(localEmptyListDescriptionString); + mUi->localEmptyListDescription->setAccessibleDescription(localEmptyListDescriptionString); +} + + void ReaderDeviceWidget::updateInfoIcon() { const QItemSelectionModel* const selectionModel = mUi->tableViewLocal->selectionModel(); @@ -283,6 +299,7 @@ void ReaderDeviceWidget::onConnectClicked() pairingInfoBox.setWindowFlags(pairingInfoBox.windowFlags() & ~Qt::WindowContextHelpButtonHint); pairingInfoBox.setStandardButtons(QMessageBox::Ok | QMessageBox::Cancel); pairingInfoBox.setDefaultButton(QMessageBox::Ok); + pairingInfoBox.button(QMessageBox::Ok)->setFocus(); pairingInfoBox.setIconPixmap(QIcon(QStringLiteral(":/images/npa.svg")).pixmap(32, 32)); if (pairingInfoBox.exec() == QMessageBox::Cancel) @@ -317,11 +334,10 @@ void ReaderDeviceWidget::onEstablishConnectionDone(const QSharedPointersetFocus(); box.exec(); } - else - { - } } @@ -359,6 +375,7 @@ void ReaderDeviceWidget::changeEvent(QEvent* pEvent) if (pEvent->type() == QEvent::LanguageChange) { mUi->retranslateUi(this); + setDisplayText(); onUpdateInfo(); } QWidget::changeEvent(pEvent); @@ -367,7 +384,7 @@ void ReaderDeviceWidget::changeEvent(QEvent* pEvent) void ReaderDeviceWidget::onRemoteDoubleClicked(const QModelIndex& pIndex) { - if (!mRemoteReaderDataModel.isPaired(pIndex)) + if (!mRemoteReaderDataModel.isPaired(pIndex) && mRemoteReaderDataModel.isSupported((pIndex))) { onConnectClicked(); } diff --git a/src/widget/ReaderDeviceWidget.h b/src/widget/ReaderDeviceWidget.h index 75157afbd..d73b3a2c3 100644 --- a/src/widget/ReaderDeviceWidget.h +++ b/src/widget/ReaderDeviceWidget.h @@ -2,7 +2,7 @@ * \brief Widget for detecting attached card readers and * suggesting an appropriate driver to be installed. * - * \copyright Copyright (c) 2015-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2015-2018 Governikus GmbH & Co. KG, Germany */ #pragma once @@ -34,6 +34,8 @@ class ReaderDeviceWidget ReaderDriverModel mLocalReaderDataModel; RemoteDeviceModel mRemoteReaderDataModel; + void setDisplayText(); + void updateInfoIcon(); void updateInfoText(); void updateInfoUpdate(); diff --git a/src/widget/ReaderDeviceWidget.ui b/src/widget/ReaderDeviceWidget.ui index ecc970d44..836237924 100644 --- a/src/widget/ReaderDeviceWidget.ui +++ b/src/widget/ReaderDeviceWidget.ui @@ -127,11 +127,14 @@ - No smartphone with enabled remote service found. See online help for details of use. + $text true + + true + @@ -280,11 +283,14 @@ - No connected card reader found. See online help for installation of card readers. + $text true + + true + diff --git a/src/widget/ReaderDriverModel.cpp b/src/widget/ReaderDriverModel.cpp index 8d90e7625..b7ee9f016 100644 --- a/src/widget/ReaderDriverModel.cpp +++ b/src/widget/ReaderDriverModel.cpp @@ -1,5 +1,5 @@ /*! - * \copyright Copyright (c) 2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2017-2018 Governikus GmbH & Co. KG, Germany */ #include "ReaderDriverModel.h" diff --git a/src/widget/ReaderDriverModel.h b/src/widget/ReaderDriverModel.h index c6b7099cb..a3ea3c15a 100644 --- a/src/widget/ReaderDriverModel.h +++ b/src/widget/ReaderDriverModel.h @@ -1,7 +1,7 @@ /*! * \brief Model implementation for the reader driver table * - * \copyright Copyright (c) 2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2017-2018 Governikus GmbH & Co. KG, Germany */ #pragma once diff --git a/src/widget/RemotePinInputDialog.cpp b/src/widget/RemotePinInputDialog.cpp index 222632d6a..f0bc9758c 100644 --- a/src/widget/RemotePinInputDialog.cpp +++ b/src/widget/RemotePinInputDialog.cpp @@ -1,5 +1,5 @@ /*! - * \copyright Copyright (c) 2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2017-2018 Governikus GmbH & Co. KG, Germany */ #include "RemotePinInputDialog.h" diff --git a/src/widget/RemotePinInputDialog.h b/src/widget/RemotePinInputDialog.h index b4a57f9aa..c839cf400 100644 --- a/src/widget/RemotePinInputDialog.h +++ b/src/widget/RemotePinInputDialog.h @@ -1,7 +1,7 @@ /*! * \brief Dialog for PIN input for device pairing. * - * \copyright Copyright (c) 2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2017-2018 Governikus GmbH & Co. KG, Germany */ #pragma once diff --git a/src/widget/SelfInformationWidget.cpp b/src/widget/SelfInformationWidget.cpp index ef2e56d84..bb93ff92a 100644 --- a/src/widget/SelfInformationWidget.cpp +++ b/src/widget/SelfInformationWidget.cpp @@ -1,5 +1,5 @@ /*! - * \copyright Copyright (c) 2014-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2014-2018 Governikus GmbH & Co. KG, Germany */ #include "SelfInformationWidget.h" @@ -9,6 +9,7 @@ #include #include +#include #include using namespace governikus; diff --git a/src/widget/SelfInformationWidget.h b/src/widget/SelfInformationWidget.h index 0b054f16e..4528b4a0a 100644 --- a/src/widget/SelfInformationWidget.h +++ b/src/widget/SelfInformationWidget.h @@ -1,7 +1,7 @@ /*! * \brief Widget for starting the self information workflow. * - * \copyright Copyright (c) 2014-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2014-2018 Governikus GmbH & Co. KG, Germany */ #pragma once diff --git a/src/widget/SettingsWidget.cpp b/src/widget/SettingsWidget.cpp index 64b389a75..e0ac024cc 100644 --- a/src/widget/SettingsWidget.cpp +++ b/src/widget/SettingsWidget.cpp @@ -1,10 +1,11 @@ /*! - * \copyright Copyright (c) 2014-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2014-2018 Governikus GmbH & Co. KG, Germany */ #include "SettingsWidget.h" #include "AppSettings.h" +#include "ReaderManager.h" #include "ui_SettingsWidget.h" #include @@ -18,6 +19,7 @@ using namespace governikus; SettingsWidget::SettingsWidget(QWidget* pParent) : QWidget(pParent) , mUi(new Ui::SettingsWidget()) + , mScanRunning(false) , mWorkflowRunning(false) , mSettingsChanged(false) { @@ -141,9 +143,23 @@ void SettingsWidget::hideEvent(QHideEvent* pEvent) } +void SettingsWidget::showEvent(QShowEvent* pEvent) +{ + QWidget::showEvent(pEvent); + + if (mUi->settingsTabWidget->currentWidget() == mUi->pinTab || mUi->settingsTabWidget->currentWidget() == mUi->readerDeviceTab) + { + mScanRunning = true; + ReaderManager& readerManager = ReaderManager::getInstance(); + readerManager.startScanAll(mUi->settingsTabWidget->currentWidget() == mUi->pinTab); + } +} + + void SettingsWidget::onTabChanged(int pIndex) { - if (mUi->settingsTabWidget->widget(pIndex) != mUi->generalTab) + QWidget* const currentWidget = mUi->settingsTabWidget->widget(pIndex); + if (currentWidget != mUi->generalTab) { if (mSettingsChanged) { @@ -156,6 +172,18 @@ void SettingsWidget::onTabChanged(int pIndex) setSettingsChanged(mSettingsChanged); } + ReaderManager& readerManager = ReaderManager::getInstance(); + if (currentWidget == mUi->pinTab || currentWidget == mUi->readerDeviceTab) + { + mScanRunning = true; + readerManager.startScanAll(currentWidget == mUi->pinTab); + } + else if (mScanRunning) + { + mScanRunning = false; + readerManager.stopScanAll(); + } + onUpdateApplyButtonText(); onUpdateButtonState(); } @@ -164,10 +192,11 @@ void SettingsWidget::onTabChanged(int pIndex) void SettingsWidget::showSettingsChangedMessage() { QMessageBox msgBox(this); - msgBox.setStandardButtons(QMessageBox::Yes | QMessageBox::No); msgBox.setWindowTitle(QCoreApplication::applicationName() + QStringLiteral(" - ") + tr("Apply settings?")); msgBox.setWindowModality(Qt::WindowModal); msgBox.setText(tr("Do you want to apply the changes?")); + msgBox.setStandardButtons(QMessageBox::Yes | QMessageBox::No); + msgBox.button(QMessageBox::Yes)->setFocus(); if (msgBox.exec() == QMessageBox::Yes) { diff --git a/src/widget/SettingsWidget.h b/src/widget/SettingsWidget.h index 2a0b388e1..db24be275 100644 --- a/src/widget/SettingsWidget.h +++ b/src/widget/SettingsWidget.h @@ -1,7 +1,7 @@ /*! * \brief Widget for the settings. * - * \copyright Copyright (c) 2014-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2014-2018 Governikus GmbH & Co. KG, Germany */ #pragma once @@ -27,6 +27,7 @@ class SettingsWidget private: QScopedPointer mUi; + bool mScanRunning; bool mWorkflowRunning; bool mSettingsChanged; @@ -53,6 +54,7 @@ class SettingsWidget protected: virtual void paintEvent(QPaintEvent*) override; virtual void hideEvent(QHideEvent* pEvent) override; + virtual void showEvent(QShowEvent* pEvent) override; virtual void changeEvent(QEvent* pEvent) override; public: @@ -61,6 +63,12 @@ class SettingsWidget void keyPressEvent(QKeyEvent* pEvent) override; + bool remoteScanRunning() const + { + return mScanRunning; + } + + void workflowStarted(); void workflowFinished(); diff --git a/src/widget/SetupAssistantGui.cpp b/src/widget/SetupAssistantGui.cpp index 4abd3fa1f..d880858fe 100644 --- a/src/widget/SetupAssistantGui.cpp +++ b/src/widget/SetupAssistantGui.cpp @@ -1,5 +1,5 @@ /*! - * \copyright Copyright (c) 2016-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2016-2018 Governikus GmbH & Co. KG, Germany */ #include "SetupAssistantGui.h" diff --git a/src/widget/SetupAssistantGui.h b/src/widget/SetupAssistantGui.h index ae79247de..e2f7611a1 100644 --- a/src/widget/SetupAssistantGui.h +++ b/src/widget/SetupAssistantGui.h @@ -1,7 +1,7 @@ /*! * \brief Qt widget based SetupAssistantUi implementation. * - * \copyright Copyright (c) 2016-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2016-2018 Governikus GmbH & Co. KG, Germany */ #pragma once diff --git a/src/widget/SetupAssistantWizard.cpp b/src/widget/SetupAssistantWizard.cpp index 34bf665d3..abc640d47 100644 --- a/src/widget/SetupAssistantWizard.cpp +++ b/src/widget/SetupAssistantWizard.cpp @@ -1,5 +1,5 @@ /*! - * \copyright Copyright (c) 2014-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2014-2018 Governikus GmbH & Co. KG, Germany */ #include "SetupAssistantWizard.h" @@ -35,8 +35,7 @@ CardReaderPage::CardReaderPage(const QString& pTitle, const QString& pAccessible SetupAssistantWizard::SetupAssistantWizard(QWidget* pParent) : QWizard(pParent) - , mPageCount(0) - , mNoScriptFinder() + , mPageCount(3) , mSaveHistoryCheckBox(new QCheckBox(this)) , mChangeTransportPinButton() { @@ -56,17 +55,7 @@ SetupAssistantWizard::SetupAssistantWizard(QWidget* pParent) setOption(QWizard::NoCancelButton, false); setAttribute(Qt::WA_DeleteOnClose); - mPageCount = 3; - if (mNoScriptFinder.isExtensionFound()) - { - ++mPageCount; - } - addPage(createWizardInitialPinPage()); - if (mNoScriptFinder.isExtensionFound()) - { - addPage(createWizardNoScriptExtensionPage()); - } addPage(createWizardCardReaderPage()); addPage(createConclusionPage()); } @@ -172,28 +161,6 @@ QWizardPage* SetupAssistantWizard::createWizardCardReaderPage() } -QWizardPage* SetupAssistantWizard::createWizardNoScriptExtensionPage() -{ - QWizardPage* wizardPage = new QWizardPage; - const auto& title = tr("Firefox extension NoScript"); - wizardPage->setTitle(createTitle(title)); - - QString descriptionText = tr("The Firefox browser extension NoScript was found on your computer." - " The configuration of this extension may block authentication requests from being passed to %1." - " Refer to the online help for further details.").arg(QCoreApplication::applicationName()); - QLabel* label = new QLabel(descriptionText); - label->setWordWrap(true); - label->setFocusPolicy(Qt::TabFocus); - label->setAccessibleName(createAccessibleName(title, descriptionText)); - - QVBoxLayout* pageLayout = new QVBoxLayout; - pageLayout->addWidget(label); - wizardPage->setLayout(pageLayout); - - return wizardPage; -} - - QWizardPage* SetupAssistantWizard::createConclusionPage() { QWizardPage* conclusionPage = new QWizardPage; diff --git a/src/widget/SetupAssistantWizard.h b/src/widget/SetupAssistantWizard.h index f528ef6af..15b823b7b 100644 --- a/src/widget/SetupAssistantWizard.h +++ b/src/widget/SetupAssistantWizard.h @@ -1,13 +1,11 @@ /*! * \brief Setup assistant wizard before application startup. * - * \copyright Copyright (c) 2014-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2014-2018 Governikus GmbH & Co. KG, Germany */ #pragma once -#include "NoScriptFinder.h" - #include #include #include @@ -45,7 +43,6 @@ class SetupAssistantWizard Q_OBJECT int mPageCount; - NoScriptFinder mNoScriptFinder; QPointer mSaveHistoryCheckBox; QPointer mChangeTransportPinButton; @@ -65,7 +62,6 @@ class SetupAssistantWizard QString createDescription(const QString& pTitle, const QString& pSummary) const; QWizardPage* createWizardInitialPinPage(); QWizardPage* createWizardCardReaderPage(); - QWizardPage* createWizardNoScriptExtensionPage(); QWizardPage* createConclusionPage(); private Q_SLOTS: diff --git a/src/widget/UIPlugInWidgets.cpp b/src/widget/UIPlugInWidgets.cpp index 30d37f83d..f25212ac0 100644 --- a/src/widget/UIPlugInWidgets.cpp +++ b/src/widget/UIPlugInWidgets.cpp @@ -1,5 +1,5 @@ /*! - * \copyright Copyright (c) 2015-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2015-2018 Governikus GmbH & Co. KG, Germany */ #include "UIPlugInWidgets.h" diff --git a/src/widget/UIPlugInWidgets.h b/src/widget/UIPlugInWidgets.h index 9b49d335c..65c070cd3 100644 --- a/src/widget/UIPlugInWidgets.h +++ b/src/widget/UIPlugInWidgets.h @@ -1,7 +1,7 @@ /*! * \brief QWidgets implementation of UIPlugIn. * - * \copyright Copyright (c) 2015-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2015-2018 Governikus GmbH & Co. KG, Germany */ #pragma once diff --git a/src/widget/UpdateWindow.cpp b/src/widget/UpdateWindow.cpp index 953d87613..8e38befed 100644 --- a/src/widget/UpdateWindow.cpp +++ b/src/widget/UpdateWindow.cpp @@ -1,5 +1,5 @@ /*! - * \copyright Copyright (c) 2016-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2016-2018 Governikus GmbH & Co. KG, Germany */ #include "Env.h" diff --git a/src/widget/UpdateWindow.h b/src/widget/UpdateWindow.h index ed9365bc4..0f8d7d6c4 100644 --- a/src/widget/UpdateWindow.h +++ b/src/widget/UpdateWindow.h @@ -1,7 +1,7 @@ /*! * \brief Window for application updates * - * \copyright Copyright (c) 2016-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2016-2018 Governikus GmbH & Co. KG, Germany */ #pragma once diff --git a/src/widget/generic/BusyOverlay.cpp b/src/widget/generic/BusyOverlay.cpp index 05600554d..4199d89b9 100644 --- a/src/widget/generic/BusyOverlay.cpp +++ b/src/widget/generic/BusyOverlay.cpp @@ -1,5 +1,5 @@ /*! - * \copyright Copyright (c) 2014-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2014-2018 Governikus GmbH & Co. KG, Germany */ #include "BusyOverlay.h" @@ -10,6 +10,7 @@ #include #include #include +#include using namespace governikus; diff --git a/src/widget/generic/BusyOverlay.h b/src/widget/generic/BusyOverlay.h index ea6ebe74a..d7181c63c 100644 --- a/src/widget/generic/BusyOverlay.h +++ b/src/widget/generic/BusyOverlay.h @@ -1,7 +1,7 @@ /*! * \brief Widget for the settings. * - * \copyright Copyright (c) 2014-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2014-2018 Governikus GmbH & Co. KG, Germany */ #pragma once diff --git a/src/widget/generic/BusyOverlayContainer.cpp b/src/widget/generic/BusyOverlayContainer.cpp index 958fd923e..c68b9ca6a 100644 --- a/src/widget/generic/BusyOverlayContainer.cpp +++ b/src/widget/generic/BusyOverlayContainer.cpp @@ -1,5 +1,5 @@ /*! - * \copyright Copyright (c) 2014-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2014-2018 Governikus GmbH & Co. KG, Germany */ #include "BusyOverlayContainer.h" diff --git a/src/widget/generic/BusyOverlayContainer.h b/src/widget/generic/BusyOverlayContainer.h index f6872de4d..14b9b7bc4 100644 --- a/src/widget/generic/BusyOverlayContainer.h +++ b/src/widget/generic/BusyOverlayContainer.h @@ -1,7 +1,7 @@ /*! * \brief An overlay to show a busy indicator. * - * \copyright Copyright (c) 2014-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2014-2018 Governikus GmbH & Co. KG, Germany */ #pragma once diff --git a/src/widget/generic/ButtonState.h b/src/widget/generic/ButtonState.h index 04d008f28..5366458f3 100644 --- a/src/widget/generic/ButtonState.h +++ b/src/widget/generic/ButtonState.h @@ -1,7 +1,7 @@ /*! * \brief Defines the ButtonState enum. * - * \copyright Copyright (c) 2014-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2014-2018 Governikus GmbH & Co. KG, Germany */ #pragma once diff --git a/src/widget/generic/ExclusiveButtonGroup.cpp b/src/widget/generic/ExclusiveButtonGroup.cpp index 920ed6728..1f2e8ee83 100644 --- a/src/widget/generic/ExclusiveButtonGroup.cpp +++ b/src/widget/generic/ExclusiveButtonGroup.cpp @@ -1,5 +1,5 @@ /*! - * \copyright Copyright (c) 2014-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2014-2018 Governikus GmbH & Co. KG, Germany */ #include "ExclusiveButtonGroup.h" diff --git a/src/widget/generic/ExclusiveButtonGroup.h b/src/widget/generic/ExclusiveButtonGroup.h index f540cc89a..6b0bbcac4 100644 --- a/src/widget/generic/ExclusiveButtonGroup.h +++ b/src/widget/generic/ExclusiveButtonGroup.h @@ -4,7 +4,7 @@ * Bug in Qt 5.2.1: Buttons in a QButtonGroup cannot be navigated via the Tab key. This * class provides a work-around for simple cases. * - * \copyright Copyright (c) 2014-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2014-2018 Governikus GmbH & Co. KG, Germany */ #pragma once diff --git a/src/widget/generic/GuiModule.h b/src/widget/generic/GuiModule.h index 1636a54ae..344b20559 100644 --- a/src/widget/generic/GuiModule.h +++ b/src/widget/generic/GuiModule.h @@ -1,7 +1,7 @@ /*! * \brief Defines the GuiModule enum. * - * \copyright Copyright (c) 2014-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2014-2018 Governikus GmbH & Co. KG, Germany */ #pragma once diff --git a/src/widget/generic/GuiUtils.cpp b/src/widget/generic/GuiUtils.cpp index b3576bf54..6f62c5d49 100644 --- a/src/widget/generic/GuiUtils.cpp +++ b/src/widget/generic/GuiUtils.cpp @@ -1,9 +1,10 @@ /*! - * \copyright Copyright (c) 2014-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2014-2018 Governikus GmbH & Co. KG, Germany */ #include "GuiUtils.h" +#include #include #include #include @@ -71,7 +72,8 @@ void GuiUtils::showPinCanPukErrorDialog(CardReturnCode pReturnCode, int pRetryCo messageBox.setWindowFlags(messageBox.windowFlags() & ~Qt::WindowContextHelpButtonHint); messageBox.setText(QStringLiteral("

%1

%2

").arg(title, text)); messageBox.setIconPixmap(QIcon(QStringLiteral(":/images/npa.svg")).pixmap(32, 32)); - messageBox.setStandardButtons(QMessageBox::StandardButton::Ok); + messageBox.setStandardButtons(QMessageBox::Ok); + messageBox.button(QMessageBox::Ok)->setFocus(); messageBox.exec(); } @@ -95,7 +97,8 @@ bool GuiUtils::showWrongPinBlockedDialog(QWidget* pParent) messageBox.setWindowModality(Qt::WindowModal); messageBox.setText(QStringLiteral("

%1

%2

").arg(title, text)); messageBox.setIcon(QMessageBox::Warning); - messageBox.setStandardButtons(QMessageBox::Yes | QMessageBox::Cancel); + messageBox.button(QMessageBox::Yes)->setFocus(); + return messageBox.exec() == QMessageBox::Yes; } diff --git a/src/widget/generic/GuiUtils.h b/src/widget/generic/GuiUtils.h index 859d79387..3cb5534e4 100644 --- a/src/widget/generic/GuiUtils.h +++ b/src/widget/generic/GuiUtils.h @@ -1,7 +1,7 @@ /*! * \brief Gui utility functions. * - * \copyright Copyright (c) 2014-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2014-2018 Governikus GmbH & Co. KG, Germany */ #pragma once diff --git a/src/widget/generic/HelpAction.cpp b/src/widget/generic/HelpAction.cpp index fd817c2fa..c77ddafed 100644 --- a/src/widget/generic/HelpAction.cpp +++ b/src/widget/generic/HelpAction.cpp @@ -1,5 +1,5 @@ /*! - * \copyright Copyright (c) 2014-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2014-2018 Governikus GmbH & Co. KG, Germany */ #include "HelpAction.h" @@ -118,7 +118,7 @@ QUrl HelpAction::getHelpUrlWrapper(const QString& pObjectName) const } -QString HelpAction::getOnlineUrl(const QString& pObjectName) const +QString HelpAction::getOnlineUrl(const QString& pObjectName) { #ifdef Q_OS_MACOS const QLatin1String osPath("macOS"); @@ -129,7 +129,7 @@ QString HelpAction::getOnlineUrl(const QString& pObjectName) const const auto& appVersion = VersionNumber::getApplicationVersion().getVersionNumber(); const QString ver = QString::number(appVersion.majorVersion()) % QLatin1Char('.') % QString::number(appVersion.minorVersion()); const QString locale = QLocale(LanguageLoader::getInstance().getUsedLocale().language()).bcp47Name().mid(0, 2); - const QString mapping = getContextMapping(pObjectName); + const QString mapping = getInstance().getContextMapping(pObjectName); return QStringLiteral("https://www.ausweisapp.bund.de/ausweisapp2/handbuch/") % ver % QLatin1Char('/') % locale % QLatin1Char('/') % osPath % QLatin1Char('/') % mapping; } @@ -137,7 +137,7 @@ QString HelpAction::getOnlineUrl(const QString& pObjectName) const void HelpAction::openContextHelp(const QString& pObjectName) { //const auto& url = getInstance().getHelpUrlWrapper(pObjectName); - const auto& url = QUrl(getInstance().getOnlineUrl(pObjectName)); - qCDebug(gui) << "Open manual:" << pObjectName << '|' << url; + const auto& url = QUrl(getOnlineUrl(pObjectName)); + qCDebug(gui) << "Open online help:" << pObjectName << '|' << url; QDesktopServices::openUrl(url); } diff --git a/src/widget/generic/HelpAction.h b/src/widget/generic/HelpAction.h index 3166518ab..e4edcd477 100644 --- a/src/widget/generic/HelpAction.h +++ b/src/widget/generic/HelpAction.h @@ -2,7 +2,7 @@ * \brief Helper class for mapping object name from f1 widget to help file. * \see AppQtMainWidget::onContentActionClicked() * - * \copyright Copyright (c) 2014-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2014-2018 Governikus GmbH & Co. KG, Germany */ #pragma once @@ -30,7 +30,6 @@ class HelpAction QString getHelpPath(QLocale::Language pLang) const; QString getHelpUrl(const QString& pObjectName) const; QUrl getHelpUrlWrapper(const QString& pObjectName) const; - QString getOnlineUrl(const QString& pObjectName = QString()) const; protected: static HelpAction& getInstance(); @@ -38,6 +37,7 @@ class HelpAction ~HelpAction() = default; public: + static QString getOnlineUrl(const QString& pObjectName = QString()); static void openContextHelp(const QString& pObjectName = QStringLiteral("applicationPage")); }; diff --git a/src/widget/generic/ListCheckItemWidget.cpp b/src/widget/generic/ListCheckItemWidget.cpp index f7e272b2b..76c3a33a3 100644 --- a/src/widget/generic/ListCheckItemWidget.cpp +++ b/src/widget/generic/ListCheckItemWidget.cpp @@ -1,5 +1,5 @@ /*! - * \copyright Copyright (c) 2014-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2014-2018 Governikus GmbH & Co. KG, Germany */ #include @@ -7,6 +7,7 @@ #include #include #include +#include #include "generic/ListCheckItemWidget.h" #include "ui_ListCheckItemWidget.h" @@ -127,6 +128,7 @@ void ListCheckItemWidget::changeEvent(QEvent* pEvent) if (pEvent->type() == QEvent::LanguageChange) { mUi->retranslateUi(this); - QWidget::changeEvent(pEvent); } + + QWidget::changeEvent(pEvent); } diff --git a/src/widget/generic/ListCheckItemWidget.h b/src/widget/generic/ListCheckItemWidget.h index 084b31509..edd7b2992 100644 --- a/src/widget/generic/ListCheckItemWidget.h +++ b/src/widget/generic/ListCheckItemWidget.h @@ -1,7 +1,7 @@ /*! * \brief List item widget for list actions. * - * \copyright Copyright (c) 2014-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2014-2018 Governikus GmbH & Co. KG, Germany */ #pragma once diff --git a/src/widget/generic/ListItem.cpp b/src/widget/generic/ListItem.cpp index 4ed0de4d8..e7cf66677 100644 --- a/src/widget/generic/ListItem.cpp +++ b/src/widget/generic/ListItem.cpp @@ -1,5 +1,5 @@ /* - * \copyright Copyright (c) 2014-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2014-2018 Governikus GmbH & Co. KG, Germany */ #include "ListItem.h" diff --git a/src/widget/generic/ListItem.h b/src/widget/generic/ListItem.h index f1693bedb..a0cf0d97a 100644 --- a/src/widget/generic/ListItem.h +++ b/src/widget/generic/ListItem.h @@ -1,5 +1,5 @@ /* - * \copyright Copyright (c) 2014-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2014-2018 Governikus GmbH & Co. KG, Germany */ #pragma once diff --git a/src/widget/generic/ListItemIconLeft.cpp b/src/widget/generic/ListItemIconLeft.cpp index 308d87ba4..d0952f925 100644 --- a/src/widget/generic/ListItemIconLeft.cpp +++ b/src/widget/generic/ListItemIconLeft.cpp @@ -1,5 +1,5 @@ /* - * \copyright Copyright (c) 2014-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2014-2018 Governikus GmbH & Co. KG, Germany */ #include "ListItemIconLeft.h" diff --git a/src/widget/generic/ListItemIconLeft.h b/src/widget/generic/ListItemIconLeft.h index 81f873dc3..5a2610ee5 100644 --- a/src/widget/generic/ListItemIconLeft.h +++ b/src/widget/generic/ListItemIconLeft.h @@ -1,5 +1,5 @@ /* - * \copyright Copyright (c) 2014-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2014-2018 Governikus GmbH & Co. KG, Germany */ #pragma once diff --git a/src/widget/generic/ListItemIconRight.cpp b/src/widget/generic/ListItemIconRight.cpp index 561867593..a0d570972 100644 --- a/src/widget/generic/ListItemIconRight.cpp +++ b/src/widget/generic/ListItemIconRight.cpp @@ -1,5 +1,5 @@ /* - * \copyright Copyright (c) 2014-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2014-2018 Governikus GmbH & Co. KG, Germany */ #include "ListItemIconRight.h" diff --git a/src/widget/generic/ListItemIconRight.h b/src/widget/generic/ListItemIconRight.h index c19ee47c1..572b85566 100644 --- a/src/widget/generic/ListItemIconRight.h +++ b/src/widget/generic/ListItemIconRight.h @@ -1,5 +1,5 @@ /* - * \copyright Copyright (c) 2014-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2014-2018 Governikus GmbH & Co. KG, Germany */ #pragma once diff --git a/src/widget/generic/ListItemSubTitle.cpp b/src/widget/generic/ListItemSubTitle.cpp index 0a4bf818c..d6d2db26a 100644 --- a/src/widget/generic/ListItemSubTitle.cpp +++ b/src/widget/generic/ListItemSubTitle.cpp @@ -1,5 +1,5 @@ /* - * \copyright Copyright (c) 2014-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2014-2018 Governikus GmbH & Co. KG, Germany */ #include "ListItemSubTitle.h" diff --git a/src/widget/generic/ListItemSubTitle.h b/src/widget/generic/ListItemSubTitle.h index d158f1c5c..76656124f 100644 --- a/src/widget/generic/ListItemSubTitle.h +++ b/src/widget/generic/ListItemSubTitle.h @@ -1,5 +1,5 @@ /* - * \copyright Copyright (c) 2014-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2014-2018 Governikus GmbH & Co. KG, Germany */ #pragma once diff --git a/src/widget/generic/ListItemTitle.cpp b/src/widget/generic/ListItemTitle.cpp index 94de12e32..93b93366a 100644 --- a/src/widget/generic/ListItemTitle.cpp +++ b/src/widget/generic/ListItemTitle.cpp @@ -1,5 +1,5 @@ /* - * \copyright Copyright (c) 2014-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2014-2018 Governikus GmbH & Co. KG, Germany */ #include "ListItemTitle.h" diff --git a/src/widget/generic/ListItemTitle.h b/src/widget/generic/ListItemTitle.h index debfb4887..1265916f4 100644 --- a/src/widget/generic/ListItemTitle.h +++ b/src/widget/generic/ListItemTitle.h @@ -1,5 +1,5 @@ /* - * \copyright Copyright (c) 2014-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2014-2018 Governikus GmbH & Co. KG, Germany */ #pragma once diff --git a/src/widget/generic/PasswordEdit.cpp b/src/widget/generic/PasswordEdit.cpp index 35f7734a8..e8304535f 100644 --- a/src/widget/generic/PasswordEdit.cpp +++ b/src/widget/generic/PasswordEdit.cpp @@ -1,5 +1,5 @@ /*! - * \copyright Copyright (c) 2014-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2014-2018 Governikus GmbH & Co. KG, Germany */ diff --git a/src/widget/generic/PasswordEdit.h b/src/widget/generic/PasswordEdit.h index d8693b658..d0fd03bcb 100644 --- a/src/widget/generic/PasswordEdit.h +++ b/src/widget/generic/PasswordEdit.h @@ -1,7 +1,7 @@ /*! * \brief Widget for entering a password that uses the password echo mode. * - * \copyright Copyright (c) 2014-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2014-2018 Governikus GmbH & Co. KG, Germany */ #pragma once diff --git a/src/widget/generic/TabButtonGroup.cpp b/src/widget/generic/TabButtonGroup.cpp index d581821f6..4e20412fd 100644 --- a/src/widget/generic/TabButtonGroup.cpp +++ b/src/widget/generic/TabButtonGroup.cpp @@ -1,5 +1,5 @@ /*! - * \copyright Copyright (c) 2014-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2014-2018 Governikus GmbH & Co. KG, Germany */ #include "TabButtonGroup.h" diff --git a/src/widget/generic/TabButtonGroup.h b/src/widget/generic/TabButtonGroup.h index 618cc479b..234b58d7c 100644 --- a/src/widget/generic/TabButtonGroup.h +++ b/src/widget/generic/TabButtonGroup.h @@ -3,7 +3,7 @@ * * The other classes defined in this header are implementation private. * - * \copyright Copyright (c) 2014-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2014-2018 Governikus GmbH & Co. KG, Germany */ #pragma once diff --git a/src/widget/step/AuthenticateStepsWidget.cpp b/src/widget/step/AuthenticateStepsWidget.cpp index a92cdee0d..c125c5d2a 100644 --- a/src/widget/step/AuthenticateStepsWidget.cpp +++ b/src/widget/step/AuthenticateStepsWidget.cpp @@ -1,11 +1,12 @@ /*! - * \copyright Copyright (c) 2014-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2014-2018 Governikus GmbH & Co. KG, Germany */ #include "AuthenticateStepsWidget.h" #include "ui_AuthenticateStepsWidget.h" #include +#include #include "AppStartPage.h" #include "generic/BusyOverlayContainer.h" diff --git a/src/widget/step/AuthenticateStepsWidget.h b/src/widget/step/AuthenticateStepsWidget.h index c3b2ba434..918d49de8 100644 --- a/src/widget/step/AuthenticateStepsWidget.h +++ b/src/widget/step/AuthenticateStepsWidget.h @@ -1,7 +1,7 @@ /*! * \brief A stacked widget containing the widgets for the authentication steps. * - * \copyright Copyright (c) 2014-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2014-2018 Governikus GmbH & Co. KG, Germany */ #pragma once diff --git a/src/widget/step/SelfInfoWidget.cpp b/src/widget/step/SelfInfoWidget.cpp index 20a38e43a..95b073dda 100644 --- a/src/widget/step/SelfInfoWidget.cpp +++ b/src/widget/step/SelfInfoWidget.cpp @@ -1,5 +1,5 @@ /*! - * \copyright Copyright (c) 2014-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2014-2018 Governikus GmbH & Co. KG, Germany */ #include "SelfInfoWidget.h" @@ -15,6 +15,7 @@ #include #include #include +#include using namespace governikus; @@ -55,7 +56,10 @@ void SelfInfoWidget::fillLayout() for (const auto& entry : orderedSelfData) { QLabel* const tmpLabel = new QLabel(entry.first); - tmpLabel->setFocusPolicy(Qt::TabFocus); + if (!entry.first.isEmpty()) + { + tmpLabel->setFocusPolicy(Qt::TabFocus); + } tmpLabel->setAlignment(Qt::AlignLeading | Qt::AlignLeft | Qt::AlignTop); QLabel* const tmpField = new QLabel(entry.second); diff --git a/src/widget/step/SelfInfoWidget.h b/src/widget/step/SelfInfoWidget.h index 15b0e12ac..9f416dde5 100644 --- a/src/widget/step/SelfInfoWidget.h +++ b/src/widget/step/SelfInfoWidget.h @@ -1,7 +1,7 @@ /*! * \brief A widget displaying the card data retrieved in the self info workflow. * - * \copyright Copyright (c) 2014-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2014-2018 Governikus GmbH & Co. KG, Germany */ #pragma once diff --git a/src/widget/step/StepAdviseUserToRemoveCardGui.cpp b/src/widget/step/StepAdviseUserToRemoveCardGui.cpp index 3583e80e3..47ce3f936 100644 --- a/src/widget/step/StepAdviseUserToRemoveCardGui.cpp +++ b/src/widget/step/StepAdviseUserToRemoveCardGui.cpp @@ -1,5 +1,5 @@ /*! - * \copyright Copyright (c) 2014-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2014-2018 Governikus GmbH & Co. KG, Germany */ #include "StepAdviseUserToRemoveCardGui.h" @@ -7,10 +7,10 @@ #include "PinSettingsWidget.h" #include "ReaderManager.h" +#include #include #include - using namespace governikus; @@ -85,6 +85,8 @@ void StepAdviseUserToRemoveCardGui::activate() mMessageBox->setWindowFlags(mMessageBox->windowFlags() & ~Qt::WindowContextHelpButtonHint); mMessageBox->setText(tr("You may now remove your ID card from the card reader.")); mMessageBox->setIconPixmap(QIcon(QStringLiteral(":/images/npa.svg")).pixmap(32, 32)); + mMessageBox->setStandardButtons(QMessageBox::Ok); + mMessageBox->button(QMessageBox::Ok)->setFocus(); } mMessageBox->exec(); diff --git a/src/widget/step/StepAdviseUserToRemoveCardGui.h b/src/widget/step/StepAdviseUserToRemoveCardGui.h index b4fbd0ae3..521f4678f 100644 --- a/src/widget/step/StepAdviseUserToRemoveCardGui.h +++ b/src/widget/step/StepAdviseUserToRemoveCardGui.h @@ -1,7 +1,7 @@ /*! * \brief Qt UI for the advise user to remove card step. * - * \copyright Copyright (c) 2014-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2014-2018 Governikus GmbH & Co. KG, Germany */ #pragma once diff --git a/src/widget/step/StepAuthenticationDoneGui.cpp b/src/widget/step/StepAuthenticationDoneGui.cpp index 6817a3972..a082a9cc7 100644 --- a/src/widget/step/StepAuthenticationDoneGui.cpp +++ b/src/widget/step/StepAuthenticationDoneGui.cpp @@ -1,5 +1,5 @@ /*! - * \copyright Copyright (c) 2014-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2014-2018 Governikus GmbH & Co. KG, Germany */ #include "StepAuthenticationDoneGui.h" diff --git a/src/widget/step/StepAuthenticationDoneGui.h b/src/widget/step/StepAuthenticationDoneGui.h index 79115e02d..8b161568b 100644 --- a/src/widget/step/StepAuthenticationDoneGui.h +++ b/src/widget/step/StepAuthenticationDoneGui.h @@ -1,7 +1,7 @@ /*! * \brief Qt UI for the authentication done step. * - * \copyright Copyright (c) 2014-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2014-2018 Governikus GmbH & Co. KG, Germany */ #pragma once diff --git a/src/widget/step/StepAuthenticationEac1Gui.cpp b/src/widget/step/StepAuthenticationEac1Gui.cpp index 2a2e69e5b..ccc6b477e 100644 --- a/src/widget/step/StepAuthenticationEac1Gui.cpp +++ b/src/widget/step/StepAuthenticationEac1Gui.cpp @@ -1,5 +1,5 @@ /*! - * \copyright Copyright (c) 2014-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2014-2018 Governikus GmbH & Co. KG, Germany */ #include "StepAuthenticationEac1Gui.h" diff --git a/src/widget/step/StepAuthenticationEac1Gui.h b/src/widget/step/StepAuthenticationEac1Gui.h index 1b3292cf8..235112b86 100644 --- a/src/widget/step/StepAuthenticationEac1Gui.h +++ b/src/widget/step/StepAuthenticationEac1Gui.h @@ -1,5 +1,5 @@ /*! - * \copyright Copyright (c) 2014-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2014-2018 Governikus GmbH & Co. KG, Germany */ #pragma once diff --git a/src/widget/step/StepAuthenticationEac1Widget.cpp b/src/widget/step/StepAuthenticationEac1Widget.cpp index 8f8853e40..97eacb89a 100644 --- a/src/widget/step/StepAuthenticationEac1Widget.cpp +++ b/src/widget/step/StepAuthenticationEac1Widget.cpp @@ -1,5 +1,5 @@ /*! - * \copyright Copyright (c) 2014-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2014-2018 Governikus GmbH & Co. KG, Germany */ #include "StepAuthenticationEac1Widget.h" @@ -338,6 +338,7 @@ void StepAuthenticationEac1Widget::addChatRightToGui(AccessRight pRight, bool pO QListWidgetItem* item = new QListWidgetItem(); item->setSizeHint(QSize(0, 20)); + item->setData(Qt::AccessibleTextRole, displayText); if (mUi->listWidgetWest->count() < pListSize) { mUi->listWidgetWest->addItem(item); @@ -359,12 +360,15 @@ void StepAuthenticationEac1Widget::createBasicReaderWidget() AppSettings& appSettings = AppSettings::getInstance(); + const auto& allowedDigitsMsg = tr("Only digits (0-9) are permitted."); QRegularExpression onlyNumbersExpression(QStringLiteral("[0-9]*")); if (mContext->getCardConnection()->getReaderInfo().getRetryCounter() == 1) { mCANField = new PasswordEdit(); + mCANField->setAccessibleName(tr("please enter your can")); + mCANField->setAccessibleDescription(allowedDigitsMsg); mCANField->setMaxLength(6); - mCANField->configureValidation(onlyNumbersExpression, tr("Only digits (0-9) are permitted.")); + mCANField->configureValidation(onlyNumbersExpression, allowedDigitsMsg); connect(mCANField, &PasswordEdit::textEdited, this, &StepAuthenticationEac1Widget::canTextEdited); QLabel* canLabel = new QLabel(tr("Card access number (CAN):")); @@ -376,7 +380,7 @@ void StepAuthenticationEac1Widget::createBasicReaderWidget() { QToolButton* button = new QToolButton(); button->setObjectName(QStringLiteral("canRandomButton")); - button->setAccessibleName(tr("Open on screen password dialog")); + button->setAccessibleName(tr("open on screen keyboard")); button->setAutoRaise(true); button->setIcon(QPixmap(QStringLiteral(":/images/randompin/screen_keyboard.png"))); button->setIconSize(QSize(44, 26)); @@ -389,9 +393,10 @@ void StepAuthenticationEac1Widget::createBasicReaderWidget() } mPINField = new PasswordEdit(); - mPINField->setAccessibleName(tr("More information with TAB")); + mPINField->setAccessibleName(tr("please enter your pin")); + mPINField->setAccessibleDescription(allowedDigitsMsg); mPINField->setMaxLength(6); - mPINField->configureValidation(onlyNumbersExpression, tr("Only digits (0-9) are permitted.")); + mPINField->configureValidation(onlyNumbersExpression, allowedDigitsMsg); connect(mPINField, &PasswordEdit::textEdited, this, &StepAuthenticationEac1Widget::pinTextEdited); if (mContext->getCardConnection()->getReaderInfo().getRetryCounter() == 1) @@ -408,7 +413,7 @@ void StepAuthenticationEac1Widget::createBasicReaderWidget() { QToolButton* button = new QToolButton(); button->setObjectName(QStringLiteral("pinRandomButton")); - button->setAccessibleName(tr("Open on screen password dialog")); + button->setAccessibleName(tr("open on screen keyboard")); button->setAutoRaise(true); button->setIcon(QPixmap(QStringLiteral(":/images/randompin/screen_keyboard.png"))); button->setIconSize(QSize(44, 26)); diff --git a/src/widget/step/StepAuthenticationEac1Widget.h b/src/widget/step/StepAuthenticationEac1Widget.h index dd92c6ace..83631f3f9 100644 --- a/src/widget/step/StepAuthenticationEac1Widget.h +++ b/src/widget/step/StepAuthenticationEac1Widget.h @@ -1,7 +1,7 @@ /*! * \brief Widget for the desktop StepAuthenticationEac1Gui. * - * \copyright Copyright (c) 2014-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2014-2018 Governikus GmbH & Co. KG, Germany */ #pragma once diff --git a/src/widget/step/StepAuthenticationEac1Widget.ui b/src/widget/step/StepAuthenticationEac1Widget.ui index 460cee5d5..6622d486f 100644 --- a/src/widget/step/StepAuthenticationEac1Widget.ui +++ b/src/widget/step/StepAuthenticationEac1Widget.ui @@ -201,6 +201,9 @@ Qt::ScrollBarAsNeeded + + true +
@@ -226,6 +229,9 @@ 0 + + true + diff --git a/src/widget/step/StepChooseCardGui.cpp b/src/widget/step/StepChooseCardGui.cpp index 9cea4fd0e..ddab8141f 100644 --- a/src/widget/step/StepChooseCardGui.cpp +++ b/src/widget/step/StepChooseCardGui.cpp @@ -1,5 +1,5 @@ /*! - * \copyright Copyright (c) 2014-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2014-2018 Governikus GmbH & Co. KG, Germany */ #include "StepChooseCardGui.h" @@ -39,12 +39,10 @@ StepChooseCardGui::StepChooseCardGui(const QSharedPointer& pContext mCancelButton = mInformationMessageBox->addButton(tr("Cancel"), QMessageBox::NoRole); mDiagnosisButton = mInformationMessageBox->addButton(tr("Diagnosis"), QMessageBox::YesRole); mDeviceButton = mInformationMessageBox->addButton(tr("Settings"), QMessageBox::YesRole); + mDiagnosisButton->setFocus(); connect(mDiagnosisGui, &DiagnosisGui::fireFinished, this, &StepChooseCardGui::onSubDialogFinished); connect(mReaderDeviceGui, &ReaderDeviceGui::fireFinished, this, &StepChooseCardGui::onSubDialogFinished); - - const QSharedPointer& remoteClient = Env::getSingleton()->getRemoteClient(); - connect(remoteClient.data(), &RemoteClient::fireCertificateRemoved, this, &StepChooseCardGui::onCertificateRemoved); } @@ -137,8 +135,7 @@ void StepChooseCardGui::updateErrorMessage(const QString& pTitle, const QString& } else if (mInformationMessageBox->clickedButton() == mDeviceButton) { - Q_EMIT fireCancelled(); - Q_EMIT fireSwitchToReaderSettingsRequested(); + mReaderDeviceGui->activate(); } } // else: dialog was closed by an onErrorMessage(..., true) call (i.e. card found) @@ -150,7 +147,20 @@ void StepChooseCardGui::onSubDialogFinished() mSubDialogOpen = false; const QSharedPointer& remoteClient = ReaderManager::getInstance().getRemoteClient(); remoteClient->startDetection(); - onReaderManagerSignal(); + QMetaObject::invokeMethod(this, "onReaderManagerSignal", Qt::QueuedConnection); +} + + +const QString StepChooseCardGui::connectedRemoteReaderNames() const +{ + const QSharedPointer& remoteClient = Env::getSingleton()->getRemoteClient(); + const auto deviceInfos = remoteClient->getConnectedDeviceInfos(); + QStringList deviceNames; + for (const auto& info : deviceInfos) + { + deviceNames.append(QLatin1Char('"') + info.getName() + QLatin1Char('"')); + } + return deviceNames.join(QLatin1String(", ")); } @@ -159,9 +169,11 @@ void StepChooseCardGui::onReaderManagerSignal() const auto readers = ReaderManager::getInstance().getReaderInfos(); mDeviceButton->setEnabled(readers.isEmpty()); + mReaderDeviceGui->reactToReaderCount(readers.size()); bool readerWithInsufficientApduLength = false; QVector readersWithNpa; + QVector remoteReaders; for (const auto& readerInfo : readers) { if (!readerInfo.sufficientApduLength()) @@ -172,13 +184,17 @@ void StepChooseCardGui::onReaderManagerSignal() { readersWithNpa << readerInfo; } + if (readerInfo.getPlugInType() == ReaderManagerPlugInType::REMOTE) + { + remoteReaders << readerInfo; + } } if (readers.size() == 0) { updateErrorMessage(tr("No card reader detected. Please make sure that a card reader is connected."), tr("If you would like to set up a local or remote card reader, click on the \"Settings\" button" - " to cancel the current operation and open the reader settings."), + " to open the reader settings."), tr("If you need help or have problems with your card reader click on the" " \"Diagnosis\" button for further information."), false); @@ -207,10 +223,15 @@ void StepChooseCardGui::onReaderManagerSignal() } else { + QString remoteReaderInfo; + if (remoteReaders.size() > 0) + { + remoteReaderInfo = tr("Connected to following remote readers: %1.").arg(connectedRemoteReaderNames()); + } updateErrorMessage(tr("Please place an ID card on the card reader."), tr("If you have already placed an ID card on your card reader, click on \"Diagnosis\"" " for further information."), - QString(), + remoteReaderInfo, false); } } @@ -239,13 +260,3 @@ void StepChooseCardGui::onReaderManagerSignal() } } } - - -void StepChooseCardGui::onCertificateRemoved(QString pDeviceName) -{ - QMessageBox messageBox; - messageBox.setText(tr("The device %1 was unpaired because it does not react to connection attempts. Retry the pairing process if you want to use this device to authenticate yourself.").arg(pDeviceName)); - messageBox.setStandardButtons(QMessageBox::Ok); - messageBox.setDefaultButton(QMessageBox::Ok); - messageBox.exec(); -} diff --git a/src/widget/step/StepChooseCardGui.h b/src/widget/step/StepChooseCardGui.h index 4842bb4ac..a855f091f 100644 --- a/src/widget/step/StepChooseCardGui.h +++ b/src/widget/step/StepChooseCardGui.h @@ -1,7 +1,7 @@ /*! * \brief GUI to select reader/card. * - * \copyright Copyright (c) 2014-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2014-2018 Governikus GmbH & Co. KG, Germany */ #pragma once @@ -39,13 +39,13 @@ class StepChooseCardGui QString getCurrentReaderImage(const QVector& pReaderInfos); static QString formatErrorMessages(const QString& pMessage1, const QString& pMessage2); void updateErrorMessage(const QString& pTitle, const QString& pMessage1, const QString& pMessage2 = QString(), bool closeErrorMessage = false); + const QString connectedRemoteReaderNames() const; private Q_SLOTS: void onSubDialogFinished(); public Q_SLOTS: void onReaderManagerSignal(); - void onCertificateRemoved(QString pDeviceName); public: StepChooseCardGui(const QSharedPointer& pContext, AuthenticateStepsWidget* pStepsWidget); @@ -53,9 +53,6 @@ class StepChooseCardGui virtual void activate() override; virtual void deactivate() override; - - Q_SIGNALS: - void fireSwitchToReaderSettingsRequested(); }; } /* namespace governikus */ diff --git a/src/widget/step/StepErrorGui.cpp b/src/widget/step/StepErrorGui.cpp index 516ca52e8..6e3588b67 100644 --- a/src/widget/step/StepErrorGui.cpp +++ b/src/widget/step/StepErrorGui.cpp @@ -1,5 +1,5 @@ /*! - * \copyright Copyright (c) 2014-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2014-2018 Governikus GmbH & Co. KG, Germany */ #include "StepErrorGui.h" @@ -7,7 +7,7 @@ #include "AppQtMainWidget.h" #include "generic/GuiUtils.h" -#include +#include #include #include #include @@ -59,7 +59,16 @@ void StepErrorGui::reportError() Q_ASSERT(!message.isEmpty()); } - QMessageBox::warning(mMainWidget, QCoreApplication::applicationName() + QStringLiteral(" - ") + tr("Error"), message); + QMessageBox box(mMainWidget); + box.setWindowTitle(QApplication::applicationName() + QStringLiteral(" - ") + tr("Error")); + box.setWindowModality(Qt::ApplicationModal); + box.setIcon(QMessageBox::Warning); + box.setWindowFlags(box.windowFlags() & ~Qt::WindowContextHelpButtonHint); + box.setText(message); + box.setStandardButtons(QMessageBox::Ok); + box.button(QMessageBox::Ok)->setFocus(); + box.exec(); + Q_EMIT fireUiFinished(); } diff --git a/src/widget/step/StepErrorGui.h b/src/widget/step/StepErrorGui.h index df9d262de..5c448202b 100644 --- a/src/widget/step/StepErrorGui.h +++ b/src/widget/step/StepErrorGui.h @@ -1,7 +1,7 @@ /*! * \brief GUI for step "Error". * - * \copyright Copyright (c) 2014-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2014-2018 Governikus GmbH & Co. KG, Germany */ #pragma once diff --git a/src/widget/step/StepGui.cpp b/src/widget/step/StepGui.cpp index 154bd2369..ba4353e57 100644 --- a/src/widget/step/StepGui.cpp +++ b/src/widget/step/StepGui.cpp @@ -1,5 +1,5 @@ /*! - * \copyright Copyright (c) 2014-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2014-2018 Governikus GmbH & Co. KG, Germany */ #include "StepGui.h" diff --git a/src/widget/step/StepGui.h b/src/widget/step/StepGui.h index 4519a9e8e..5ee5eab13 100644 --- a/src/widget/step/StepGui.h +++ b/src/widget/step/StepGui.h @@ -1,5 +1,5 @@ /*! - * \copyright Copyright (c) 2014-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2014-2018 Governikus GmbH & Co. KG, Germany */ #pragma once diff --git a/src/widget/step/StepProcessingGui.cpp b/src/widget/step/StepProcessingGui.cpp index be87c60dd..592e339d2 100644 --- a/src/widget/step/StepProcessingGui.cpp +++ b/src/widget/step/StepProcessingGui.cpp @@ -1,5 +1,5 @@ /*! - * \copyright Copyright (c) 2014-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2014-2018 Governikus GmbH & Co. KG, Germany */ #include "StepProcessingGui.h" diff --git a/src/widget/step/StepProcessingGui.h b/src/widget/step/StepProcessingGui.h index 9ff2497fb..179ff9721 100644 --- a/src/widget/step/StepProcessingGui.h +++ b/src/widget/step/StepProcessingGui.h @@ -1,5 +1,5 @@ /*! - * \copyright Copyright (c) 2014-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2014-2018 Governikus GmbH & Co. KG, Germany */ #pragma once diff --git a/src/widget/step/StepShowSelfAuthenticationDataGui.cpp b/src/widget/step/StepShowSelfAuthenticationDataGui.cpp index b6265344b..f55480e3a 100644 --- a/src/widget/step/StepShowSelfAuthenticationDataGui.cpp +++ b/src/widget/step/StepShowSelfAuthenticationDataGui.cpp @@ -1,5 +1,5 @@ /*! - * \copyright Copyright (c) 2014-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2014-2018 Governikus GmbH & Co. KG, Germany */ #include "StepShowSelfAuthenticationDataGui.h" diff --git a/src/widget/step/StepShowSelfAuthenticationDataGui.h b/src/widget/step/StepShowSelfAuthenticationDataGui.h index 9fb16b235..2868a2e4b 100644 --- a/src/widget/step/StepShowSelfAuthenticationDataGui.h +++ b/src/widget/step/StepShowSelfAuthenticationDataGui.h @@ -1,5 +1,5 @@ /*! - * \copyright Copyright (c) 2014-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2014-2018 Governikus GmbH & Co. KG, Germany */ #pragma once diff --git a/src/widget/workflow/GenericWorkflowGui.h b/src/widget/workflow/GenericWorkflowGui.h index c49b9a146..cb9564b90 100644 --- a/src/widget/workflow/GenericWorkflowGui.h +++ b/src/widget/workflow/GenericWorkflowGui.h @@ -1,7 +1,7 @@ /*! * \brief Generic base class for Qt based WorkflowUi implementations. * - * \copyright Copyright (c) 2016-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2016-2018 Governikus GmbH & Co. KG, Germany */ #pragma once diff --git a/src/widget/workflow/WorkflowAuthenticateQtGui.cpp b/src/widget/workflow/WorkflowAuthenticateQtGui.cpp index 1d7b5bdbf..4276c84cb 100644 --- a/src/widget/workflow/WorkflowAuthenticateQtGui.cpp +++ b/src/widget/workflow/WorkflowAuthenticateQtGui.cpp @@ -1,5 +1,5 @@ /*! - * \copyright Copyright (c) 2014-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2014-2018 Governikus GmbH & Co. KG, Germany */ #include "WorkflowAuthenticateQtGui.h" @@ -45,7 +45,6 @@ WorkflowAuthenticateQtGui::WorkflowAuthenticateQtGui(const QSharedPointersetFocus(); + return msgBox.exec() == QMessageBox::Yes; } diff --git a/src/widget/workflow/WorkflowAuthenticateQtGui.h b/src/widget/workflow/WorkflowAuthenticateQtGui.h index 2a58f8f92..ed2e14d1c 100644 --- a/src/widget/workflow/WorkflowAuthenticateQtGui.h +++ b/src/widget/workflow/WorkflowAuthenticateQtGui.h @@ -1,7 +1,7 @@ /*! * \brief Qt widget based WorkflowAuthenticateUi implementation. * - * \copyright Copyright (c) 2014-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2014-2018 Governikus GmbH & Co. KG, Germany */ #pragma once diff --git a/src/widget/workflow/WorkflowChangePinQtGui.cpp b/src/widget/workflow/WorkflowChangePinQtGui.cpp index d8fd4381a..4ce6e3000 100644 --- a/src/widget/workflow/WorkflowChangePinQtGui.cpp +++ b/src/widget/workflow/WorkflowChangePinQtGui.cpp @@ -1,5 +1,5 @@ /*! - * \copyright Copyright (c) 2014-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2014-2018 Governikus GmbH & Co. KG, Germany */ #include "WorkflowChangePinQtGui.h" diff --git a/src/widget/workflow/WorkflowChangePinQtGui.h b/src/widget/workflow/WorkflowChangePinQtGui.h index 42f59d7fc..1438ead55 100644 --- a/src/widget/workflow/WorkflowChangePinQtGui.h +++ b/src/widget/workflow/WorkflowChangePinQtGui.h @@ -1,7 +1,7 @@ /*! * \brief Qt widget based WorkflowChangePinUi implementation. * - * \copyright Copyright (c) 2014-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2014-2018 Governikus GmbH & Co. KG, Germany */ #pragma once diff --git a/src/widget/workflow/WorkflowGui.cpp b/src/widget/workflow/WorkflowGui.cpp index 519c67d32..529314cfc 100644 --- a/src/widget/workflow/WorkflowGui.cpp +++ b/src/widget/workflow/WorkflowGui.cpp @@ -1,5 +1,5 @@ /*! - * \copyright Copyright (c) 2014-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2014-2018 Governikus GmbH & Co. KG, Germany */ #include "WorkflowGui.h" diff --git a/src/widget/workflow/WorkflowGui.h b/src/widget/workflow/WorkflowGui.h index 502510398..442132eaf 100644 --- a/src/widget/workflow/WorkflowGui.h +++ b/src/widget/workflow/WorkflowGui.h @@ -1,7 +1,7 @@ /*! * \brief Base class for Qt based WorkflowUi implementations. * - * \copyright Copyright (c) 2014-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2014-2018 Governikus GmbH & Co. KG, Germany */ #pragma once diff --git a/src/widget/workflow/WorkflowQtWidget.cpp b/src/widget/workflow/WorkflowQtWidget.cpp index 1ef8069c4..dc4b74d82 100644 --- a/src/widget/workflow/WorkflowQtWidget.cpp +++ b/src/widget/workflow/WorkflowQtWidget.cpp @@ -1,5 +1,5 @@ /*! - * \copyright Copyright (c) 2014-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2014-2018 Governikus GmbH & Co. KG, Germany */ #include "WorkflowQtWidget.h" diff --git a/src/widget/workflow/WorkflowQtWidget.h b/src/widget/workflow/WorkflowQtWidget.h index e9d80e30e..5545e59bd 100644 --- a/src/widget/workflow/WorkflowQtWidget.h +++ b/src/widget/workflow/WorkflowQtWidget.h @@ -1,7 +1,7 @@ /*! * \brief Base class for workflow Qt GUI widgets. * - * \copyright Copyright (c) 2014-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2014-2018 Governikus GmbH & Co. KG, Germany */ #pragma once diff --git a/src/widget/workflow/WorkflowSelfInfoQtGui.cpp b/src/widget/workflow/WorkflowSelfInfoQtGui.cpp index fe41361b6..815689e7a 100644 --- a/src/widget/workflow/WorkflowSelfInfoQtGui.cpp +++ b/src/widget/workflow/WorkflowSelfInfoQtGui.cpp @@ -1,5 +1,5 @@ /*! - * \copyright Copyright (c) 2014-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2014-2018 Governikus GmbH & Co. KG, Germany */ #include "WorkflowSelfInfoQtGui.h" @@ -44,7 +44,6 @@ WorkflowSelfInfoQtGui::WorkflowSelfInfoQtGui(const QSharedPointer& { Q_EMIT fireReceived(pMessage, sharedFromThis()); } + + +void MockRemoteDispatcher::close() +{ +} diff --git a/test/helper/MockRemoteDispatcher.h b/test/helper/MockRemoteDispatcher.h index 17013bfb8..81d3b1632 100644 --- a/test/helper/MockRemoteDispatcher.h +++ b/test/helper/MockRemoteDispatcher.h @@ -1,7 +1,7 @@ /*! * \brief Remote dispatcher mock for tests. * - * \copyright Copyright (c) 2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2017-2018 Governikus GmbH & Co. KG, Germany */ #pragma once @@ -37,6 +37,7 @@ class MockRemoteDispatcher virtual const QString& getId() const override; virtual const QString& getContextHandle() const override; virtual void send(const QSharedPointer& pMessage) override; + virtual void close() override; DispatcherState getState() const; void setState(DispatcherState pState); diff --git a/test/helper/MockSocket.cpp b/test/helper/MockSocket.cpp index 0e7d39431..90d2d066b 100644 --- a/test/helper/MockSocket.cpp +++ b/test/helper/MockSocket.cpp @@ -1,5 +1,5 @@ /*! - * \copyright Copyright (c) 2016-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2016-2018 Governikus GmbH & Co. KG, Germany */ #include "MockSocket.h" diff --git a/test/helper/MockSocket.h b/test/helper/MockSocket.h index d5c604b6c..c59c5f55c 100644 --- a/test/helper/MockSocket.h +++ b/test/helper/MockSocket.h @@ -1,7 +1,7 @@ /*! * \brief Mock a QAbstractSocket for tests. * - * \copyright Copyright (c) 2016-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2016-2018 Governikus GmbH & Co. KG, Germany */ #pragma once diff --git a/test/helper/MockWorkflowAuthenticateUi.h b/test/helper/MockWorkflowAuthenticateUi.h index b4e43dce2..1f46578e2 100644 --- a/test/helper/MockWorkflowAuthenticateUi.h +++ b/test/helper/MockWorkflowAuthenticateUi.h @@ -1,7 +1,7 @@ /*! * \brief Mock implementation of WorkflowAuthenticateUi. * - * \copyright Copyright (c) 2014-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2014-2018 Governikus GmbH & Co. KG, Germany */ #pragma once diff --git a/test/helper/MockWorkflowChangePinUi.h b/test/helper/MockWorkflowChangePinUi.h index 8f9a31b5f..c9f508d81 100644 --- a/test/helper/MockWorkflowChangePinUi.h +++ b/test/helper/MockWorkflowChangePinUi.h @@ -1,7 +1,7 @@ /*! * \brief Mock implementation of WorkflowAuthenticateUi. * - * \copyright Copyright (c) 2014-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2014-2018 Governikus GmbH & Co. KG, Germany */ #pragma once diff --git a/test/helper/PersoSimController.cpp b/test/helper/PersoSimController.cpp index 13592e27e..88731d031 100644 --- a/test/helper/PersoSimController.cpp +++ b/test/helper/PersoSimController.cpp @@ -1,5 +1,5 @@ /*! - * \copyright Copyright (c) 2014-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2014-2018 Governikus GmbH & Co. KG, Germany */ #include "PersoSimController.h" diff --git a/test/helper/PersoSimController.h b/test/helper/PersoSimController.h index 14e824802..54d34871a 100644 --- a/test/helper/PersoSimController.h +++ b/test/helper/PersoSimController.h @@ -1,7 +1,7 @@ /*! * \brief Controller for an external PersoSim process. * - * \copyright Copyright (c) 2014-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2014-2018 Governikus GmbH & Co. KG, Germany */ #pragma once diff --git a/test/helper/RemoteMessageChecker.cpp b/test/helper/RemoteMessageChecker.cpp index 9e89efb25..a40afaffe 100644 --- a/test/helper/RemoteMessageChecker.cpp +++ b/test/helper/RemoteMessageChecker.cpp @@ -1,5 +1,5 @@ /*! - * \copyright Copyright (c) 2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2017-2018 Governikus GmbH & Co. KG, Germany */ @@ -32,14 +32,14 @@ void RemoteMessageChecker::processDiscovery(const QSharedPointergetIfdName(), QStringLiteral("Sony Xperia Z5 compact")); QCOMPARE(pMessage->getIfdId(), QStringLiteral("0123456789ABCDEF")); QVERIFY(pMessage->getPort() == static_cast(24728)); - QCOMPARE(pMessage->getSupportedApis(), QStringList({QStringLiteral("IFDInterface_WebSocket_v0"), QStringLiteral("IFDInterface_WebSocket_v2")})); + QCOMPARE(pMessage->getSupportedApis(), {IfdVersion::Version::v0}); } void RemoteMessageChecker::process(const QSharedPointer& pMessage) { QCOMPARE(pMessage->getType(), RemoteCardMessageType::IFDEstablishContext); - QCOMPARE(pMessage->getProtocol(), QStringLiteral("IFDInterface_WebSocket_v0")); + QCOMPARE(pMessage->getProtocol().toString(), QStringLiteral("IFDInterface_WebSocket_v0")); } diff --git a/test/helper/RemoteMessageChecker.h b/test/helper/RemoteMessageChecker.h index 329f11a19..d1e942a37 100644 --- a/test/helper/RemoteMessageChecker.h +++ b/test/helper/RemoteMessageChecker.h @@ -1,7 +1,7 @@ /*! * \brief Helper class to verify the content of remote messages. * - * \copyright Copyright (c) 2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2017-2018 Governikus GmbH & Co. KG, Germany */ #pragma once diff --git a/test/helper/TestAuthContext.cpp b/test/helper/TestAuthContext.cpp index fe5d62960..e5c7095f1 100644 --- a/test/helper/TestAuthContext.cpp +++ b/test/helper/TestAuthContext.cpp @@ -1,5 +1,5 @@ /*! - * \copyright Copyright (c) 2016-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2016-2018 Governikus GmbH & Co. KG, Germany */ #include "paos/retrieve/DidAuthenticateEac1Parser.h" diff --git a/test/helper/TestAuthContext.h b/test/helper/TestAuthContext.h index 2fdcf0ea3..189c34a45 100644 --- a/test/helper/TestAuthContext.h +++ b/test/helper/TestAuthContext.h @@ -1,7 +1,7 @@ /*! * \brief Helper to use AuthContext in an easy way. * - * \copyright Copyright (c) 2016-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2016-2018 Governikus GmbH & Co. KG, Germany */ #pragma once diff --git a/test/helper/TestFileHelper.cpp b/test/helper/TestFileHelper.cpp index 5b35e0c95..ae05bf928 100644 --- a/test/helper/TestFileHelper.cpp +++ b/test/helper/TestFileHelper.cpp @@ -1,5 +1,5 @@ /*! - * \copyright Copyright (c) 2014-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2014-2018 Governikus GmbH & Co. KG, Germany */ #include "TestFileHelper.h" diff --git a/test/helper/TestFileHelper.h b/test/helper/TestFileHelper.h index 780373a53..38a1c89b2 100644 --- a/test/helper/TestFileHelper.h +++ b/test/helper/TestFileHelper.h @@ -1,7 +1,7 @@ /*! * \brief Helper for some file functions. * - * \copyright Copyright (c) 2014-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2014-2018 Governikus GmbH & Co. KG, Germany */ #pragma once diff --git a/test/helper/WebSocketHelper.cpp b/test/helper/WebSocketHelper.cpp index c7b2ea57c..1a4f3cc5a 100644 --- a/test/helper/WebSocketHelper.cpp +++ b/test/helper/WebSocketHelper.cpp @@ -1,5 +1,5 @@ /*! - * \copyright Copyright (c) 2016-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2016-2018 Governikus GmbH & Co. KG, Germany */ #include "WebSocketHelper.h" diff --git a/test/helper/WebSocketHelper.h b/test/helper/WebSocketHelper.h index e03fa8852..aafe1e81b 100644 --- a/test/helper/WebSocketHelper.h +++ b/test/helper/WebSocketHelper.h @@ -1,5 +1,5 @@ /*! - * \copyright Copyright (c) 2016-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2016-2018 Governikus GmbH & Co. KG, Germany */ #pragma once diff --git a/test/qml/QmlTestRunner.cpp b/test/qml/QmlTestRunner.cpp index cd90dac3e..ef5fda60c 100644 --- a/test/qml/QmlTestRunner.cpp +++ b/test/qml/QmlTestRunner.cpp @@ -1,5 +1,5 @@ /* - * \copyright Copyright (c) 2016-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2016-2018 Governikus GmbH & Co. KG, Germany */ #include diff --git a/test/qt/activation_webservice/test_Template.cpp b/test/qt/activation_webservice/test_Template.cpp index d97e65f5b..10d79473e 100644 --- a/test/qt/activation_webservice/test_Template.cpp +++ b/test/qt/activation_webservice/test_Template.cpp @@ -1,7 +1,7 @@ /*! * \brief Unit tests for \ref Template * - * \copyright Copyright (c) 2016-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2016-2018 Governikus GmbH & Co. KG, Germany */ #include "Template.h" diff --git a/test/qt/activation_webservice/test_WebserviceActivationHandler.cpp b/test/qt/activation_webservice/test_WebserviceActivationHandler.cpp index ea1e563f2..466ef8712 100644 --- a/test/qt/activation_webservice/test_WebserviceActivationHandler.cpp +++ b/test/qt/activation_webservice/test_WebserviceActivationHandler.cpp @@ -1,7 +1,7 @@ /*! * \brief Unit tests for \ref WebserviceActivationHandler * - * \copyright Copyright (c) 2014-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2014-2018 Governikus GmbH & Co. KG, Germany */ #include "WebserviceActivationHandler.h" diff --git a/test/qt/aidl/test_PskManager.cpp b/test/qt/aidl/test_PskManager.cpp index 434f24d9f..69b0ed648 100644 --- a/test/qt/aidl/test_PskManager.cpp +++ b/test/qt/aidl/test_PskManager.cpp @@ -1,7 +1,7 @@ /*! * \brief Unit tests for PskManager. * - * \copyright Copyright (c) 2016-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2016-2018 Governikus GmbH & Co. KG, Germany */ #include "PskManager.h" diff --git a/test/qt/card/asn1/test_AccessRoleAndRight.cpp b/test/qt/card/asn1/test_AccessRoleAndRight.cpp index f6f5e3f60..588374fc2 100644 --- a/test/qt/card/asn1/test_AccessRoleAndRight.cpp +++ b/test/qt/card/asn1/test_AccessRoleAndRight.cpp @@ -1,7 +1,7 @@ /*! * \brief Unit tests for \ref AccessRoleAndRight * - * \copyright Copyright (c) 2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2017-2018 Governikus GmbH & Co. KG, Germany */ #include "asn1/AccessRoleAndRight.h" diff --git a/test/qt/card/asn1/test_Asn1BCDDateUtil.cpp b/test/qt/card/asn1/test_Asn1BCDDateUtil.cpp index db8a0d880..5be5c2db8 100644 --- a/test/qt/card/asn1/test_Asn1BCDDateUtil.cpp +++ b/test/qt/card/asn1/test_Asn1BCDDateUtil.cpp @@ -1,7 +1,7 @@ /*! * \brief Unit tests for \ref Asn1BCDDateUtil * - * \copyright Copyright (c) 2015-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2015-2018 Governikus GmbH & Co. KG, Germany */ #include "asn1/ASN1Util.h" diff --git a/test/qt/card/asn1/test_Asn1IntegerUtil.cpp b/test/qt/card/asn1/test_Asn1IntegerUtil.cpp index 666faa3b6..6e623997f 100644 --- a/test/qt/card/asn1/test_Asn1IntegerUtil.cpp +++ b/test/qt/card/asn1/test_Asn1IntegerUtil.cpp @@ -1,7 +1,7 @@ /*! * \brief Unit tests for \ref Asn1IntegerUtil * - * \copyright Copyright (c) 2015-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2015-2018 Governikus GmbH & Co. KG, Germany */ #include "asn1/ASN1Util.h" diff --git a/test/qt/card/asn1/test_Asn1ObjectUtil.cpp b/test/qt/card/asn1/test_Asn1ObjectUtil.cpp index 61added0b..bbff1ff9a 100644 --- a/test/qt/card/asn1/test_Asn1ObjectUtil.cpp +++ b/test/qt/card/asn1/test_Asn1ObjectUtil.cpp @@ -1,7 +1,7 @@ /*! * \brief Unit tests for \ref Asn1ObjectUtil * - * \copyright Copyright (c) 2015-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2015-2018 Governikus GmbH & Co. KG, Germany */ #include "asn1/ASN1Util.h" diff --git a/test/qt/card/asn1/test_Asn1OctetStringUtil.cpp b/test/qt/card/asn1/test_Asn1OctetStringUtil.cpp index 50b455f98..fd27bf68f 100644 --- a/test/qt/card/asn1/test_Asn1OctetStringUtil.cpp +++ b/test/qt/card/asn1/test_Asn1OctetStringUtil.cpp @@ -1,7 +1,7 @@ /*! * \brief Unit tests for \ref Asn1OctetStringUtil * - * \copyright Copyright (c) 2015-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2015-2018 Governikus GmbH & Co. KG, Germany */ #include "asn1/ASN1Util.h" diff --git a/test/qt/card/asn1/test_Asn1StringUtil.cpp b/test/qt/card/asn1/test_Asn1StringUtil.cpp index e3f063638..e26f9f66b 100644 --- a/test/qt/card/asn1/test_Asn1StringUtil.cpp +++ b/test/qt/card/asn1/test_Asn1StringUtil.cpp @@ -1,7 +1,7 @@ /*! * \brief Unit tests for \ref Asn1StringUtil * - * \copyright Copyright (c) 2015-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2015-2018 Governikus GmbH & Co. KG, Germany */ #include "asn1/ASN1Util.h" diff --git a/test/qt/card/asn1/test_Asn1TypeUtil.cpp b/test/qt/card/asn1/test_Asn1TypeUtil.cpp index 4093da1eb..e067b3006 100644 --- a/test/qt/card/asn1/test_Asn1TypeUtil.cpp +++ b/test/qt/card/asn1/test_Asn1TypeUtil.cpp @@ -1,7 +1,7 @@ /*! * \brief Unit tests for \ref Asn1TypeUtil * - * \copyright Copyright (c) 2015-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2015-2018 Governikus GmbH & Co. KG, Germany */ #include "asn1/ASN1Util.h" diff --git a/test/qt/card/asn1/test_Asn1Util.cpp b/test/qt/card/asn1/test_Asn1Util.cpp index f67bcfdd0..d56487a7a 100644 --- a/test/qt/card/asn1/test_Asn1Util.cpp +++ b/test/qt/card/asn1/test_Asn1Util.cpp @@ -1,5 +1,5 @@ /*! - * \copyright Copyright (c) 2016-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2016-2018 Governikus GmbH & Co. KG, Germany */ #include "asn1/ASN1Util.h" diff --git a/test/qt/card/asn1/test_AuxiliaryAuthenticatedData.cpp b/test/qt/card/asn1/test_AuxiliaryAuthenticatedData.cpp index d646cc008..9c46fe567 100644 --- a/test/qt/card/asn1/test_AuxiliaryAuthenticatedData.cpp +++ b/test/qt/card/asn1/test_AuxiliaryAuthenticatedData.cpp @@ -1,7 +1,7 @@ /*! * \brief Unit tests for \ref AuxiliaryAuthenticatedData * - * \copyright Copyright (c) 2015-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2015-2018 Governikus GmbH & Co. KG, Germany */ #include "asn1/ASN1Util.h" @@ -91,7 +91,7 @@ class test_AuxiliaryAuthenticatedData QTest::newRow("1 Tag") << QStringLiteral("0") << QDate(1978, 8, 17); QTest::newRow("Ende des Jahres") << QStringLiteral("0") << QDate(1978, 12, 31); - QTest::newRow("Anfang nächstes Jahr") << QStringLiteral("0") << QDate(1979, 1, 1); + QTest::newRow("Anfang naechstes Jahr") << QStringLiteral("0") << QDate(1979, 1, 1); QTest::newRow("vorm 1. Geburtstag") << QStringLiteral("0") << QDate(1979, 8, 15); QTest::newRow("1. Geburtstag") << QStringLiteral("1") << QDate(1979, 8, 16); diff --git a/test/qt/card/asn1/test_CVCertificate.cpp b/test/qt/card/asn1/test_CVCertificate.cpp index d98b3398f..efae3e52a 100644 --- a/test/qt/card/asn1/test_CVCertificate.cpp +++ b/test/qt/card/asn1/test_CVCertificate.cpp @@ -1,7 +1,7 @@ /*! * \brief Unit tests for \ref CVCertificate * - * \copyright Copyright (c) 2014-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2014-2018 Governikus GmbH & Co. KG, Germany */ diff --git a/test/qt/card/asn1/test_CVCertificateBody.cpp b/test/qt/card/asn1/test_CVCertificateBody.cpp index 665689716..04e223673 100644 --- a/test/qt/card/asn1/test_CVCertificateBody.cpp +++ b/test/qt/card/asn1/test_CVCertificateBody.cpp @@ -1,7 +1,7 @@ /*! * \brief Unit tests for \ref CVCertificateBody * - * \copyright Copyright (c) 2015-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2015-2018 Governikus GmbH & Co. KG, Germany */ #include diff --git a/test/qt/card/asn1/test_CVCertificateChainBuilder.cpp b/test/qt/card/asn1/test_CVCertificateChainBuilder.cpp index d643f157d..33b8f7155 100644 --- a/test/qt/card/asn1/test_CVCertificateChainBuilder.cpp +++ b/test/qt/card/asn1/test_CVCertificateChainBuilder.cpp @@ -1,7 +1,7 @@ /*! * \brief Unit tests for \ref CVCertificateChain * - * \copyright Copyright (c) 2014-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2014-2018 Governikus GmbH & Co. KG, Germany */ #include diff --git a/test/qt/card/asn1/test_CertificateDescription.cpp b/test/qt/card/asn1/test_CertificateDescription.cpp index 63949ea0d..a1c9f2cae 100644 --- a/test/qt/card/asn1/test_CertificateDescription.cpp +++ b/test/qt/card/asn1/test_CertificateDescription.cpp @@ -1,7 +1,7 @@ /*! * \brief Unit tests for \ref CertificateDescription * - * \copyright Copyright (c) 2014-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2014-2018 Governikus GmbH & Co. KG, Germany */ #include diff --git a/test/qt/card/asn1/test_ChainBuilder.cpp b/test/qt/card/asn1/test_ChainBuilder.cpp index c28164bb4..bb61408ec 100644 --- a/test/qt/card/asn1/test_ChainBuilder.cpp +++ b/test/qt/card/asn1/test_ChainBuilder.cpp @@ -1,7 +1,7 @@ /*! * \brief Unit tests for \ref ChainBuilder * - * \copyright Copyright (c) 2015-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2015-2018 Governikus GmbH & Co. KG, Germany */ #include diff --git a/test/qt/card/asn1/test_Chat.cpp b/test/qt/card/asn1/test_Chat.cpp index 80785697b..b6a368cb9 100644 --- a/test/qt/card/asn1/test_Chat.cpp +++ b/test/qt/card/asn1/test_Chat.cpp @@ -1,7 +1,7 @@ /*! * \brief Unit tests for \ref CHAT * - * \copyright Copyright (c) 2014-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2014-2018 Governikus GmbH & Co. KG, Germany */ #include "asn1/ASN1Util.h" diff --git a/test/qt/card/asn1/test_ChipAuthenticationInfo.cpp b/test/qt/card/asn1/test_ChipAuthenticationInfo.cpp index 41cad2173..30b9784ee 100644 --- a/test/qt/card/asn1/test_ChipAuthenticationInfo.cpp +++ b/test/qt/card/asn1/test_ChipAuthenticationInfo.cpp @@ -1,7 +1,7 @@ /*! * \brief Unit tests for \ref ChipAuthenticationInfo * - * \copyright Copyright (c) 2015-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2015-2018 Governikus GmbH & Co. KG, Germany */ #include diff --git a/test/qt/card/asn1/test_EcdsaPublicKey.cpp b/test/qt/card/asn1/test_EcdsaPublicKey.cpp index aa616a392..c42744f01 100644 --- a/test/qt/card/asn1/test_EcdsaPublicKey.cpp +++ b/test/qt/card/asn1/test_EcdsaPublicKey.cpp @@ -1,7 +1,7 @@ /*! * \brief Unit tests for \ref EcdsaPublicKey * - * \copyright Copyright (c) 2015-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2015-2018 Governikus GmbH & Co. KG, Germany */ #include "asn1/CVCertificate.h" diff --git a/test/qt/card/asn1/test_KnownOIDs.cpp b/test/qt/card/asn1/test_KnownOIDs.cpp index 37bc7dc8a..59706c547 100644 --- a/test/qt/card/asn1/test_KnownOIDs.cpp +++ b/test/qt/card/asn1/test_KnownOIDs.cpp @@ -1,7 +1,7 @@ /*! * \brief Unit tests for \ref KnownOIDs * - * \copyright Copyright (c) 2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2017-2018 Governikus GmbH & Co. KG, Germany */ #include "asn1/KnownOIDs.h" diff --git a/test/qt/card/asn1/test_PACEInfo.cpp b/test/qt/card/asn1/test_PACEInfo.cpp index 8221d90b8..2c0cbb67b 100644 --- a/test/qt/card/asn1/test_PACEInfo.cpp +++ b/test/qt/card/asn1/test_PACEInfo.cpp @@ -1,7 +1,7 @@ /*! * \brief Unit tests for \ref PACEInfo * - * \copyright Copyright (c) 2014-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2014-2018 Governikus GmbH & Co. KG, Germany */ #include diff --git a/test/qt/card/asn1/test_SecurityInfo.cpp b/test/qt/card/asn1/test_SecurityInfo.cpp index 3bb2b6857..1777a7f8d 100644 --- a/test/qt/card/asn1/test_SecurityInfo.cpp +++ b/test/qt/card/asn1/test_SecurityInfo.cpp @@ -1,7 +1,7 @@ /*! * \brief Unit tests for \ref SecurityInfo * - * \copyright Copyright (c) 2015-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2015-2018 Governikus GmbH & Co. KG, Germany */ diff --git a/test/qt/card/asn1/test_SecurityInfos.cpp b/test/qt/card/asn1/test_SecurityInfos.cpp index 75ef5a420..2af00ac7d 100644 --- a/test/qt/card/asn1/test_SecurityInfos.cpp +++ b/test/qt/card/asn1/test_SecurityInfos.cpp @@ -1,7 +1,7 @@ /*! * \brief Unit tests for \ref SecurityInfos * - * \copyright Copyright (c) 2015-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2015-2018 Governikus GmbH & Co. KG, Germany */ #include diff --git a/test/qt/card/asn1/test_SignatureChecker.cpp b/test/qt/card/asn1/test_SignatureChecker.cpp index 22db88d42..27cc387fd 100644 --- a/test/qt/card/asn1/test_SignatureChecker.cpp +++ b/test/qt/card/asn1/test_SignatureChecker.cpp @@ -1,7 +1,7 @@ /*! * \brief Unit tests for \ref SignatureChecker * - * \copyright Copyright (c) 2014-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2014-2018 Governikus GmbH & Co. KG, Germany */ #include diff --git a/test/qt/card/asn1/test_efCardAccess.cpp b/test/qt/card/asn1/test_efCardAccess.cpp index f8e88493e..89b547b0f 100644 --- a/test/qt/card/asn1/test_efCardAccess.cpp +++ b/test/qt/card/asn1/test_efCardAccess.cpp @@ -1,5 +1,5 @@ /*! - * \copyright Copyright (c) 2014-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2014-2018 Governikus GmbH & Co. KG, Germany */ #include "asn1/ChipAuthenticationInfo.h" diff --git a/test/qt/card/asn1/test_efCardSecurity.cpp b/test/qt/card/asn1/test_efCardSecurity.cpp index 89b2b4818..cea0d2a49 100644 --- a/test/qt/card/asn1/test_efCardSecurity.cpp +++ b/test/qt/card/asn1/test_efCardSecurity.cpp @@ -1,5 +1,5 @@ /*! - * \copyright Copyright (c) 2015-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2015-2018 Governikus GmbH & Co. KG, Germany */ #include "asn1/EFCardSecurity.h" diff --git a/test/qt/card/base/command/test_BaseCardCommand.cpp b/test/qt/card/base/command/test_BaseCardCommand.cpp index 9a4c0e02c..28a314790 100644 --- a/test/qt/card/base/command/test_BaseCardCommand.cpp +++ b/test/qt/card/base/command/test_BaseCardCommand.cpp @@ -1,7 +1,7 @@ /*! * \brief Unit tests for \ref BaseCardCommand * - * \copyright Copyright (c) 2015-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2015-2018 Governikus GmbH & Co. KG, Germany */ #include "command/BaseCardCommand.h" diff --git a/test/qt/card/base/command/test_TransmitCommand.cpp b/test/qt/card/base/command/test_TransmitCommand.cpp new file mode 100644 index 000000000..47d7f3504 --- /dev/null +++ b/test/qt/card/base/command/test_TransmitCommand.cpp @@ -0,0 +1,67 @@ +/*! + * \copyright Copyright (c) 2018 Governikus GmbH & Co. KG, Germany + */ + +#include "command/TransmitCommand.h" + +#include +#include + + +using namespace governikus; + + +class test_TransmitCommand + : public QObject +{ + Q_OBJECT + + private Q_SLOTS: + void isAcceptable_data() + { + QTest::addColumn("acceptable"); + QTest::addColumn("response"); + QTest::addColumn("accepted"); + + QTest::newRow("all-empty") << QByteArrayList({""}) << QByteArray("") << true; + QTest::newRow("all-incomplete") << QByteArrayList({""}) << QByteArray("90") << true; + QTest::newRow("all-code-only") << QByteArrayList({""}) << QByteArray("9000") << true; + QTest::newRow("all-data+code") << QByteArrayList({""}) << QByteArray("abcd9000") << true; + QTest::newRow("starting-with-90-empty") << QByteArrayList({"90"}) << QByteArray("") << false; + QTest::newRow("starting-with-90-incomplete") << QByteArrayList({"90"}) << QByteArray("90") << true; + QTest::newRow("starting-with-90-code-only") << QByteArrayList({"90"}) << QByteArray("9000") << true; + QTest::newRow("starting-with-90-data+code") << QByteArrayList({"90"}) << QByteArray("abcd9000") << true; + QTest::newRow("equal-to-9000-empty") << QByteArrayList({"9000"}) << QByteArray("") << false; + QTest::newRow("equal-to-9000-incomplete") << QByteArrayList({"9000"}) << QByteArray("90") << false; + QTest::newRow("equal-to-9000-code-only") << QByteArrayList({"9000"}) << QByteArray("9000") << true; + QTest::newRow("equal-to-9000-data+code") << QByteArrayList({"9000"}) << QByteArray("abcd9000") << true; + QTest::newRow("multi-empty") << QByteArrayList({"8000", "9000"}) << QByteArray("") << false; + QTest::newRow("multi-code-only-wrong") << QByteArrayList({"8000", "9000"}) << QByteArray("7000") << false; + QTest::newRow("multi-code-only-true-1") << QByteArrayList({"8000", "9000"}) << QByteArray("8000") << true; + QTest::newRow("multi-code-only-true-2") << QByteArrayList({"8000", "9000"}) << QByteArray("9000") << true; + QTest::newRow("multi-data+code-wrong") << QByteArrayList({"8000", "9000"}) << QByteArray("abcd7000") << false; + QTest::newRow("multi-data+code-true-1") << QByteArrayList({"8000", "9000"}) << QByteArray("abcd8000") << true; + QTest::newRow("multi-data+code-true-2") << QByteArrayList({"8000", "9000"}) << QByteArray("abcd9000") << true; + } + + + void isAcceptable() + { + QFETCH(QByteArrayList, acceptable); + QFETCH(QByteArray, response); + QFETCH(bool, accepted); + + InputAPDUInfo info; + for (const auto& code : acceptable) + { + info.addAcceptableStatusCode(code); + } + ResponseApdu apdu(QByteArray::fromHex(response)); + QCOMPARE(TransmitCommand::isAcceptable(info, apdu), accepted); + } + + +}; + +QTEST_GUILESS_MAIN(test_TransmitCommand) +#include "test_TransmitCommand.moc" diff --git a/test/qt/card/base/test_Apdu.cpp b/test/qt/card/base/test_Apdu.cpp index 102bdda7e..3ada463a0 100644 --- a/test/qt/card/base/test_Apdu.cpp +++ b/test/qt/card/base/test_Apdu.cpp @@ -1,7 +1,7 @@ /*! * \brief Unit tests for \ref Apdu * - * \copyright Copyright (c) 2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2017-2018 Governikus GmbH & Co. KG, Germany */ #include "Apdu.h" @@ -47,19 +47,33 @@ class test_Apdu } - void testReturnCode() + void testReturnCode_data() { - ResponseApdu apdu = ResponseApdu(QByteArray()); - QCOMPARE(apdu.getReturnCode(), StatusCode::EMPTY); + QTest::addColumn("statusCode"); + QTest::addColumn("bufferIn"); + QTest::addColumn("bufferOut"); + + QTest::newRow("empty") << StatusCode::EMPTY << QByteArray() << QByteArray::fromHex("0000"); + QTest::newRow("01") << StatusCode::INVALID << QByteArray::fromHex("01") << QByteArray::fromHex("0001"); + QTest::newRow("63c2") << StatusCode::PIN_RETRY_COUNT_2 << QByteArray::fromHex("63c2") << QByteArray::fromHex("63c2"); + QTest::newRow("6401") << StatusCode::INPUT_CANCELLED << QByteArray::fromHex("6401") << QByteArray::fromHex("6401"); + QTest::newRow("73c2") << StatusCode::INVALID << QByteArray::fromHex("73c2") << QByteArray::fromHex("0001"); + } + - apdu.setBuffer(QByteArray::fromHex("01")); - QCOMPARE(apdu.getReturnCode(), StatusCode::INVALID); + void testReturnCode() + { + QFETCH(StatusCode, statusCode); + QFETCH(QByteArray, bufferIn); + QFETCH(QByteArray, bufferOut); - apdu.setBuffer(QByteArray::fromHex("73c2")); - QCOMPARE(apdu.getReturnCode(), StatusCode::INVALID); + ResponseApdu apdu = ResponseApdu(statusCode); + QCOMPARE(apdu.getReturnCode(), statusCode); + QCOMPARE(apdu.getBuffer(), bufferOut); - apdu.setBuffer(QByteArray::fromHex("63c2")); - QCOMPARE(apdu.getReturnCode(), StatusCode::PIN_RETRY_COUNT_2); + apdu.setBuffer(bufferIn); + QCOMPARE(apdu.getReturnCode(), statusCode); + QCOMPARE(apdu.getBuffer(), bufferIn); } diff --git a/test/qt/card/base/test_PinModify.cpp b/test/qt/card/base/test_PinModify.cpp new file mode 100644 index 000000000..cc9f34cbc --- /dev/null +++ b/test/qt/card/base/test_PinModify.cpp @@ -0,0 +1,115 @@ +/*! + * \copyright Copyright (c) 2014-2018 Governikus GmbH & Co. KG, Germany + */ + +#include +#include + +#include "PinModify.h" + + +using namespace governikus; + + +class test_PinModify + : public QObject +{ + Q_OBJECT + + public: + test_PinModify() + : mTimeoutSeconds(5) + { + } + + + private: + const quint8 mTimeoutSeconds; + + private Q_SLOTS: + void createCcidForPcsc() + { + quint8 timeout = 77; + PinModify pinModify(timeout); + + QByteArray expected; + expected += static_cast(timeout); + expected += static_cast(timeout); + expected += QByteArray::fromHex("82000000000606010202070400010200000004000000002C0203"); + + QCOMPARE(pinModify.createCcidForPcsc(), expected); + } + + + void createCcidForBluetooth() + { + quint8 timeout = 77; + PinModify pinModify(timeout); + + QByteArray expected; + expected += QByteArray::fromHex("FF9A04101801"); + expected += static_cast(timeout); + expected += QByteArray::fromHex("820000000006060102020704000102000000002C0203"); + + QCOMPARE(pinModify.createCcidForBluetooth().getBuffer(), expected); + } + + + void createCcidForRemote() + { + quint8 timeout = 77; + PinModify pinModify(timeout); + + QByteArray expected; + expected += static_cast(timeout); + expected += static_cast(timeout); + expected += QByteArray::fromHex("82000000000606010202070400010200000004000000002C0203"); + + QCOMPARE(pinModify.createCcidForRemote(), expected); + } + + + void parseSampleData() + { + const QByteArray abPINDataStructure = QByteArray::fromHex( + "05" // bTimeOut (timeout in seconds) + "06" // bTimeOut2 (timeout in seconds after first key stroke) + "82" // bmFormatString + "00" // bmPINBlockString + "00" // bmPINLengthFormat + "00" // bInsertionOffsetOld + "00" // bInsertionOffsetNew + "0606" // wPINMaxExtraDigit USHORT + "01" // bConfirmPIN + "02" // bEntryValidationCondition + "02" // bNumberMessage + "0704" // wLangId: German (0x0407) + "01" // bMsgIndex1 + "02" // bMsgIndex2 + "00" // bMsgIndex3 + "000000" // bTeoPrologue + "04" // ulDataLength + "00" // CLA: command + "2c" // INS: Reset Retry Counter + "02" // P1: new PIN/CAN + "03"); // P2: PIN + + PinModify pinModify(abPINDataStructure); + QCOMPARE(pinModify.getTimeoutSeconds(), mTimeoutSeconds); + } + + + void buildAndParse() + { + PinModify builder(mTimeoutSeconds); + const QByteArray data = builder.createCcidForRemote(); + + PinModify parser(data); + QCOMPARE(parser.getTimeoutSeconds(), mTimeoutSeconds); + } + + +}; + +QTEST_GUILESS_MAIN(test_PinModify) +#include "test_PinModify.moc" diff --git a/test/qt/card/base/test_PinModifyOutput.cpp b/test/qt/card/base/test_PinModifyOutput.cpp new file mode 100644 index 000000000..a31c9626e --- /dev/null +++ b/test/qt/card/base/test_PinModifyOutput.cpp @@ -0,0 +1,72 @@ +/*! + * \copyright Copyright (c) 2014-2018 Governikus GmbH & Co. KG, Germany + */ + +#include +#include + + +#include "PinModifyOutput.h" + + +using namespace governikus; + + +class test_PinModifyOutput + : public QObject +{ + Q_OBJECT + + private Q_SLOTS: + void fromCcidResponse() + { + PinModifyOutput output; + + output = PinModifyOutput(QByteArray::fromHex("02")); + QCOMPARE(output.getReturnCode(), CardReturnCode::UNKNOWN); + QCOMPARE(output.getResponseApdu().getBuffer(), QByteArray::fromHex("02")); + + output = PinModifyOutput(QByteArray::fromHex("6400")); + QCOMPARE(output.getReturnCode(), CardReturnCode::INPUT_TIME_OUT); + QCOMPARE(output.getResponseApdu().getBuffer(), QByteArray::fromHex("6400")); + + output = PinModifyOutput(QByteArray::fromHex("6401")); + QCOMPARE(output.getReturnCode(), CardReturnCode::CANCELLATION_BY_USER); + QCOMPARE(output.getResponseApdu().getBuffer(), QByteArray::fromHex("6401")); + + output = PinModifyOutput(QByteArray::fromHex("6402")); + QCOMPARE(output.getReturnCode(), CardReturnCode::NEW_PIN_MISMATCH); + QCOMPARE(output.getResponseApdu().getBuffer(), QByteArray::fromHex("6402")); + + output = PinModifyOutput(QByteArray::fromHex("6403")); + QCOMPARE(output.getReturnCode(), CardReturnCode::NEW_PIN_INVALID_LENGTH); + QCOMPARE(output.getResponseApdu().getBuffer(), QByteArray::fromHex("6403")); + + output = PinModifyOutput(QByteArray::fromHex("6a80")); + QCOMPARE(output.getReturnCode(), CardReturnCode::COMMAND_FAILED); + QCOMPARE(output.getResponseApdu().getBuffer(), QByteArray::fromHex("6a80")); + + output = PinModifyOutput(QByteArray::fromHex("6982")); + QCOMPARE(output.getReturnCode(), CardReturnCode::UNKNOWN); + QCOMPARE(output.getResponseApdu().getBuffer(), QByteArray::fromHex("6982")); + + output = PinModifyOutput(QByteArray::fromHex("9000")); + QCOMPARE(output.getReturnCode(), CardReturnCode::OK); + QCOMPARE(output.getResponseApdu().getBuffer(), QByteArray::fromHex("9000")); + + output = PinModifyOutput(QByteArray::fromHex("beef")); + QCOMPARE(output.getReturnCode(), CardReturnCode::UNKNOWN); + QCOMPARE(output.getResponseApdu().getBuffer(), QByteArray::fromHex("beef")); + } + + + void toCcid() + { + QCOMPARE(PinModifyOutput(QByteArray::fromHex("9000")).toCcid(), QByteArray::fromHex("9000")); + } + + +}; + +QTEST_GUILESS_MAIN(test_PinModifyOutput) +#include "test_PinModifyOutput.moc" diff --git a/test/qt/card/bluetooth/test_BluetoothMessage.cpp b/test/qt/card/bluetooth/test_BluetoothMessage.cpp index 705a0d143..44a4a5598 100644 --- a/test/qt/card/bluetooth/test_BluetoothMessage.cpp +++ b/test/qt/card/bluetooth/test_BluetoothMessage.cpp @@ -1,7 +1,7 @@ /*! * \brief Unit tests for \ref BluetoothMessage * - * \copyright Copyright (c) 2014-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2014-2018 Governikus GmbH & Co. KG, Germany */ #include "messages/BluetoothMessageStatusInd.h" diff --git a/test/qt/card/bluetooth/test_BluetoothMessageParameterMaxMsgSize.cpp b/test/qt/card/bluetooth/test_BluetoothMessageParameterMaxMsgSize.cpp index 8a30a8d62..9c2cddf18 100644 --- a/test/qt/card/bluetooth/test_BluetoothMessageParameterMaxMsgSize.cpp +++ b/test/qt/card/bluetooth/test_BluetoothMessageParameterMaxMsgSize.cpp @@ -1,6 +1,6 @@ /*! * \brief Unit tests for \ref BluetoothMessageParameterMaxMsgSize * - * \copyright Copyright (c) 2014-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2014-2018 Governikus GmbH & Co. KG, Germany */ #include "messages/parameter/BluetoothMessageParameterMaxMsgSize.h" diff --git a/test/qt/card/bluetooth/test_BluetoothMessageParser.cpp b/test/qt/card/bluetooth/test_BluetoothMessageParser.cpp index 9f03c310c..92b149db2 100644 --- a/test/qt/card/bluetooth/test_BluetoothMessageParser.cpp +++ b/test/qt/card/bluetooth/test_BluetoothMessageParser.cpp @@ -1,7 +1,7 @@ /*! * \brief Unit tests for \ref BluetoothMessageParser * - * \copyright Copyright (c) 2014-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2014-2018 Governikus GmbH & Co. KG, Germany */ #include "messages/BluetoothMessageParser.h" diff --git a/test/qt/card/pace/test_CipherMAC.cpp b/test/qt/card/pace/test_CipherMAC.cpp index 262064529..b3075b3ce 100644 --- a/test/qt/card/pace/test_CipherMAC.cpp +++ b/test/qt/card/pace/test_CipherMAC.cpp @@ -1,5 +1,5 @@ /*! - * \copyright Copyright (c) 2014-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2014-2018 Governikus GmbH & Co. KG, Germany */ #include "asn1/KnownOIDs.h" diff --git a/test/qt/card/pace/test_EcUtil.cpp b/test/qt/card/pace/test_EcUtil.cpp index 9bba06e15..40ce8e87e 100644 --- a/test/qt/card/pace/test_EcUtil.cpp +++ b/test/qt/card/pace/test_EcUtil.cpp @@ -1,5 +1,5 @@ /*! - * \copyright Copyright (c) 2014-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2014-2018 Governikus GmbH & Co. KG, Germany */ #include "pace/ec/EcUtil.h" diff --git a/test/qt/card/pace/test_EcdhKeyAgreement.cpp b/test/qt/card/pace/test_EcdhKeyAgreement.cpp index 3c058cfd4..e8206f80f 100644 --- a/test/qt/card/pace/test_EcdhKeyAgreement.cpp +++ b/test/qt/card/pace/test_EcdhKeyAgreement.cpp @@ -1,7 +1,7 @@ /*! * \brief Tests for the EcdhKeyAgreement * - * \copyright Copyright (c) 2014-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2014-2018 Governikus GmbH & Co. KG, Germany */ #include "pace/ec/EcdhKeyAgreement.h" diff --git a/test/qt/card/pace/test_EllipticCurveFactory.cpp b/test/qt/card/pace/test_EllipticCurveFactory.cpp index bab510b72..0ecd33211 100644 --- a/test/qt/card/pace/test_EllipticCurveFactory.cpp +++ b/test/qt/card/pace/test_EllipticCurveFactory.cpp @@ -1,5 +1,5 @@ /*! - * \copyright Copyright (c) 2014-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2014-2018 Governikus GmbH & Co. KG, Germany */ #include "pace/ec/EllipticCurveFactory.h" diff --git a/test/qt/card/pace/test_KeyDerivationFunction.cpp b/test/qt/card/pace/test_KeyDerivationFunction.cpp index b5a0c7766..a127240f8 100644 --- a/test/qt/card/pace/test_KeyDerivationFunction.cpp +++ b/test/qt/card/pace/test_KeyDerivationFunction.cpp @@ -1,5 +1,5 @@ /*! - * \copyright Copyright (c) 2014-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2014-2018 Governikus GmbH & Co. KG, Germany */ #include "asn1/KnownOIDs.h" diff --git a/test/qt/card/pace/test_PaceHandler.cpp b/test/qt/card/pace/test_PaceHandler.cpp index d494fc22b..f865d1c4a 100644 --- a/test/qt/card/pace/test_PaceHandler.cpp +++ b/test/qt/card/pace/test_PaceHandler.cpp @@ -1,7 +1,7 @@ /*! * \brief Tests for the PaceHandler * - * \copyright Copyright (c) 2014-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2014-2018 Governikus GmbH & Co. KG, Germany */ #include "pace/PaceHandler.h" diff --git a/test/qt/card/pace/test_SymmetricCipher.cpp b/test/qt/card/pace/test_SymmetricCipher.cpp index 1fe00a7b4..28872543d 100644 --- a/test/qt/card/pace/test_SymmetricCipher.cpp +++ b/test/qt/card/pace/test_SymmetricCipher.cpp @@ -1,5 +1,5 @@ /*! - * \copyright Copyright (c) 2014-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2014-2018 Governikus GmbH & Co. KG, Germany */ #include "asn1/KnownOIDs.h" diff --git a/test/qt/card/pcsc/test_PcscUtils.cpp b/test/qt/card/pcsc/test_PcscUtils.cpp index 3bff15ce2..079a431c3 100644 --- a/test/qt/card/pcsc/test_PcscUtils.cpp +++ b/test/qt/card/pcsc/test_PcscUtils.cpp @@ -1,7 +1,7 @@ /*! * \brief Unit tests for \ref PcscUtils * - * \copyright Copyright (c) 2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2017-2018 Governikus GmbH & Co. KG, Germany */ #include "PcscUtils.h" diff --git a/test/qt/card/pcsc/test_pcscReaderFeature.cpp b/test/qt/card/pcsc/test_pcscReaderFeature.cpp index 2d33c128b..2b45c5286 100644 --- a/test/qt/card/pcsc/test_pcscReaderFeature.cpp +++ b/test/qt/card/pcsc/test_pcscReaderFeature.cpp @@ -1,7 +1,7 @@ /*! * \brief Unit tests for \ref PcscReaderFeature * - * \copyright Copyright (c) 2014-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2014-2018 Governikus GmbH & Co. KG, Germany */ #include "PcscReaderFeature.h" diff --git a/test/qt/card/pcsc/test_pcscReaderPaceCapability.cpp b/test/qt/card/pcsc/test_pcscReaderPaceCapability.cpp index c5bfcfcfd..7e3f79f06 100644 --- a/test/qt/card/pcsc/test_pcscReaderPaceCapability.cpp +++ b/test/qt/card/pcsc/test_pcscReaderPaceCapability.cpp @@ -1,7 +1,7 @@ /*! * \brief Unit tests for \ref PcscReaderPaceCapability * - * \copyright Copyright (c) 2014-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2014-2018 Governikus GmbH & Co. KG, Germany */ #include "PcscReaderPaceCapability.h" diff --git a/test/qt/card/remote/test_RemoteReaderManagerPlugin.cpp b/test/qt/card/remote/test_RemoteReaderManagerPlugin.cpp index cf49c1b73..09e57cab7 100644 --- a/test/qt/card/remote/test_RemoteReaderManagerPlugin.cpp +++ b/test/qt/card/remote/test_RemoteReaderManagerPlugin.cpp @@ -1,7 +1,7 @@ /*! * \brief Unit tests for \ref RemoteReaderManagerPlugIn * - * \copyright Copyright (c) 2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2017-2018 Governikus GmbH & Co. KG, Germany */ #include "RemoteReaderManagerPlugIn.h" @@ -448,7 +448,7 @@ class test_RemoteReaderManagerPlugIn QCOMPARE(result->getType(), RemoteCardMessageType::IFDDisconnect); QCOMPARE(mPlugin->getReaders().size(), 1); - Card* card = mPlugin->getReaders()[0]->getCard(); + Card* card = mPlugin->getReaders().at(0)->getCard(); QVERIFY(card != nullptr); QCOMPARE(card->connect(), CardReturnCode::OK); diff --git a/test/qt/card/test_Command.cpp b/test/qt/card/test_Command.cpp deleted file mode 100644 index 6f908a7e5..000000000 --- a/test/qt/card/test_Command.cpp +++ /dev/null @@ -1,39 +0,0 @@ -/*! - * \brief Tests for card commands - * - * \copyright Copyright (c) 2014-2017 Governikus GmbH & Co. KG, Germany - */ - -#include -#include - -#include "Commands.h" - -#include "TestFileHelper.h" - -using namespace governikus; - -class test_Command - : public QObject -{ - Q_OBJECT - - private Q_SLOTS: - void initTestCase() - { - } - - - void testPinModifyBuilder_createChangeEidPinCommandData() - { - PinModifyBuilder builder; - quint8 timeout = 77; - auto timeoutBytes = QByteArray::fromHex(QByteArray::number(timeout, 16)); - QCOMPARE(builder.createChangeEidPinCommandData(timeout), QByteArray::fromHex("82000000000606010202070400010200000004000000002C0203").prepend(timeoutBytes).prepend(timeoutBytes)); - } - - -}; - -QTEST_GUILESS_MAIN(test_Command) -#include "test_Command.moc" diff --git a/test/qt/card/test_CommandApdu.cpp b/test/qt/card/test_CommandApdu.cpp index 17351f868..a137cfa40 100644 --- a/test/qt/card/test_CommandApdu.cpp +++ b/test/qt/card/test_CommandApdu.cpp @@ -1,7 +1,7 @@ /*! * \brief Tests for the class CommandApdu. * - * \copyright Copyright (c) 2014-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2014-2018 Governikus GmbH & Co. KG, Germany */ #include diff --git a/test/qt/card/test_EstablishPACEChannelBuilder.cpp b/test/qt/card/test_EstablishPACEChannelBuilder.cpp index 668e4a16f..3efe21e6e 100644 --- a/test/qt/card/test_EstablishPACEChannelBuilder.cpp +++ b/test/qt/card/test_EstablishPACEChannelBuilder.cpp @@ -1,7 +1,7 @@ /*! * \brief Tests for card EstablishPACEChannelBuilder * - * \copyright Copyright (c) 2015-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2015-2018 Governikus GmbH & Co. KG, Germany */ #include diff --git a/test/qt/card/test_EstablishPACEChannelOutput.cpp b/test/qt/card/test_EstablishPACEChannelOutput.cpp index d211c0a0e..80ff0b869 100644 --- a/test/qt/card/test_EstablishPACEChannelOutput.cpp +++ b/test/qt/card/test_EstablishPACEChannelOutput.cpp @@ -1,7 +1,7 @@ /*! * \brief Tests for card EstablishPACEChannelOutput * - * \copyright Copyright (c) 2015-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2015-2018 Governikus GmbH & Co. KG, Germany */ #include diff --git a/test/qt/card/test_EstablishPACEChannelParser.cpp b/test/qt/card/test_EstablishPACEChannelParser.cpp index ae67353f5..657852e46 100644 --- a/test/qt/card/test_EstablishPACEChannelParser.cpp +++ b/test/qt/card/test_EstablishPACEChannelParser.cpp @@ -1,7 +1,7 @@ /*! * \brief Tests for \ref EstablishPACEChannelParser * - * \copyright Copyright (c) 2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2017-2018 Governikus GmbH & Co. KG, Germany */ #include "EstablishPACEChannelParser.h" diff --git a/test/qt/card/test_GeneralAuthenticateResponse.cpp b/test/qt/card/test_GeneralAuthenticateResponse.cpp index e025a3585..e29767357 100644 --- a/test/qt/card/test_GeneralAuthenticateResponse.cpp +++ b/test/qt/card/test_GeneralAuthenticateResponse.cpp @@ -1,7 +1,7 @@ /*! * \brief Tests for GeneralAuthenticate response APDUs * - * \copyright Copyright (c) 2015-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2015-2018 Governikus GmbH & Co. KG, Germany */ #include diff --git a/test/qt/card/test_MSEBuilder.cpp b/test/qt/card/test_MSEBuilder.cpp index 6f8b09c03..216d988d2 100644 --- a/test/qt/card/test_MSEBuilder.cpp +++ b/test/qt/card/test_MSEBuilder.cpp @@ -1,5 +1,5 @@ /*! - * \copyright Copyright (c) 2016-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2016-2018 Governikus GmbH & Co. KG, Germany */ #include "Commands.h" diff --git a/test/qt/card/test_ReaderManager.cpp b/test/qt/card/test_ReaderManager.cpp index 7a52904c1..4278a5cb0 100644 --- a/test/qt/card/test_ReaderManager.cpp +++ b/test/qt/card/test_ReaderManager.cpp @@ -1,5 +1,5 @@ /*! - * \copyright Copyright (c) 2014-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2014-2018 Governikus GmbH & Co. KG, Germany */ #include "ReaderManager.h" diff --git a/test/qt/card/test_SecureMessaging.cpp b/test/qt/card/test_SecureMessaging.cpp index a2834fa66..6ffda817e 100644 --- a/test/qt/card/test_SecureMessaging.cpp +++ b/test/qt/card/test_SecureMessaging.cpp @@ -1,5 +1,5 @@ /*! - * \copyright Copyright (c) 2014-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2014-2018 Governikus GmbH & Co. KG, Germany */ #include diff --git a/test/qt/card/test_SecureMessagingResponse.cpp b/test/qt/card/test_SecureMessagingResponse.cpp index 1e0a1ecc8..bb967da0b 100644 --- a/test/qt/card/test_SecureMessagingResponse.cpp +++ b/test/qt/card/test_SecureMessagingResponse.cpp @@ -1,7 +1,7 @@ /*! * \brief Tests for SecureMessagingResponse * - * \copyright Copyright (c) 2015-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2015-2018 Governikus GmbH & Co. KG, Germany */ #include diff --git a/test/qt/cli/test_UIPlugInCli.cpp b/test/qt/cli/test_UIPlugInCli.cpp index 70fbe7e88..74dac3213 100644 --- a/test/qt/cli/test_UIPlugInCli.cpp +++ b/test/qt/cli/test_UIPlugInCli.cpp @@ -1,7 +1,7 @@ /*! * \brief Unit tests for \ref UIPlugInCli * - * \copyright Copyright (c) 2015-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2015-2018 Governikus GmbH & Co. KG, Germany */ #include "CliHelper.h" diff --git a/test/qt/configuration/test_ProviderConfiguration.cpp b/test/qt/configuration/test_ProviderConfiguration.cpp index 930dce553..ad9f2c380 100644 --- a/test/qt/configuration/test_ProviderConfiguration.cpp +++ b/test/qt/configuration/test_ProviderConfiguration.cpp @@ -1,7 +1,7 @@ /*! * \brief Unit tests for \ref ProviderConfiguration * - * \copyright Copyright (c) 2014-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2014-2018 Governikus GmbH & Co. KG, Germany */ #include "ProviderConfiguration.h" diff --git a/test/qt/configuration/test_ProviderConfigurationParser.cpp b/test/qt/configuration/test_ProviderConfigurationParser.cpp index cbd392807..13ca80f26 100644 --- a/test/qt/configuration/test_ProviderConfigurationParser.cpp +++ b/test/qt/configuration/test_ProviderConfigurationParser.cpp @@ -1,7 +1,7 @@ /*! * \brief Unit tests for \ref ProviderConfigurationParser * - * \copyright Copyright (c) 2014-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2014-2018 Governikus GmbH & Co. KG, Germany */ #include "ProviderConfigurationParser.h" @@ -250,7 +250,7 @@ class test_ProviderConfigurationParser { QTest::addColumn("count"); - const int desktop = 65; + const int desktop = 64; QTest::newRow("win") << desktop; QTest::newRow("mac") << desktop; QTest::newRow("linux") << desktop; diff --git a/test/qt/configuration/test_ReaderConfiguration.cpp b/test/qt/configuration/test_ReaderConfiguration.cpp index 9e51dee23..abe1ad9e8 100644 --- a/test/qt/configuration/test_ReaderConfiguration.cpp +++ b/test/qt/configuration/test_ReaderConfiguration.cpp @@ -1,12 +1,14 @@ /*! * \brief Unit tests for \ref ReaderConfiguration * - * \copyright Copyright (c) 2014-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2014-2018 Governikus GmbH & Co. KG, Germany */ #include "ReaderConfiguration.h" +#include "Env.h" #include "FuncUtils.h" +#include "MockReaderDetector.h" #include "ResourceLoader.h" #include @@ -17,14 +19,29 @@ using namespace governikus; +Q_DECLARE_METATYPE(UsbId) + + class test_ReaderConfiguration : public QObject { Q_OBJECT + public: + test_ReaderConfiguration() + : mUsbIds() + , mMockReaderDetector(mUsbIds) + { + Env::set(ReaderDetector::staticMetaObject, &mMockReaderDetector); + } + + private: static const int cCardReadersInConfigurationFile; + QVector mUsbIds; + MockReaderDetector mMockReaderDetector; + private Q_SLOTS: void initTestCase() { @@ -32,9 +49,15 @@ class test_ReaderConfiguration } + void init() + { + mUsbIds.clear(); + } + + void checkDefaultReader() { - const ReaderConfigurationInfo readerSettingsInfo = ReaderConfiguration::getInstance().getReaderConfigurationInfo("crap"); + const ReaderConfigurationInfo readerSettingsInfo = Env::getSingleton()->getReaderConfigurationInfo("crap"); QCOMPARE(readerSettingsInfo.getName(), QString("crap")); QCOMPARE(readerSettingsInfo.getIcon()->getName(), QString("default_reader.png")); QCOMPARE(readerSettingsInfo.getIconWithNPA()->getName(), QString("default_reader_mit_ausweis.png")); @@ -44,53 +67,57 @@ class test_ReaderConfiguration void checkReaderData_data() { + QTest::addColumn("usbId"); QTest::addColumn("readerName"); QTest::addColumn("readerViewName"); QTest::addColumn("readerIcon"); QTest::addColumn("readerPattern"); - QTest::newRow("Remote Cardreader") << "NFC-abcdef1234567890" << "Smartphone als Kartenlesegerät" << "img_RemoteReader" << "^NFC.*"; + QTest::newRow("Remote Cardreader") << UsbId(0x0000, 0x0000) << "NFC-abcdef1234567890" << QStringLiteral("Smartphone als Kartenleseger\u00E4t") << "img_RemoteReader" << "^NFC.*"; - QTest::newRow("REINER SCT cyberJack RFID komfort") << "REINER SCT cyberJack RFID komfort" << "REINER SCT cyberJack RFID komfort" << "img_Reiner_SCT_cyberjack_RFID_komfort" << "REINER SCT cyberJack RFID komfort"; - QTest::newRow("REINER SCT cyberJack RFID standard") << "REINER SCT cyberJack RFID standard" << "REINER SCT cyberJack RFID standard" << "img_Reiner_SCT_cyberjack_RFID_standard" << "REINER SCT cyberJack RFID standard"; - QTest::newRow("REINER SCT cyberJack RFID basis") << "REINER SCT cyberJack RFID basis" << "REINER SCT cyberJack RFID basis" << "img_Reiner_SCT_cyberjack_RFID_basis" << "REINER SCT cyberJack RFID basis"; - QTest::newRow("REINER SCT cyberJack wave") << "REINER SCT cyberJack wave" << "REINER SCT cyberJack wave" << "img_cyberjack_wave" << "REINER SCT cyberJack wave"; + QTest::newRow("REINER SCT cyberJack RFID komfort") << UsbId(0x0C4B, 0x0501) << "REINER SCT cyberJack RFID komfort" << "REINER SCT cyberJack RFID komfort" << "img_Reiner_SCT_cyberjack_RFID_komfort" << "REINER SCT cyberJack RFID komfort"; + QTest::newRow("REINER SCT cyberJack RFID standard") << UsbId(0x0C4B, 0x0500) << "REINER SCT cyberJack RFID standard" << "REINER SCT cyberJack RFID standard" << "img_Reiner_SCT_cyberjack_RFID_standard" << "REINER SCT cyberJack RFID standard"; + QTest::newRow("REINER SCT cyberJack RFID basis") << UsbId(0x0C4B, 0x9102) << "REINER SCT cyberJack RFID basis" << "REINER SCT cyberJack RFID basis" << "img_Reiner_SCT_cyberjack_RFID_basis" << "REINER SCT cyberJack RFID basis"; + QTest::newRow("REINER SCT cyberJack wave") << UsbId(0x0C4B, 0x0505) << "REINER SCT cyberJack wave" << "REINER SCT cyberJack wave" << "img_cyberjack_wave" << "REINER SCT cyberJack wave"; - QTest::newRow("KOBIL IDToken") << "KOBIL Systems IDToken" << "KOBIL IDToken" << "img_KOBIL_ID_Token" << "KOBIL (Systems )?IDToken"; + QTest::newRow("KOBIL IDToken") << UsbId(0x0D46, 0x301D) << "KOBIL Systems IDToken" << "KOBIL IDToken" << "img_KOBIL_ID_Token" << "KOBIL (Systems )?IDToken"; - QTest::newRow("SCM SDI011") << "SDI011 Contactless Reader" << "SDI011 Contactless Reader" << "img_Identive_SDI011" << "SDI011 (USB )?(Smart Card|Contactless) Reader"; - QTest::newRow("SCM SCL011") << "SCM Microsystems Inc. SCL011 Contactless Reader" << "SCL01x Contactless Reader" << "img_Identive_SCL011" << "(SCM Microsystems Inc. )?SCL011 Contactless Reader"; + QTest::newRow("SCM SDI011") << UsbId(0x04E6, 0x512B) << "SDI011 Contactless Reader" << "SDI011 Contactless Reader" << "img_Identive_SDI011" << "SDI011 (USB )?(Smart Card|Contactless) Reader"; + QTest::newRow("SCM SCL011") << UsbId(0x04E6, 0x5292) << "SCM Microsystems Inc. SCL011 Contactless Reader" << "SCL01x Contactless Reader" << "img_Identive_SCL011" << "(SCM Microsystems Inc. )?SCL011 Contactless Reader"; - QTest::newRow("ACS-ACR122U") << "ACS ACR122U" << "ACS ACR122U" << "img_ACS_ACR122U" << "ACS ACR122U"; - QTest::newRow("ACS-ACR1281U") << "ACS ACR1281 PICC Reader" << "ACS ACR1281U" << "img_ACS_ACR1281U" << "ACS ACR1281 PICC Reader"; - QTest::newRow("ACS-ACR1252U") << "ACS ACR1252 Dual Reader" << "ACS ACR1252U" << "img_ACS_ACR1252U" << "ACS ACR1252 Dual Reader|ACS ACR1252 1S CL Reader"; + QTest::newRow("ACS-ACR122U") << UsbId(0x072F, 0x2200) << "ACS ACR122U" << "ACS ACR122U" << "img_ACS_ACR122U" << "ACS ACR122U"; + QTest::newRow("ACS-ACR1281U") << UsbId(0x072F, 0x0901) << "ACS ACR1281 PICC Reader" << "ACS ACR1281U" << "img_ACS_ACR1281U" << "ACS ACR1281 PICC Reader"; + QTest::newRow("ACS-ACR1252U") << UsbId(0x072F, 0x223B) << "ACS ACR1252 Dual Reader" << "ACS ACR1252U" << "img_ACS_ACR1252U" << "ACS ACR1252 Dual Reader|ACS ACR1252 1S CL Reader"; - QTest::newRow("OMNIKEY 5021") << "OMNIKEY CardMan 5x21-CL 0" << "OMNIKEY 5021-CL" << "img_HID_Omnikey_Mobile_Reader_5021_CL" << "OMNIKEY CardMan 5x21-CL|OMNIKEY CardMan \\(076B:5340\\) 5021 CL"; - QTest::newRow("OMNIKEY 5421") << "OMNIKEY CardMan (076B:5421) 5421(1)" << "OMNIKEY 5421" << "img_HID_Omnikey_5421" << "OMNIKEY CardMan \\(076B:5421\\) 5421|OMNIKEY Smart Card Reader USB"; + QTest::newRow("OMNIKEY 5021") << UsbId(0x076B, 0x5340) << "OMNIKEY CardMan 5x21-CL 0" << "OMNIKEY 5021-CL" << "img_HID_Omnikey_Mobile_Reader_5021_CL" << "OMNIKEY CardMan 5x21-CL|OMNIKEY CardMan \\(076B:5340\\) 5021 CL"; + QTest::newRow("OMNIKEY 5321 v2") << UsbId(0x076B, 0x5321) << "OMNIKEY CardMan (076B:5321) 5321(1)" << "OMNIKEY 5321 v2" << "img_HID_Global_OMNIKEY_5321_V2" << "OMNIKEY CardMan 5x21-CL|OMNIKEY CardMan \\(076B:5321\\) 5321"; + QTest::newRow("OMNIKEY 5421") << UsbId(0x076B, 0x5421) << "OMNIKEY CardMan (076B:5421) 5421(1)" << "OMNIKEY 5421" << "img_HID_Omnikey_5421" << "OMNIKEY CardMan \\(076B:5421\\) 5421|OMNIKEY Smart Card Reader USB"; - QTest::newRow("FEIG OBID myAXXESS RFID-Reader") << "FEIG ELECTRONIC GmbH OBID myAXXESS basic" << "OBID RFID-Reader" << "img_FEIG_myAXXES_basic" << "FEIG ELECTRONIC GmbH OBID myAXXESS basic"; + QTest::newRow("FEIG OBID myAXXESS RFID-Reader") << UsbId(0x0AB1, 0x0003) << "FEIG ELECTRONIC GmbH OBID myAXXESS basic" << "OBID RFID-Reader" << "img_FEIG_myAXXES_basic" << "FEIG ELECTRONIC GmbH OBID myAXXESS basic"; - QTest::newRow("Gemalto-Prox-DU") << "Gemalto Prox-DU" << "Prox-DU HID" << "img_Gemalto_Prox_DU" << "Gemalto Prox(-DU| Dual)($| USB| Contactless_)"; - QTest::newRow("Gemalto-Prox-SU") << "Gemalto Prox SU" << "Gemalto Prox-SU Contactless" << "img_Gemalto_Prox_SU" << "Gemalto Prox( |-)SU"; + QTest::newRow("Gemalto-Prox-DU") << UsbId(0x08E6, 0x5503) << "Gemalto Prox-DU" << "Prox-DU HID" << "img_Gemalto_Prox_DU" << "Gemalto Prox(-DU| Dual)($| USB| Contactless_)"; + QTest::newRow("Gemalto-Prox-SU") << UsbId(0x08E6, 0x5504) << "Gemalto Prox SU" << "Gemalto Prox-SU Contactless" << "img_Gemalto_Prox_SU" << "Gemalto Prox( |-)SU($| USB| Contactless_)"; - QTest::newRow("Identiv-SCL-3711") << "Identiv SCL3711" << "Identiv SCL3711" << "img_Identive_SCL3711" << "SCL3711"; - QTest::newRow("Identiv-Cloud-3700-F") << "CLOUD 3700 F Contactless Reader" << "Identiv Cloud 3700 F" << "img_Identive_Cloud_3700_F" << "(CLOUD 3700 F Contactless Reader|Identiv uTrust 3700 F CL Reader)"; - QTest::newRow("Identiv-Cloud-4700-F") << "Identiv CLOUD 4700 F Contactless Reader 0" << "Identiv Cloud 4700 F" << "img_Identive_Cloud_4700_F" << "(CLOUD 4700 F Contactless Reader|Identiv uTrust 4700 F Dual Interface Reader)"; - QTest::newRow("Identiv-Cloud-4701-F") << "Identiv CLOUD 4701 F Contactless Reader 0" << "Identiv Cloud 4701 F" << "img_Identive_Cloud_4701_F" << "(CLOUD 4701 F Contactless Reader|Identiv uTrust 4701 F Dual Interface Reader)"; + QTest::newRow("Identiv-SCL-3711") << UsbId(0x04E6, 0x5591) << "Identiv SCL3711" << "Identiv SCL3711" << "img_Identive_SCL3711" << "SCL3711"; + QTest::newRow("Identiv-Cloud-3700-F") << UsbId(0x04E6, 0x5790) << "CLOUD 3700 F Contactless Reader" << "Identiv Cloud 3700 F" << "img_Identive_Cloud_3700_F" << "(CLOUD 3700 F Contactless Reader|Identiv uTrust 3700 F CL Reader)"; + QTest::newRow("Identiv-Cloud-4700-F") << UsbId(0x04E6, 0x5720) << "Identiv CLOUD 4700 F Contactless Reader 0" << "Identiv Cloud 4700 F" << "img_Identive_Cloud_4700_F" << "(CLOUD 4700 F Contactless Reader|Identiv uTrust 4700 F Dual Interface Reader)"; + QTest::newRow("Identiv-Cloud-4701-F") << UsbId(0x04E6, 0x5724) << "Identiv CLOUD 4701 F Contactless Reader 0" << "Identiv Cloud 4701 F" << "img_Identive_Cloud_4701_F" << "(CLOUD 4701 F Contactless Reader|Identiv uTrust 4701 F Dual Interface Reader)"; - QTest::newRow("Cherry-TC-1200-data") << "Cherry TC 1200" << "Cherry TC-1200" << "img_Cherry_TC_1200" << "(Cherry TC 1200($|[^-])|TC 12xx-CL 0|Cherry SC Reader \\(046A:0091\\))"; - QTest::newRow("Cherry-TC-1300-data") << "Cherry TC 1300" << "Cherry TC-1300" << "img_Cherry_TC_1300" << "(Cherry TC 1300|Cherry Smartcard Terminal TC 13xx-CL 0|Cherry SC Reader \\(046A:0092\\))"; + QTest::newRow("Cherry-TC-1200-data") << UsbId(0x046A, 0x0091) << "Cherry TC 1200" << "Cherry TC-1200" << "img_Cherry_TC_1200" << "(Cherry TC 1200($|[^-])|TC 12xx-CL 0|Cherry SC Reader \\(046A:0091\\))"; + QTest::newRow("Cherry-TC-1300-data") << UsbId(0x046A, 0x0092) << "Cherry TC 1300" << "Cherry TC-1300" << "img_Cherry_TC_1300" << "(Cherry TC 1300|Cherry Smartcard Terminal TC 13xx-CL 0|Cherry SC Reader \\(046A:0092\\))"; } void checkReaderData() { + QFETCH(UsbId, usbId); QFETCH(QString, readerName); QFETCH(QString, readerViewName); QFETCH(QString, readerIcon); QFETCH(QString, readerPattern); - const ReaderConfigurationInfo readerSettingsInfo = ReaderConfiguration::getInstance().getReaderConfigurationInfo(readerName); + mUsbIds += usbId; + const ReaderConfigurationInfo readerSettingsInfo = Env::getSingleton()->getReaderConfigurationInfo(readerName); QCOMPARE(readerSettingsInfo.getName(), readerViewName); QCOMPARE(readerSettingsInfo.getIcon()->getName(), readerIcon + ".png"); QCOMPARE(readerSettingsInfo.getIconWithNPA()->getName(), readerIcon + "_mit_ausweis.png"); @@ -100,162 +127,197 @@ class test_ReaderConfiguration void checkReaderPattern_data() { + QTest::addColumn("usbId"); QTest::addColumn("readerName"); QTest::addColumn("readerViewName"); QTest::addColumn("readerIcon"); QTest::addColumn("readerPattern"); - QTest::newRow("UU") << "crap" << "crap"; - - QTest::newRow("Remote Cardreader") << "NFC-abcdef1234567890" << "Smartphone als Kartenlesegerät"; - - QTest::newRow("REINER SCT cyberJack RFID komfort-windows-8.1") << "REINER SCT cyberJack RFID komfort USB 1" << "REINER SCT cyberJack RFID komfort"; - QTest::newRow("REINER SCT cyberJack RFID komfort-windows-10") << "REINER SCT cyberJack RFID komfort" << "REINER SCT cyberJack RFID komfort"; - QTest::newRow("REINER SCT cyberJack RFID komfort-macosx-10.10") << "REINER SCT cyberJack RFID komfort" << "REINER SCT cyberJack RFID komfort"; - QTest::newRow("REINER SCT cyberJack RFID komfort-macosx-10.11") << "REINER SCT cyberJack RFID komfort" << "REINER SCT cyberJack RFID komfort"; - QTest::newRow("REINER SCT cyberJack RFID komfort-macosx-10.12") << "REINER SCT cyberJack RFID komfort" << "REINER SCT cyberJack RFID komfort"; - - QTest::newRow("REINER SCT cyberJack RFID standard-windows-8.1") << "REINER SCT cyberJack RFID standard USB 1" << "REINER SCT cyberJack RFID standard"; - QTest::newRow("REINER SCT cyberJack RFID standard-windows-10") << "REINER SCT cyberJack RFID standard" << "REINER SCT cyberJack RFID standard"; - QTest::newRow("REINER SCT cyberJack RFID standard-macosx-10.10") << "REINER SCT cyberJack RFID standard" << "REINER SCT cyberJack RFID standard"; - QTest::newRow("REINER SCT cyberJack RFID standard-macosx-10.11") << "REINER SCT cyberJack RFID standard" << "REINER SCT cyberJack RFID standard"; - QTest::newRow("REINER SCT cyberJack RFID standard-macosx-10.12") << "REINER SCT cyberJack RFID standard" << "REINER SCT cyberJack RFID standard"; - - QTest::newRow("REINER SCT cyberJack RFID basis-windows-8.1") << "REINER SCT cyberJack RFID basis 0" << "REINER SCT cyberJack RFID basis"; - QTest::newRow("REINER SCT cyberJack RFID basis-windows-10") << "REINER SCT cyberJack RFID basis" << "REINER SCT cyberJack RFID basis"; - QTest::newRow("REINER SCT cyberJack RFID basis-macosx-10.10") << "REINER SCT cyberJack RFID basis" << "REINER SCT cyberJack RFID basis"; - QTest::newRow("REINER SCT cyberJack RFID basis-macosx-10.11") << "REINER SCT cyberJack RFID basis" << "REINER SCT cyberJack RFID basis"; - QTest::newRow("REINER SCT cyberJack RFID basis-macosx-10.12") << "REINER SCT cyberJack RFID basis" << "REINER SCT cyberJack RFID basis"; - - QTest::newRow("REINER SCT cyberJack wave-windows-8.1") << "REINER SCT cyberJack wave USB 1" << "REINER SCT cyberJack wave"; - QTest::newRow("REINER SCT cyberJack wave-windows-10") << "REINER SCT cyberJack wave" << "REINER SCT cyberJack wave"; - QTest::newRow("REINER SCT cyberJack wave-macosx-10.10") << "REINER SCT cyberJack wave" << "REINER SCT cyberJack wave"; - QTest::newRow("REINER SCT cyberJack wave-macosx-10.11") << "REINER SCT cyberJack wave" << "REINER SCT cyberJack wave"; - QTest::newRow("REINER SCT cyberJack wave-macosx-10.12") << "REINER SCT cyberJack wave" << "REINER SCT cyberJack wave"; - - QTest::newRow("KOBIL IDToken-windows-8.1") << "KOBIL IDToken 0" << "KOBIL IDToken"; - QTest::newRow("KOBIL IDToken-windows-10") << "KOBIL IDToken 0" << "KOBIL IDToken"; - QTest::newRow("KOBIL IDToken-macosx-10.10") << "KOBIL Systems IDToken" << "KOBIL IDToken"; - QTest::newRow("KOBIL IDToken-macosx-10.11") << "KOBIL IDToken" << "KOBIL IDToken"; - QTest::newRow("KOBIL IDToken-macosx-10.12") << "KOBIL IDToken" << "KOBIL IDToken"; - - QTest::newRow("SCM SDI011-windows-10") << "SDI011 Contactless Reader" << "SDI011 Contactless Reader"; - QTest::newRow("SCM SDI011-macosx-10.10-1") << "SCM Microsystems Inc. SDI011 Contactless Reader(1)" << "SDI011 Contactless Reader"; - QTest::newRow("SCM SDI011-macosx-10.10-2") << "SCM Microsystems Inc. SDI011 Contactless Reader(2)" << "SDI011 Contactless Reader"; - QTest::newRow("SCM SDI011-macosx-10.11-1") << "SCM Microsystems Inc. SDI011 Contactless Reader(1)" << "SDI011 Contactless Reader"; - QTest::newRow("SCM SDI011-macosx-10.11-2") << "SCM Microsystems Inc. SDI011 Contactless Reader(2)" << "SDI011 Contactless Reader"; - QTest::newRow("SCM SDI011-macosx-10.12-1") << "SCM Microsystems Inc. SDI011 Contactless Reader(1)" << "SDI011 Contactless Reader"; - QTest::newRow("SCM SDI011-macosx-10.12-1") << "SCM Microsystems Inc. SDI011 Contactless Reader(2)" << "SDI011 Contactless Reader"; - - QTest::newRow("SCM SCL011-windows-10") << "SCL011 Contactless Reader" << "SCL01x Contactless Reader"; - QTest::newRow("SCM SCL011-macosx-10.11") << "SCM Microsystems Inc. SCL011 Contactless Reader" << "SCL01x Contactless Reader"; - - QTest::newRow("ACS-ACR122U-windows-8.1") << "ACS ACR122U PICC Interface 0" << "ACS ACR122U"; - QTest::newRow("ACS-ACR122U-windows-10") << "ACS ACR122U PICC Interface 0" << "ACS ACR122U"; - QTest::newRow("ACS-ACR122U-macosx-10.11") << "ACS ACR122U" << "ACS ACR122U"; - QTest::newRow("ACS-ACR122U-macosx-10.12") << "ACS ACR122U PICC Interface" << "ACS ACR122U"; - - QTest::newRow("ACS-ACR1281U-windows-8.1") << "ACS ACR1281 PICC Reader 0" << "ACS ACR1281U"; - QTest::newRow("ACS-ACR1281U-windows-10") << "ACS ACR1281 PICC Reader 0" << "ACS ACR1281U"; - QTest::newRow("ACS-ACR1281U-macosx-10.10") << "ACS ACR1281 PICC Reader" << "ACS ACR1281U"; - QTest::newRow("ACS-ACR1281U-macosx-10.11") << "ACS ACR1281 PICC Reader" << "ACS ACR1281U"; - QTest::newRow("ACS-ACR1281U-macosx-10.12") << "ACS ACR1281 PICC Reader" << "ACS ACR1281U"; - - QTest::newRow("ACS-ACR1252U-windows-8.1-1") << "ACS ACR1252 Dual Reader PICC 0" << "ACS ACR1252U"; - QTest::newRow("ACS-ACR1252U-windows-8.1-2") << "ACS ACR1252 Dual Reader SAM 0" << "ACS ACR1252U"; - QTest::newRow("ACS-ACR1252U-windows-10") << "ACS ACR1252 Dual Reader" << "ACS ACR1252U"; - QTest::newRow("ACS-ACR1252U-macosx-10.11-1") << "ACS ACR1252 1S CL Reader(1)" << "ACS ACR1252U"; - QTest::newRow("ACS-ACR1252U-macosx-10.11-2") << "ACS ACR1252 1S CL Reader(2)" << "ACS ACR1252U"; - QTest::newRow("ACS-ACR1252U-macosx-10.12-1") << "ACS ACR1252 1S CL Reader(1)" << "ACS ACR1252U"; - QTest::newRow("ACS-ACR1252U-macosx-10.12-2") << "ACS ACR1252 1S CL Reader(2)" << "ACS ACR1252U"; - - QTest::newRow("OMNIKEY 5021-windows-10") << "OMNIKEY CardMan 5x21-CL 0" << "OMNIKEY 5021-CL"; - QTest::newRow("OMNIKEY 5021-macosx-10.11") << "OMNIKEY CardMan (076B:5340) 5021 CL" << "OMNIKEY 5021-CL"; - QTest::newRow("OMNIKEY 5021-macosx-10.12") << "OMNIKEY CardMan (076B:5340) 5021 CL" << "OMNIKEY 5021-CL"; - - QTest::newRow("OMNIKEY 5421-windows-8.1") << "OMNIKEY Smart Card Reader USB 0" << "OMNIKEY 5421"; - QTest::newRow("OMNIKEY 5421-windows-10") << "OMNIKEY Smart Card Reader USB 0" << "OMNIKEY 5421"; - QTest::newRow("OMNIKEY 5421-macosx-10.11-1") << "OMNIKEY CardMan (076B:5421) 5421(1)" << "OMNIKEY 5421"; - QTest::newRow("OMNIKEY 5421-macosx-10.11-2") << "OMNIKEY CardMan (076B:5421) 5421(2)" << "OMNIKEY 5421"; - QTest::newRow("OMNIKEY 5421-macosx-10.12-1") << "OMNIKEY CardMan (076B:5421) 5421(1)" << "OMNIKEY 5421"; - QTest::newRow("OMNIKEY 5421-macosx-10.12-2") << "OMNIKEY CardMan (076B:5421) 5421(2)" << "OMNIKEY 5421"; - - QTest::newRow("FEIG OBID myAXXESS RFID-Reader-windows-8.1") << "FEIG ELECTRONIC GmbH OBID myAXXESS basic Slot:CL 358334430" << "OBID RFID-Reader"; - QTest::newRow("FEIG OBID myAXXESS RFID-Reader-windows-10") << "FEIG ELECTRONIC GmbH OBID myAXXESS basic" << "OBID RFID-Reader"; - - QTest::newRow("Gemalto-Prox-DU-windows-8.1-1") << "Gemalto Prox-DU Contact_10900383 0" << "Gemalto Prox-DU Contact_10900383 0"; - QTest::newRow("Gemalto-Prox-DU-windows-8.1-2") << "Gemalto Prox-DU Contactless_10900383 0" << "Prox-DU HID"; - QTest::newRow("Gemalto-Prox-DU-windows-10-1") << "Gemalto Prox-DU" << "Prox-DU HID"; - QTest::newRow("Gemalto-Prox-DU-windows-10-2") << "Gemalto Prox Dual" << "Prox-DU HID"; - QTest::newRow("Gemalto-Prox-DU-windows-macosx-10.10-1") << "Gemalto Prox Dual USB PC LinkReader(1)" << "Prox-DU HID"; - QTest::newRow("Gemalto-Prox-DU-windows-macosx-10.10-2") << "Gemalto Prox Dual USB PC LinkReader(2)" << "Prox-DU HID"; - QTest::newRow("Gemalto-Prox-DU-windows-macosx-10.11-1") << "Gemalto Prox Dual USB PC Link Reader(1)" << "Prox-DU HID"; - QTest::newRow("Gemalto-Prox-DU-windows-macosx-10.11-2") << "Gemalto Prox Dual USB PC Link Reader(2)" << "Prox-DU HID"; - QTest::newRow("Gemalto-Prox-DU-windows-macosx-10.12-1") << "Gemalto Prox Dual USB PC Link Reader(1)" << "Prox-DU HID"; - QTest::newRow("Gemalto-Prox-DU-windows-macosx-10.12-2") << "Gemalto Prox Dual USB PC Link Reader(2)" << "Prox-DU HID"; - - QTest::newRow("Gemalto-Prox-SU-windows-8.1") << "Gemalto Prox-SU Contactless_10800004 0" << "Gemalto Prox-SU Contactless"; - QTest::newRow("Gemalto-Prox-SU-windows-10-1") << "Gemalto Prox SU" << "Gemalto Prox-SU Contactless"; - QTest::newRow("Gemalto-Prox-SU-windows-10-2") << "Gemalto Prox-SU" << "Gemalto Prox-SU Contactless"; - - QTest::newRow("Identiv-SCL-3711-windows-8.1") << "SCM Microsystems SCL3711 reader & NFC device 0" << "Identiv SCL3711"; - QTest::newRow("Identiv-SCL-3711-windows-10") << "Identiv SCL3711" << "Identiv SCL3711"; - QTest::newRow("Identiv-SCL-3711-macosx-10.10") << "SCL3711 reader and NFC device" << "Identiv SCL3711"; - - QTest::newRow("Identiv-Cloud-3700-F-windows-8.1") << "Identiv CLOUD 3700 F Contactless Reader 0" << "Identiv Cloud 3700 F"; - QTest::newRow("Identiv-Cloud-3700-F-windows-10-1") << "CLOUD 3700 F Contactless Reader" << "Identiv Cloud 3700 F"; - QTest::newRow("Identiv-Cloud-3700-F-windows-10-2") << "CLOUD 3700 F Contact Reader" << "CLOUD 3700 F Contact Reader"; - QTest::newRow("Identiv-Cloud-3700-F-macosx-10.10") << "Identiv uTrust 3700 F CL Reader" << "Identiv Cloud 3700 F"; - QTest::newRow("Identiv-Cloud-3700-F-macosx-10.11") << "Identiv uTrust 3700 F CL Reader" << "Identiv Cloud 3700 F"; - QTest::newRow("Identiv-Cloud-3700-F-macosx-10.12") << "Identiv uTrust 3700 F CL Reader" << "Identiv Cloud 3700 F"; - - QTest::newRow("Identiv-Cloud-4700-F-windows-8.1-1") << "Identive CLOUD 4700 F Contactless Reader 0" << "Identiv Cloud 4700 F"; - QTest::newRow("Identiv-Cloud-4700-F-windows-8.1-2") << "Identive CLOUD 4700 F Contact Reader 0" << "Identive CLOUD 4700 F Contact Reader 0"; - QTest::newRow("Identiv-Cloud-4700-F-windows-10-1") << "Identiv CLOUD 4700 F Contactless Reader 0" << "Identiv Cloud 4700 F"; - QTest::newRow("Identiv-Cloud-4700-F-windows-10-2") << "Identiv CLOUD 4700 F Contact Reader 0" << "Identiv CLOUD 4700 F Contact Reader 0"; - QTest::newRow("Identiv-Cloud-4700-F-macosx-10.10-1") << "Identiv uTrust 4700 F Dual Interface Reader(1)" << "Identiv Cloud 4700 F"; - QTest::newRow("Identiv-Cloud-4700-F-macosx-10.10-2") << "Identiv uTrust 4700 F Dual Interface Reader(2)" << "Identiv Cloud 4700 F"; - QTest::newRow("Identiv-Cloud-4700-F-macosx-10.11-1") << "Identiv uTrust 4700 F Dual Interface Reader(1)" << "Identiv Cloud 4700 F"; - QTest::newRow("Identiv-Cloud-4700-F-macosx-10.11-2") << "Identiv uTrust 4700 F Dual Interface Reader(2)" << "Identiv Cloud 4700 F"; - QTest::newRow("Identiv-Cloud-4700-F-macosx-10.12-1") << "Identiv uTrust 4700 F Dual Interface Reader(1)" << "Identiv Cloud 4700 F"; - QTest::newRow("Identiv-Cloud-4700-F-macosx-10.12-2") << "Identiv uTrust 4700 F Dual Interface Reader(2)" << "Identiv Cloud 4700 F"; - - QTest::newRow("Identiv-Cloud-4701-F-windows-8.1-1") << "Identiv CLOUD 4701 F Contactless Reader 0" << "Identiv Cloud 4701 F"; - QTest::newRow("Identiv-Cloud-4701-F-windows-8.1-2") << "Identiv CLOUD 4701 F Contact Reader 0" << "Identiv CLOUD 4701 F Contact Reader 0"; - QTest::newRow("Identiv-Cloud-4701-F-windows-10-1") << "Identiv CLOUD 4701 F Contactless Reader 0" << "Identiv Cloud 4701 F"; - QTest::newRow("Identiv-Cloud-4701-F-windows-10-2") << "Identiv CLOUD 4701 F Contact Reader 0" << "Identiv CLOUD 4701 F Contact Reader 0"; - QTest::newRow("Identiv-Cloud-4701-F-macosx-10.10-1") << "Identiv uTrust 4701 F Dual Interface Reader(1)" << "Identiv Cloud 4701 F"; - QTest::newRow("Identiv-Cloud-4701-F-macosx-10.10-2") << "Identiv uTrust 4701 F Dual Interface Reader(2)" << "Identiv Cloud 4701 F"; - QTest::newRow("Identiv-Cloud-4701-F-macosx-10.11-1") << "Identiv uTrust 4701 F Dual Interface Reader(1)" << "Identiv Cloud 4701 F"; - QTest::newRow("Identiv-Cloud-4701-F-macosx-10.11-2") << "Identiv uTrust 4701 F Dual Interface Reader(2)" << "Identiv Cloud 4701 F"; - QTest::newRow("Identiv-Cloud-4701-F-macosx-10.12-1") << "Identiv uTrust 4701 F Dual Interface Reader(1)" << "Identiv Cloud 4701 F"; - QTest::newRow("Identiv-Cloud-4701-F-macosx-10.12-2") << "Identiv uTrust 4701 F Dual Interface Reader(2)" << "Identiv Cloud 4701 F"; - - QTest::newRow("Cherry-TC-1200-windows-8.1-1") << "Cherry Smartcard Terminal TC 12xx-CL 0" << "Cherry TC-1200"; - QTest::newRow("Cherry-TC-1200-windows-10-1") << "Cherry Smartcard Terminal TC 12xx 0" << "Cherry Smartcard Terminal TC 12xx 0"; - QTest::newRow("Cherry-TC-1200-windows-10-2") << "Cherry Smartcard Terminal TC 12xx-CL 0" << "Cherry TC-1200"; - QTest::newRow("Cherry-TC-1200-macosx-10.11") << "Cherry SC Reader (046A:0091)" << "Cherry TC-1200"; - QTest::newRow("Cherry-TC-1200-macosx-10.12") << "Cherry SC Reader (046A:0091)" << "Cherry TC-1200"; - QTest::newRow("Cherry-TC-1200-linux") << "Cherry TC 1200" << "Cherry TC-1200"; - - QTest::newRow("Cherry-TC-1300-windows-8.1-1") << "Cherry Smartcard Terminal TC 13xx 0" << "Cherry Smartcard Terminal TC 13xx 0"; - QTest::newRow("Cherry-TC-1300-windows-8.1-2") << "Cherry Smartcard Terminal TC 13xx-CL 0" << "Cherry TC-1300"; - QTest::newRow("Cherry-TC-1300-windows-10-1") << "Cherry Smartcard Terminal TC 13xx 0" << "Cherry Smartcard Terminal TC 13xx 0"; - QTest::newRow("Cherry-TC-1300-windows-10-2") << "Cherry Smartcard Terminal TC 13xx-CL 0" << "Cherry TC-1300"; - QTest::newRow("Cherry-TC-1300-macosx-10.11-1") << "Cherry SC Reader (046A:0092)(1)" << "Cherry TC-1300"; - QTest::newRow("Cherry-TC-1300-macosx-10.11-2") << "Cherry SC Reader (046A:0092)(2)" << "Cherry TC-1300"; - QTest::newRow("Cherry-TC-1300-macosx-10.12-1") << "Cherry SC Reader (046A:0092)(1)" << "Cherry TC-1300"; - QTest::newRow("Cherry-TC-1300-macosx-10.12-2") << "Cherry SC Reader (046A:0092)(2)" << "Cherry TC-1300"; - QTest::newRow("Cherry-TC-1300-linux") << "Cherry TC 1300" << "Cherry TC-1300"; + QTest::newRow("UU") << UsbId(0xFFFF, 0xFFFF) << "crap" << "crap"; + + QTest::newRow("Remote Cardreader") << UsbId(0x0000, 0x0000) << "NFC-abcdef1234567890" << QStringLiteral("Smartphone als Kartenleseger\u00E4t"); + + QTest::newRow("REINER SCT cyberJack RFID komfort-windows-7-32") << UsbId(0x0C4B, 0x0501) << "REINER SCT cyberJack RFID komfort USB 1" << "REINER SCT cyberJack RFID komfort"; + QTest::newRow("REINER SCT cyberJack RFID komfort-windows-7-64") << UsbId(0x0C4B, 0x0501) << "REINER SCT cyberJack RFID komfort USB 1" << "REINER SCT cyberJack RFID komfort"; + QTest::newRow("REINER SCT cyberJack RFID komfort-windows-8.1") << UsbId(0x0C4B, 0x0501) << "REINER SCT cyberJack RFID komfort USB 1" << "REINER SCT cyberJack RFID komfort"; + QTest::newRow("REINER SCT cyberJack RFID komfort-windows-10.0") << UsbId(0x0C4B, 0x0501) << "REINER SCT cyberJack RFID komfort USB 1" << "REINER SCT cyberJack RFID komfort"; + QTest::newRow("REINER SCT cyberJack RFID komfort-macosx-10.10") << UsbId(0x0C4B, 0x0501) << "REINER SCT cyberJack RFID komfort" << "REINER SCT cyberJack RFID komfort"; + QTest::newRow("REINER SCT cyberJack RFID komfort-macosx-10.11") << UsbId(0x0C4B, 0x0501) << "REINER SCT cyberJack RFID komfort" << "REINER SCT cyberJack RFID komfort"; + QTest::newRow("REINER SCT cyberJack RFID komfort-macosx-10.12") << UsbId(0x0C4B, 0x0501) << "REINER SCT cyberJack RFID komfort" << "REINER SCT cyberJack RFID komfort"; + QTest::newRow("REINER SCT cyberJack RFID komfort-macosx-10.13") << UsbId(0x0C4B, 0x0501) << "REINER SCT cyberJack RFID komfort" << "REINER SCT cyberJack RFID komfort"; + + QTest::newRow("REINER SCT cyberJack RFID standard-windows-7.32") << UsbId(0x0C4B, 0x0500) << "REINER SCT cyberJack RFID standard USB 1" << "REINER SCT cyberJack RFID standard"; + QTest::newRow("REINER SCT cyberJack RFID standard-windows-7.64") << UsbId(0x0C4B, 0x0500) << "REINER SCT cyberJack RFID standard USB 1" << "REINER SCT cyberJack RFID standard"; + QTest::newRow("REINER SCT cyberJack RFID standard-windows-8.1") << UsbId(0x0C4B, 0x0500) << "REINER SCT cyberJack RFID standard USB 1" << "REINER SCT cyberJack RFID standard"; + QTest::newRow("REINER SCT cyberJack RFID standard-windows-10.0") << UsbId(0x0C4B, 0x0500) << "REINER SCT cyberJack RFID standard USB 1" << "REINER SCT cyberJack RFID standard"; + QTest::newRow("REINER SCT cyberJack RFID standard-macosx-10.10") << UsbId(0x0C4B, 0x0500) << "REINER SCT cyberJack RFID standard" << "REINER SCT cyberJack RFID standard"; + QTest::newRow("REINER SCT cyberJack RFID standard-macosx-10.11") << UsbId(0x0C4B, 0x0500) << "REINER SCT cyberJack RFID standard" << "REINER SCT cyberJack RFID standard"; + QTest::newRow("REINER SCT cyberJack RFID standard-macosx-10.12") << UsbId(0x0C4B, 0x0500) << "REINER SCT cyberJack RFID standard" << "REINER SCT cyberJack RFID standard"; + QTest::newRow("REINER SCT cyberJack RFID standard-macosx-10.13") << UsbId(0x0C4B, 0x0500) << "REINER SCT cyberJack RFID standard" << "REINER SCT cyberJack RFID standard"; + + QTest::newRow("REINER SCT cyberJack RFID basis-windows-8.1") << UsbId(0x0C4B, 0x9102) << "REINER SCT cyberJack RFID basis 0" << "REINER SCT cyberJack RFID basis"; + QTest::newRow("REINER SCT cyberJack RFID basis-windows-10") << UsbId(0x0C4B, 0x9102) << "REINER SCT cyberJack RFID basis" << "REINER SCT cyberJack RFID basis"; + QTest::newRow("REINER SCT cyberJack RFID basis-macosx-10.10") << UsbId(0x0C4B, 0x9102) << "REINER SCT cyberJack RFID basis" << "REINER SCT cyberJack RFID basis"; + QTest::newRow("REINER SCT cyberJack RFID basis-macosx-10.11") << UsbId(0x0C4B, 0x9102) << "REINER SCT cyberJack RFID basis" << "REINER SCT cyberJack RFID basis"; + QTest::newRow("REINER SCT cyberJack RFID basis-macosx-10.12") << UsbId(0x0C4B, 0x9102) << "REINER SCT cyberJack RFID basis" << "REINER SCT cyberJack RFID basis"; + + QTest::newRow("REINER SCT cyberJack wave-windows-8.1") << UsbId(0x0C4B, 0x0505) << "REINER SCT cyberJack wave USB 1" << "REINER SCT cyberJack wave"; + QTest::newRow("REINER SCT cyberJack wave-windows-10") << UsbId(0x0C4B, 0x0505) << "REINER SCT cyberJack wave" << "REINER SCT cyberJack wave"; + QTest::newRow("REINER SCT cyberJack wave-macosx-10.10") << UsbId(0x0C4B, 0x0505) << "REINER SCT cyberJack wave" << "REINER SCT cyberJack wave"; + QTest::newRow("REINER SCT cyberJack wave-macosx-10.11") << UsbId(0x0C4B, 0x0505) << "REINER SCT cyberJack wave" << "REINER SCT cyberJack wave"; + QTest::newRow("REINER SCT cyberJack wave-macosx-10.12") << UsbId(0x0C4B, 0x0505) << "REINER SCT cyberJack wave" << "REINER SCT cyberJack wave"; + + QTest::newRow("KOBIL IDToken-windows-8.1") << UsbId(0x0D46, 0x301D) << "KOBIL IDToken 0" << "KOBIL IDToken"; + QTest::newRow("KOBIL IDToken-windows-10") << UsbId(0x0D46, 0x301D) << "KOBIL IDToken 0" << "KOBIL IDToken"; + QTest::newRow("KOBIL IDToken-macosx-10.10") << UsbId(0x0D46, 0x301D) << "KOBIL Systems IDToken" << "KOBIL IDToken"; + QTest::newRow("KOBIL IDToken-macosx-10.11") << UsbId(0x0D46, 0x301D) << "KOBIL IDToken" << "KOBIL IDToken"; + QTest::newRow("KOBIL IDToken-macosx-10.12") << UsbId(0x0D46, 0x301D) << "KOBIL IDToken" << "KOBIL IDToken"; + + QTest::newRow("SCM SDI011-windows-10") << UsbId(0x04E6, 0x512B) << "SDI011 Contactless Reader" << "SDI011 Contactless Reader"; + QTest::newRow("SCM SDI011-macosx-10.10-1") << UsbId(0x04E6, 0x512B) << "SCM Microsystems Inc. SDI011 Contactless Reader(1)" << "SDI011 Contactless Reader"; + QTest::newRow("SCM SDI011-macosx-10.10-2") << UsbId(0x04E6, 0x512B) << "SCM Microsystems Inc. SDI011 Contactless Reader(2)" << "SDI011 Contactless Reader"; + QTest::newRow("SCM SDI011-macosx-10.11-1") << UsbId(0x04E6, 0x512B) << "SCM Microsystems Inc. SDI011 Contactless Reader(1)" << "SDI011 Contactless Reader"; + QTest::newRow("SCM SDI011-macosx-10.11-2") << UsbId(0x04E6, 0x512B) << "SCM Microsystems Inc. SDI011 Contactless Reader(2)" << "SDI011 Contactless Reader"; + QTest::newRow("SCM SDI011-macosx-10.12-1") << UsbId(0x04E6, 0x512B) << "SCM Microsystems Inc. SDI011 Contactless Reader(1)" << "SDI011 Contactless Reader"; + QTest::newRow("SCM SDI011-macosx-10.12-1") << UsbId(0x04E6, 0x512B) << "SCM Microsystems Inc. SDI011 Contactless Reader(2)" << "SDI011 Contactless Reader"; + + QTest::newRow("SCM SCL011-windows-10") << UsbId(0x04E6, 0x5292) << "SCL011 Contactless Reader" << "SCL01x Contactless Reader"; + QTest::newRow("SCM SCL011-macosx-10.11") << UsbId(0x04E6, 0x5292) << "SCM Microsystems Inc. SCL011 Contactless Reader" << "SCL01x Contactless Reader"; + + QTest::newRow("ACS-ACR122U-windows-8.1") << UsbId(0x072F, 0x2200) << "ACS ACR122U PICC Interface 0" << "ACS ACR122U"; + QTest::newRow("ACS-ACR122U-windows-10") << UsbId(0x072F, 0x2200) << "ACS ACR122U PICC Interface 0" << "ACS ACR122U"; + QTest::newRow("ACS-ACR122U-macosx-10.11") << UsbId(0x072F, 0x2200) << "ACS ACR122U" << "ACS ACR122U"; + QTest::newRow("ACS-ACR122U-macosx-10.12") << UsbId(0x072F, 0x2200) << "ACS ACR122U PICC Interface" << "ACS ACR122U"; + + QTest::newRow("ACS-ACR1281U-windows-8.1") << UsbId(0x072F, 0x0901) << "ACS ACR1281 PICC Reader 0" << "ACS ACR1281U"; + QTest::newRow("ACS-ACR1281U-windows-10") << UsbId(0x072F, 0x0901) << "ACS ACR1281 PICC Reader 0" << "ACS ACR1281U"; + QTest::newRow("ACS-ACR1281U-macosx-10.10") << UsbId(0x072F, 0x0901) << "ACS ACR1281 PICC Reader" << "ACS ACR1281U"; + QTest::newRow("ACS-ACR1281U-macosx-10.11") << UsbId(0x072F, 0x0901) << "ACS ACR1281 PICC Reader" << "ACS ACR1281U"; + QTest::newRow("ACS-ACR1281U-macosx-10.12") << UsbId(0x072F, 0x0901) << "ACS ACR1281 PICC Reader" << "ACS ACR1281U"; + + QTest::newRow("ACS-ACR1252U-windows-8.1-1") << UsbId(0x072F, 0x223B) << "ACS ACR1252 Dual Reader PICC 0" << "ACS ACR1252U"; + QTest::newRow("ACS-ACR1252U-windows-8.1-2") << UsbId(0x072F, 0x223B) << "ACS ACR1252 Dual Reader SAM 0" << "ACS ACR1252U"; + QTest::newRow("ACS-ACR1252U-windows-10") << UsbId(0x072F, 0x223B) << "ACS ACR1252 Dual Reader" << "ACS ACR1252U"; + QTest::newRow("ACS-ACR1252U-macosx-10.11-1") << UsbId(0x072F, 0x223B) << "ACS ACR1252 1S CL Reader(1)" << "ACS ACR1252U"; + QTest::newRow("ACS-ACR1252U-macosx-10.11-2") << UsbId(0x072F, 0x223B) << "ACS ACR1252 1S CL Reader(2)" << "ACS ACR1252U"; + QTest::newRow("ACS-ACR1252U-macosx-10.12-1") << UsbId(0x072F, 0x223B) << "ACS ACR1252 1S CL Reader(1)" << "ACS ACR1252U"; + QTest::newRow("ACS-ACR1252U-macosx-10.12-2") << UsbId(0x072F, 0x223B) << "ACS ACR1252 1S CL Reader(2)" << "ACS ACR1252U"; + + QTest::newRow("OMNIKEY 5021-windows-10") << UsbId(0x076B, 0x5340) << "OMNIKEY CardMan 5x21-CL 0" << "OMNIKEY 5021-CL"; + QTest::newRow("OMNIKEY 5021-macosx-10.11") << UsbId(0x076B, 0x5340) << "OMNIKEY CardMan (076B:5340) 5021 CL" << "OMNIKEY 5021-CL"; + QTest::newRow("OMNIKEY 5021-macosx-10.12") << UsbId(0x076B, 0x5340) << "OMNIKEY CardMan (076B:5340) 5021 CL" << "OMNIKEY 5021-CL"; + + QTest::newRow("OMNIKEY 5321 v2-windows-7-32") << UsbId(0x076B, 0x5321) << "OMNIKEY CardMan 5x21 0" << "OMNIKEY CardMan 5x21 0"; + QTest::newRow("OMNIKEY 5321 v2-windows-7-32") << UsbId(0x076B, 0x5321) << "OMNIKEY CardMan 5x21-CL 0" << "OMNIKEY 5321 v2"; + QTest::newRow("OMNIKEY 5321 v2-windows-7-64") << UsbId(0x076B, 0x5321) << "OMNIKEY CardMan 5x21 0" << "OMNIKEY CardMan 5x21 0"; + QTest::newRow("OMNIKEY 5321 v2-windows-7-64") << UsbId(0x076B, 0x5321) << "OMNIKEY CardMan 5x21-CL 0" << "OMNIKEY 5321 v2"; + QTest::newRow("OMNIKEY 5321 v2-windows-8.1") << UsbId(0x076B, 0x5321) << "OMNIKEY CardMan 5x21 0" << "OMNIKEY CardMan 5x21 0"; + QTest::newRow("OMNIKEY 5321 v2-windows-8.1") << UsbId(0x076B, 0x5321) << "OMNIKEY CardMan 5x21-CL 0" << "OMNIKEY 5321 v2"; + QTest::newRow("OMNIKEY 5321 v2-windows-10") << UsbId(0x076B, 0x5321) << "OMNIKEY CardMan 5x21 0" << "OMNIKEY CardMan 5x21 0"; + QTest::newRow("OMNIKEY 5321 v2-windows-10") << UsbId(0x076B, 0x5321) << "OMNIKEY CardMan 5x21-CL 0" << "OMNIKEY 5321 v2"; + QTest::newRow("OMNIKEY 5321 v2-macosx-10.11") << UsbId(0x076B, 0x5321) << "OMNIKEY CardMan 5321" << "OMNIKEY CardMan 5321"; + QTest::newRow("OMNIKEY 5321 v2-macosx-10.11-1") << UsbId(0x076B, 0x5321) << "OMNIKEY CardMan (076B:5321) 5321(1)" << "OMNIKEY 5321 v2"; + QTest::newRow("OMNIKEY 5321 v2-macosx-10.11-2") << UsbId(0x076B, 0x5321) << "OMNIKEY CardMan (076B:5321) 5321(2)" << "OMNIKEY 5321 v2"; + + QTest::newRow("OMNIKEY 5421-windows-8.1") << UsbId(0x076B, 0x5421) << "OMNIKEY Smart Card Reader USB 0" << "OMNIKEY 5421"; + QTest::newRow("OMNIKEY 5421-windows-10") << UsbId(0x076B, 0x5421) << "OMNIKEY Smart Card Reader USB 0" << "OMNIKEY 5421"; + QTest::newRow("OMNIKEY 5421-macosx-10.11-1") << UsbId(0x076B, 0x5421) << "OMNIKEY CardMan (076B:5421) 5421(1)" << "OMNIKEY 5421"; + QTest::newRow("OMNIKEY 5421-macosx-10.11-2") << UsbId(0x076B, 0x5421) << "OMNIKEY CardMan (076B:5421) 5421(2)" << "OMNIKEY 5421"; + QTest::newRow("OMNIKEY 5421-macosx-10.12-1") << UsbId(0x076B, 0x5421) << "OMNIKEY CardMan (076B:5421) 5421(1)" << "OMNIKEY 5421"; + QTest::newRow("OMNIKEY 5421-macosx-10.12-2") << UsbId(0x076B, 0x5421) << "OMNIKEY CardMan (076B:5421) 5421(2)" << "OMNIKEY 5421"; + + QTest::newRow("FEIG OBID myAXXESS RFID-Reader-windows-8.1") << UsbId(0x0AB1, 0x0003) << "FEIG ELECTRONIC GmbH OBID myAXXESS basic Slot:CL 358334430" << "OBID RFID-Reader"; + QTest::newRow("FEIG OBID myAXXESS RFID-Reader-windows-10") << UsbId(0x0AB1, 0x0003) << "FEIG ELECTRONIC GmbH OBID myAXXESS basic" << "OBID RFID-Reader"; + + QTest::newRow("Gemalto-Prox-DU-windows-7-1") << UsbId(0x08E6, 0x5503) << "Gemalto Prox-DU Contact_10900383 0" << "Gemalto Prox-DU Contact_10900383 0"; + QTest::newRow("Gemalto-Prox-DU-windows-7-2") << UsbId(0x08E6, 0x5503) << "Gemalto Prox-DU Contactless_10900383 0" << "Prox-DU HID"; + QTest::newRow("Gemalto-Prox-DU-windows-8.1-1") << UsbId(0x08E6, 0x5503) << "Gemalto Prox-DU Contact_10900383 0" << "Gemalto Prox-DU Contact_10900383 0"; + QTest::newRow("Gemalto-Prox-DU-windows-8.1-2") << UsbId(0x08E6, 0x5503) << "Gemalto Prox-DU Contactless_10900383 0" << "Prox-DU HID"; + QTest::newRow("Gemalto-Prox-DU-windows-10-1") << UsbId(0x08E6, 0x5503) << "Gemalto Prox-DU" << "Prox-DU HID"; + QTest::newRow("Gemalto-Prox-DU-windows-10-2") << UsbId(0x08E6, 0x5503) << "Gemalto Prox Dual" << "Prox-DU HID"; + QTest::newRow("Gemalto-Prox-DU-windows-macosx-10.10-1") << UsbId(0x08E6, 0x5503) << "Gemalto Prox Dual USB PC LinkReader(1)" << "Prox-DU HID"; + QTest::newRow("Gemalto-Prox-DU-windows-macosx-10.10-2") << UsbId(0x08E6, 0x5503) << "Gemalto Prox Dual USB PC LinkReader(2)" << "Prox-DU HID"; + QTest::newRow("Gemalto-Prox-DU-windows-macosx-10.11-1") << UsbId(0x08E6, 0x5503) << "Gemalto Prox Dual USB PC Link Reader(1)" << "Prox-DU HID"; + QTest::newRow("Gemalto-Prox-DU-windows-macosx-10.11-2") << UsbId(0x08E6, 0x5503) << "Gemalto Prox Dual USB PC Link Reader(2)" << "Prox-DU HID"; + QTest::newRow("Gemalto-Prox-DU-windows-macosx-10.12-1") << UsbId(0x08E6, 0x5503) << "Gemalto Prox Dual USB PC Link Reader(1)" << "Prox-DU HID"; + QTest::newRow("Gemalto-Prox-DU-windows-macosx-10.12-2") << UsbId(0x08E6, 0x5503) << "Gemalto Prox Dual USB PC Link Reader(2)" << "Prox-DU HID"; + QTest::newRow("Gemalto-Prox-DU-windows-macosx-10.13-1") << UsbId(0x08E6, 0x5503) << "Gemalto Prox Dual USB PC Link Reader(1)" << "Prox-DU HID"; + QTest::newRow("Gemalto-Prox-DU-windows-macosx-10.13-2") << UsbId(0x08E6, 0x5503) << "Gemalto Prox Dual USB PC Link Reader(2)" << "Prox-DU HID"; + + QTest::newRow("Gemalto-Prox-SU-windows-7-1") << UsbId(0x08E6, 0x5504) << "Gemalto Prox-SU Contact_10800004 0" << "Gemalto Prox-SU Contact_10800004 0"; + QTest::newRow("Gemalto-Prox-SU-windows-7-2") << UsbId(0x08E6, 0x5504) << "Gemalto Prox-SU Contactless_10800004 0" << "Gemalto Prox-SU Contactless"; + QTest::newRow("Gemalto-Prox-SU-windows-8.1") << UsbId(0x08E6, 0x5504) << "Gemalto Prox-SU Contactless_10800004 0" << "Gemalto Prox-SU Contactless"; + QTest::newRow("Gemalto-Prox-SU-windows-10-1") << UsbId(0x08E6, 0x5504) << "Gemalto Prox SU" << "Gemalto Prox-SU Contactless"; + QTest::newRow("Gemalto-Prox-SU-windows-10-2") << UsbId(0x08E6, 0x5504) << "Gemalto Prox-SU" << "Gemalto Prox-SU Contactless"; + QTest::newRow("Gemalto-Prox-SU-windows-macosx-10.13-1") << UsbId(0x08E6, 0x5504) << "Gemalto Prox SU USB PC LinkReader(1)" << "Gemalto Prox-SU Contactless"; + QTest::newRow("Gemalto-Prox-SU-windows-macosx-10.13-2") << UsbId(0x08E6, 0x5504) << "Gemalto Prox SU USB PC LinkReader(2)" << "Gemalto Prox-SU Contactless"; + + QTest::newRow("Identiv-SCL-3711-windows-8.1") << UsbId(0x04E6, 0x5591) << "SCM Microsystems SCL3711 reader & NFC device 0" << "Identiv SCL3711"; + QTest::newRow("Identiv-SCL-3711-windows-10") << UsbId(0x04E6, 0x5591) << "Identiv SCL3711" << "Identiv SCL3711"; + QTest::newRow("Identiv-SCL-3711-macosx-10.10") << UsbId(0x04E6, 0x5591) << "SCL3711 reader and NFC device" << "Identiv SCL3711"; + + QTest::newRow("Identiv-Cloud-3700-F-windows-8.1") << UsbId(0x04E6, 0x5790) << "Identiv CLOUD 3700 F Contactless Reader 0" << "Identiv Cloud 3700 F"; + QTest::newRow("Identiv-Cloud-3700-F-windows-10-1") << UsbId(0x04E6, 0x5790) << "CLOUD 3700 F Contactless Reader" << "Identiv Cloud 3700 F"; + QTest::newRow("Identiv-Cloud-3700-F-windows-10-2") << UsbId(0x04E6, 0x5790) << "CLOUD 3700 F Contact Reader" << "CLOUD 3700 F Contact Reader"; + QTest::newRow("Identiv-Cloud-3700-F-macosx-10.10") << UsbId(0x04E6, 0x5790) << "Identiv uTrust 3700 F CL Reader" << "Identiv Cloud 3700 F"; + QTest::newRow("Identiv-Cloud-3700-F-macosx-10.11") << UsbId(0x04E6, 0x5790) << "Identiv uTrust 3700 F CL Reader" << "Identiv Cloud 3700 F"; + QTest::newRow("Identiv-Cloud-3700-F-macosx-10.12") << UsbId(0x04E6, 0x5790) << "Identiv uTrust 3700 F CL Reader" << "Identiv Cloud 3700 F"; + + QTest::newRow("Identiv-Cloud-4700-F-windows-8.1-1") << UsbId(0x04E6, 0x5720) << "Identive CLOUD 4700 F Contactless Reader 0" << "Identiv Cloud 4700 F"; + QTest::newRow("Identiv-Cloud-4700-F-windows-8.1-2") << UsbId(0x04E6, 0x5720) << "Identive CLOUD 4700 F Contact Reader 0" << "Identive CLOUD 4700 F Contact Reader 0"; + QTest::newRow("Identiv-Cloud-4700-F-windows-10-1") << UsbId(0x04E6, 0x5720) << "Identiv CLOUD 4700 F Contactless Reader 0" << "Identiv Cloud 4700 F"; + QTest::newRow("Identiv-Cloud-4700-F-windows-10-2") << UsbId(0x04E6, 0x5720) << "Identiv CLOUD 4700 F Contact Reader 0" << "Identiv CLOUD 4700 F Contact Reader 0"; + QTest::newRow("Identiv-Cloud-4700-F-macosx-10.10-1") << UsbId(0x04E6, 0x5720) << "Identiv uTrust 4700 F Dual Interface Reader(1)" << "Identiv Cloud 4700 F"; + QTest::newRow("Identiv-Cloud-4700-F-macosx-10.10-2") << UsbId(0x04E6, 0x5720) << "Identiv uTrust 4700 F Dual Interface Reader(2)" << "Identiv Cloud 4700 F"; + QTest::newRow("Identiv-Cloud-4700-F-macosx-10.11-1") << UsbId(0x04E6, 0x5720) << "Identiv uTrust 4700 F Dual Interface Reader(1)" << "Identiv Cloud 4700 F"; + QTest::newRow("Identiv-Cloud-4700-F-macosx-10.11-2") << UsbId(0x04E6, 0x5720) << "Identiv uTrust 4700 F Dual Interface Reader(2)" << "Identiv Cloud 4700 F"; + QTest::newRow("Identiv-Cloud-4700-F-macosx-10.12-1") << UsbId(0x04E6, 0x5720) << "Identiv uTrust 4700 F Dual Interface Reader(1)" << "Identiv Cloud 4700 F"; + QTest::newRow("Identiv-Cloud-4700-F-macosx-10.12-2") << UsbId(0x04E6, 0x5720) << "Identiv uTrust 4700 F Dual Interface Reader(2)" << "Identiv Cloud 4700 F"; + + QTest::newRow("Identiv-Cloud-4701-F-windows-8.1-1") << UsbId(0x04E6, 0x5724) << "Identiv CLOUD 4701 F Contactless Reader 0" << "Identiv Cloud 4701 F"; + QTest::newRow("Identiv-Cloud-4701-F-windows-8.1-2") << UsbId(0x04E6, 0x5724) << "Identiv CLOUD 4701 F Contact Reader 0" << "Identiv CLOUD 4701 F Contact Reader 0"; + QTest::newRow("Identiv-Cloud-4701-F-windows-10-1") << UsbId(0x04E6, 0x5724) << "Identiv CLOUD 4701 F Contactless Reader 0" << "Identiv Cloud 4701 F"; + QTest::newRow("Identiv-Cloud-4701-F-windows-10-2") << UsbId(0x04E6, 0x5724) << "Identiv CLOUD 4701 F Contact Reader 0" << "Identiv CLOUD 4701 F Contact Reader 0"; + QTest::newRow("Identiv-Cloud-4701-F-macosx-10.10-1") << UsbId(0x04E6, 0x5724) << "Identiv uTrust 4701 F Dual Interface Reader(1)" << "Identiv Cloud 4701 F"; + QTest::newRow("Identiv-Cloud-4701-F-macosx-10.10-2") << UsbId(0x04E6, 0x5724) << "Identiv uTrust 4701 F Dual Interface Reader(2)" << "Identiv Cloud 4701 F"; + QTest::newRow("Identiv-Cloud-4701-F-macosx-10.11-1") << UsbId(0x04E6, 0x5724) << "Identiv uTrust 4701 F Dual Interface Reader(1)" << "Identiv Cloud 4701 F"; + QTest::newRow("Identiv-Cloud-4701-F-macosx-10.11-2") << UsbId(0x04E6, 0x5724) << "Identiv uTrust 4701 F Dual Interface Reader(2)" << "Identiv Cloud 4701 F"; + QTest::newRow("Identiv-Cloud-4701-F-macosx-10.12-1") << UsbId(0x04E6, 0x5724) << "Identiv uTrust 4701 F Dual Interface Reader(1)" << "Identiv Cloud 4701 F"; + QTest::newRow("Identiv-Cloud-4701-F-macosx-10.12-2") << UsbId(0x04E6, 0x5724) << "Identiv uTrust 4701 F Dual Interface Reader(2)" << "Identiv Cloud 4701 F"; + + QTest::newRow("Cherry-TC-1200-windows-7-64") << UsbId(0x046A, 0x0091) << "Cherry Smartcard Terminal TC 12xx-CL 0" << "Cherry TC-1200"; + QTest::newRow("Cherry-TC-1200-windows-8.1-1") << UsbId(0x046A, 0x0091) << "Cherry Smartcard Terminal TC 12xx-CL 0" << "Cherry TC-1200"; + QTest::newRow("Cherry-TC-1200-windows-10-1") << UsbId(0x046A, 0x0091) << "Cherry Smartcard Terminal TC 12xx 0" << "Cherry Smartcard Terminal TC 12xx 0"; + QTest::newRow("Cherry-TC-1200-windows-10-2") << UsbId(0x046A, 0x0091) << "Cherry Smartcard Terminal TC 12xx-CL 0" << "Cherry TC-1200"; + QTest::newRow("Cherry-TC-1200-macosx-10.11") << UsbId(0x046A, 0x0091) << "Cherry SC Reader (046A:0091)" << "Cherry TC-1200"; + QTest::newRow("Cherry-TC-1200-macosx-10.12") << UsbId(0x046A, 0x0091) << "Cherry SC Reader (046A:0091)" << "Cherry TC-1200"; + QTest::newRow("Cherry-TC-1200-macosx-10.13") << UsbId(0x046A, 0x0091) << "Cherry SC Reader (046A:0091)" << "Cherry TC-1200"; + QTest::newRow("Cherry-TC-1200-linux") << UsbId(0x046A, 0x0091) << "Cherry TC 1200" << "Cherry TC-1200"; + + QTest::newRow("Cherry-TC-1300-windows-7-64") << UsbId(0x046A, 0x0092) << "Cherry Smartcard Terminal TC 13xx 0" << "Cherry Smartcard Terminal TC 13xx 0"; + QTest::newRow("Cherry-TC-1300-windows-7-64") << UsbId(0x046A, 0x0092) << "Cherry Smartcard Terminal TC 13xx-CL 0" << "Cherry TC-1300"; + QTest::newRow("Cherry-TC-1300-windows-8.1-1") << UsbId(0x046A, 0x0092) << "Cherry Smartcard Terminal TC 13xx 0" << "Cherry Smartcard Terminal TC 13xx 0"; + QTest::newRow("Cherry-TC-1300-windows-8.1-2") << UsbId(0x046A, 0x0092) << "Cherry Smartcard Terminal TC 13xx-CL 0" << "Cherry TC-1300"; + QTest::newRow("Cherry-TC-1300-windows-10-1") << UsbId(0x046A, 0x0092) << "Cherry Smartcard Terminal TC 13xx 0" << "Cherry Smartcard Terminal TC 13xx 0"; + QTest::newRow("Cherry-TC-1300-windows-10-2") << UsbId(0x046A, 0x0092) << "Cherry Smartcard Terminal TC 13xx-CL 0" << "Cherry TC-1300"; + QTest::newRow("Cherry-TC-1300-macosx-10.11-1") << UsbId(0x046A, 0x0092) << "Cherry SC Reader (046A:0092)(1)" << "Cherry TC-1300"; + QTest::newRow("Cherry-TC-1300-macosx-10.11-2") << UsbId(0x046A, 0x0092) << "Cherry SC Reader (046A:0092)(2)" << "Cherry TC-1300"; + QTest::newRow("Cherry-TC-1300-macosx-10.12-1") << UsbId(0x046A, 0x0092) << "Cherry SC Reader (046A:0092)(1)" << "Cherry TC-1300"; + QTest::newRow("Cherry-TC-1300-macosx-10.12-2") << UsbId(0x046A, 0x0092) << "Cherry SC Reader (046A:0092)(2)" << "Cherry TC-1300"; + QTest::newRow("Cherry-TC-1300-macosx-10.13-1") << UsbId(0x046A, 0x0092) << "Cherry SC Reader (046A:0092)(1)" << "Cherry TC-1300"; + QTest::newRow("Cherry-TC-1300-macosx-10.13-2") << UsbId(0x046A, 0x0092) << "Cherry SC Reader (046A:0092)(2)" << "Cherry TC-1300"; + QTest::newRow("Cherry-TC-1300-linux") << UsbId(0x046A, 0x0092) << "Cherry TC 1300" << "Cherry TC-1300"; } void checkReaderPattern() { + QFETCH(UsbId, usbId); QFETCH(QString, readerName); QFETCH(QString, readerViewName); - const ReaderConfigurationInfo readerSettingsInfo = ReaderConfiguration::getInstance().getReaderConfigurationInfo(readerName); + mUsbIds += usbId; + const ReaderConfigurationInfo readerSettingsInfo = Env::getSingleton()->getReaderConfigurationInfo(readerName); QCOMPARE(readerSettingsInfo.getName(), readerViewName); } @@ -286,7 +348,7 @@ class test_ReaderConfiguration }; -const int test_ReaderConfiguration::cCardReadersInConfigurationFile = 22; +const int test_ReaderConfiguration::cCardReadersInConfigurationFile = 23; QTEST_GUILESS_MAIN(test_ReaderConfiguration) #include "test_ReaderConfiguration.moc" diff --git a/test/qt/configuration/test_ReaderConfigurationEntryParser.cpp b/test/qt/configuration/test_ReaderConfigurationEntryParser.cpp index 475d8f568..f05623a14 100644 --- a/test/qt/configuration/test_ReaderConfigurationEntryParser.cpp +++ b/test/qt/configuration/test_ReaderConfigurationEntryParser.cpp @@ -1,7 +1,7 @@ /*! * \brief Unit tests for \ref ReaderConfigurationParser * - * \copyright Copyright (c) 2015-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2017-2018 Governikus GmbH & Co. KG, Germany */ #include "ReaderConfigurationParser.h" diff --git a/test/qt/configuration/test_ReaderConfigurationParser.cpp b/test/qt/configuration/test_ReaderConfigurationParser.cpp index 37ef74a5b..bec85e41b 100644 --- a/test/qt/configuration/test_ReaderConfigurationParser.cpp +++ b/test/qt/configuration/test_ReaderConfigurationParser.cpp @@ -1,7 +1,7 @@ /*! * \brief Unit tests for \ref ReaderDetector * - * \copyright Copyright (c) 2015-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2015-2018 Governikus GmbH & Co. KG, Germany */ #include "ReaderConfigurationParser.h" diff --git a/test/qt/core/context/test_AuthContext.cpp b/test/qt/core/context/test_AuthContext.cpp index 81b74ab68..72c2793e2 100644 --- a/test/qt/core/context/test_AuthContext.cpp +++ b/test/qt/core/context/test_AuthContext.cpp @@ -1,7 +1,7 @@ /*! * \brief Test for the chat administration in authentication context. * - * \copyright Copyright (c) 2016-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2016-2018 Governikus GmbH & Co. KG, Germany */ #include "TestAuthContext.h" diff --git a/test/qt/core/controller/test_ChangePinController.cpp b/test/qt/core/controller/test_ChangePinController.cpp index e93bf7985..dc7a66bec 100644 --- a/test/qt/core/controller/test_ChangePinController.cpp +++ b/test/qt/core/controller/test_ChangePinController.cpp @@ -1,7 +1,7 @@ /*! * \brief Test for the Change PIN functionality. * - * \copyright Copyright (c) 2014-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2014-2018 Governikus GmbH & Co. KG, Germany */ #include "controller/ChangePinController.h" diff --git a/test/qt/core/paos/invoke/test_DidAuthenticateResponseEAC1.cpp b/test/qt/core/paos/invoke/test_DidAuthenticateResponseEAC1.cpp index a5a187a2b..8b9a2d940 100644 --- a/test/qt/core/paos/invoke/test_DidAuthenticateResponseEAC1.cpp +++ b/test/qt/core/paos/invoke/test_DidAuthenticateResponseEAC1.cpp @@ -1,7 +1,7 @@ /*! * \brief Unit tests for \ref DidAuthenticateEAC1 * - * \copyright Copyright (c) 2015-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2015-2018 Governikus GmbH & Co. KG, Germany */ #include "paos/invoke/DidAuthenticateResponseEac1.h" diff --git a/test/qt/core/paos/invoke/test_DidAuthenticateResponseEAC2.cpp b/test/qt/core/paos/invoke/test_DidAuthenticateResponseEAC2.cpp index 031ea83ff..31f7f53a5 100644 --- a/test/qt/core/paos/invoke/test_DidAuthenticateResponseEAC2.cpp +++ b/test/qt/core/paos/invoke/test_DidAuthenticateResponseEAC2.cpp @@ -1,7 +1,7 @@ /*! * \brief Unit tests for \ref DidAuthenticateEAC2 * - * \copyright Copyright (c) 2014-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2014-2018 Governikus GmbH & Co. KG, Germany */ #include "paos/invoke/DidAuthenticateResponseEac2.h" diff --git a/test/qt/core/paos/invoke/test_DisconnectResponse.cpp b/test/qt/core/paos/invoke/test_DisconnectResponse.cpp index 4e2efffc4..edb681635 100644 --- a/test/qt/core/paos/invoke/test_DisconnectResponse.cpp +++ b/test/qt/core/paos/invoke/test_DisconnectResponse.cpp @@ -1,7 +1,7 @@ /*! * \brief Unit tests for \ref DisconnectResponse * - * \copyright Copyright (c) 2015-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2015-2018 Governikus GmbH & Co. KG, Germany */ #include "CardReturnCode.h" diff --git a/test/qt/core/paos/invoke/test_PaosCreator.cpp b/test/qt/core/paos/invoke/test_PaosCreator.cpp index a5bea987f..a432c2332 100644 --- a/test/qt/core/paos/invoke/test_PaosCreator.cpp +++ b/test/qt/core/paos/invoke/test_PaosCreator.cpp @@ -1,7 +1,7 @@ /*! * \brief Unit tests for \ref PaosCreator * - * \copyright Copyright (c) 2015-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2015-2018 Governikus GmbH & Co. KG, Germany */ #include "paos/invoke/PaosCreator.h" diff --git a/test/qt/core/paos/invoke/test_StartPaos.cpp b/test/qt/core/paos/invoke/test_StartPaos.cpp index 3bc385f88..765e2c7a0 100644 --- a/test/qt/core/paos/invoke/test_StartPaos.cpp +++ b/test/qt/core/paos/invoke/test_StartPaos.cpp @@ -1,7 +1,7 @@ /*! * \brief Unit tests for \ref StartPaos * - * \copyright Copyright (c) 2015-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2015-2018 Governikus GmbH & Co. KG, Germany */ #include "paos/invoke/StartPaos.h" diff --git a/test/qt/core/paos/invoke/test_TransmitResponse.cpp b/test/qt/core/paos/invoke/test_TransmitResponse.cpp index 2ce2a61c6..a8581b60c 100644 --- a/test/qt/core/paos/invoke/test_TransmitResponse.cpp +++ b/test/qt/core/paos/invoke/test_TransmitResponse.cpp @@ -1,7 +1,7 @@ /*! * \brief Unit tests for \ref TransmitResponse * - * \copyright Copyright (c) 2015-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2015-2018 Governikus GmbH & Co. KG, Germany */ #include "paos/invoke/TransmitResponse.h" diff --git a/test/qt/core/paos/retrieve/test_DidAuthenticateEac1.cpp b/test/qt/core/paos/retrieve/test_DidAuthenticateEac1.cpp index 76b6d1061..ddcbd89d8 100644 --- a/test/qt/core/paos/retrieve/test_DidAuthenticateEac1.cpp +++ b/test/qt/core/paos/retrieve/test_DidAuthenticateEac1.cpp @@ -1,7 +1,7 @@ /*! * \brief Unit tests for \DidAuthenticateEac1 * - * \copyright Copyright (c) 2014-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2014-2018 Governikus GmbH & Co. KG, Germany */ #include "paos/retrieve/DidAuthenticateEac1.h" diff --git a/test/qt/core/paos/retrieve/test_DidAuthenticateEac2.cpp b/test/qt/core/paos/retrieve/test_DidAuthenticateEac2.cpp index 94541cd15..60252e682 100644 --- a/test/qt/core/paos/retrieve/test_DidAuthenticateEac2.cpp +++ b/test/qt/core/paos/retrieve/test_DidAuthenticateEac2.cpp @@ -1,7 +1,7 @@ /*! * \brief Unit tests for \DidAuthenticateEac1 * - * \copyright Copyright (c) 2014-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2014-2018 Governikus GmbH & Co. KG, Germany */ #include "paos/retrieve/DidAuthenticateEac2.h" diff --git a/test/qt/core/paos/retrieve/test_DidAuthenticateEacAdditional.cpp b/test/qt/core/paos/retrieve/test_DidAuthenticateEacAdditional.cpp index 107200c8f..5018026c3 100644 --- a/test/qt/core/paos/retrieve/test_DidAuthenticateEacAdditional.cpp +++ b/test/qt/core/paos/retrieve/test_DidAuthenticateEacAdditional.cpp @@ -1,7 +1,7 @@ /*! * \brief Unit tests for \DidAuthenticateEACAdditionalInputType * - * \copyright Copyright (c) 2014-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2014-2018 Governikus GmbH & Co. KG, Germany */ #include "paos/retrieve/DidAuthenticateEacAdditional.h" diff --git a/test/qt/core/paos/retrieve/test_InitializeFramework.cpp b/test/qt/core/paos/retrieve/test_InitializeFramework.cpp index 0c8a6dee7..f7a7b3991 100644 --- a/test/qt/core/paos/retrieve/test_InitializeFramework.cpp +++ b/test/qt/core/paos/retrieve/test_InitializeFramework.cpp @@ -1,7 +1,7 @@ /*! * \brief Unit tests for \InitializeFramework * - * \copyright Copyright (c) 2014-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2014-2018 Governikus GmbH & Co. KG, Germany */ #include "paos/retrieve/InitializeFramework.h" diff --git a/test/qt/core/paos/retrieve/test_StartPAOSResponse.cpp b/test/qt/core/paos/retrieve/test_StartPAOSResponse.cpp index 843982573..806f07fb9 100644 --- a/test/qt/core/paos/retrieve/test_StartPAOSResponse.cpp +++ b/test/qt/core/paos/retrieve/test_StartPAOSResponse.cpp @@ -1,7 +1,7 @@ /*! * \brief Unit tests for \InitializeFramework * - * \copyright Copyright (c) 2014-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2014-2018 Governikus GmbH & Co. KG, Germany */ #include "paos/retrieve/StartPaosResponse.h" diff --git a/test/qt/core/paos/retrieve/test_transmit.cpp b/test/qt/core/paos/retrieve/test_transmit.cpp index 9fcd6473f..ca6896965 100644 --- a/test/qt/core/paos/retrieve/test_transmit.cpp +++ b/test/qt/core/paos/retrieve/test_transmit.cpp @@ -1,7 +1,7 @@ /*! * \brief Unit tests for \transmit * - * \copyright Copyright (c) 2014-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2014-2018 Governikus GmbH & Co. KG, Germany */ #include "paos/retrieve/Transmit.h" diff --git a/test/qt/core/paos/test_MessageIdHandler.cpp b/test/qt/core/paos/test_MessageIdHandler.cpp index 4ea767861..623ffe207 100644 --- a/test/qt/core/paos/test_MessageIdHandler.cpp +++ b/test/qt/core/paos/test_MessageIdHandler.cpp @@ -1,5 +1,5 @@ /*! - * \copyright Copyright (c) 2014-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2014-2018 Governikus GmbH & Co. KG, Germany */ #include diff --git a/test/qt/core/paos/test_PaosMessage.cpp b/test/qt/core/paos/test_PaosMessage.cpp index 82592b42b..9f51a7f3f 100644 --- a/test/qt/core/paos/test_PaosMessage.cpp +++ b/test/qt/core/paos/test_PaosMessage.cpp @@ -1,7 +1,7 @@ /*! * \brief Unit tests for \ref PaosMessage * - * \copyright Copyright (c) 2015-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2015-2018 Governikus GmbH & Co. KG, Germany */ #include "paos/PaosMessage.h" diff --git a/test/qt/core/paos/test_RequestType.cpp b/test/qt/core/paos/test_RequestType.cpp index dc615206d..5dfbf73a7 100644 --- a/test/qt/core/paos/test_RequestType.cpp +++ b/test/qt/core/paos/test_RequestType.cpp @@ -1,7 +1,7 @@ /*! * \brief Unit tests for \ref RequestType * - * \copyright Copyright (c) 2015-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2015-2018 Governikus GmbH & Co. KG, Germany */ #include diff --git a/test/qt/core/paos/test_UserAgent.cpp b/test/qt/core/paos/test_UserAgent.cpp index 962ad4042..66cf9712f 100644 --- a/test/qt/core/paos/test_UserAgent.cpp +++ b/test/qt/core/paos/test_UserAgent.cpp @@ -1,7 +1,7 @@ /*! * \brief Unit tests for \ref UserAgent * - * \copyright Copyright (c) 2016-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2016-2018 Governikus GmbH & Co. KG, Germany */ #include "paos/element/UserAgent.h" diff --git a/test/qt/core/paos/test_paoshandler.cpp b/test/qt/core/paos/test_paoshandler.cpp index 730d92b71..c154e9ddb 100644 --- a/test/qt/core/paos/test_paoshandler.cpp +++ b/test/qt/core/paos/test_paoshandler.cpp @@ -1,5 +1,5 @@ /*! - * \copyright Copyright (c) 2014-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2014-2018 Governikus GmbH & Co. KG, Germany */ #include diff --git a/test/qt/core/states/test_StateCertificateDescriptionCheck.cpp b/test/qt/core/states/test_StateCertificateDescriptionCheck.cpp index 8903d451c..94217b000 100644 --- a/test/qt/core/states/test_StateCertificateDescriptionCheck.cpp +++ b/test/qt/core/states/test_StateCertificateDescriptionCheck.cpp @@ -1,5 +1,5 @@ /*! - * \copyright Copyright (c) 2014-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2014-2018 Governikus GmbH & Co. KG, Germany */ #include "states/StateCertificateDescriptionCheck.h" diff --git a/test/qt/core/states/test_StateCheckRefreshAddress.cpp b/test/qt/core/states/test_StateCheckRefreshAddress.cpp index 3d76ace07..ac20b9294 100644 --- a/test/qt/core/states/test_StateCheckRefreshAddress.cpp +++ b/test/qt/core/states/test_StateCheckRefreshAddress.cpp @@ -1,5 +1,5 @@ /*! - * \copyright Copyright (c) 2014-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2014-2018 Governikus GmbH & Co. KG, Germany */ #include "states/StateCheckRefreshAddress.h" diff --git a/test/qt/core/states/test_StateExtractCvcsFromEac1InputType.cpp b/test/qt/core/states/test_StateExtractCvcsFromEac1InputType.cpp index 176194dad..94b5b8493 100644 --- a/test/qt/core/states/test_StateExtractCvcsFromEac1InputType.cpp +++ b/test/qt/core/states/test_StateExtractCvcsFromEac1InputType.cpp @@ -1,7 +1,7 @@ /*! * \brief Tests the StateExtractCvcsFromEac1InputType * - * \copyright Copyright (c) 2014-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2014-2018 Governikus GmbH & Co. KG, Germany */ #include "states/StateExtractCvcsFromEac1InputType.h" diff --git a/test/qt/core/states/test_StateGenericSendReceive.cpp b/test/qt/core/states/test_StateGenericSendReceive.cpp index 3a76d805f..965d44d05 100644 --- a/test/qt/core/states/test_StateGenericSendReceive.cpp +++ b/test/qt/core/states/test_StateGenericSendReceive.cpp @@ -1,5 +1,5 @@ /*! - * \copyright Copyright (c) 2014-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2014-2018 Governikus GmbH & Co. KG, Germany */ #include "controller/AuthController.h" diff --git a/test/qt/core/states/test_StateInitializeFramework.cpp b/test/qt/core/states/test_StateInitializeFramework.cpp index ebadeca5a..ab0d3ac54 100644 --- a/test/qt/core/states/test_StateInitializeFramework.cpp +++ b/test/qt/core/states/test_StateInitializeFramework.cpp @@ -1,5 +1,5 @@ /*! - * \copyright Copyright (c) 2014-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2014-2018 Governikus GmbH & Co. KG, Germany */ #include "controller/AuthController.h" diff --git a/test/qt/core/states/test_StatePreVerification.cpp b/test/qt/core/states/test_StatePreVerification.cpp index fc3b1e805..9ef358ea8 100644 --- a/test/qt/core/states/test_StatePreVerification.cpp +++ b/test/qt/core/states/test_StatePreVerification.cpp @@ -1,7 +1,7 @@ /*! * \brief Unit tests for \ref StatePreVerification * - * \copyright Copyright (c) 2014-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2014-2018 Governikus GmbH & Co. KG, Germany */ #include "states/StatePreVerification.h" diff --git a/test/qt/core/states/test_StateProcessCertificatesFromEac2.cpp b/test/qt/core/states/test_StateProcessCertificatesFromEac2.cpp index 6cb762960..35c4f86ed 100644 --- a/test/qt/core/states/test_StateProcessCertificatesFromEac2.cpp +++ b/test/qt/core/states/test_StateProcessCertificatesFromEac2.cpp @@ -1,7 +1,7 @@ /*! * \brief Unit tests for \ref StatePreVerification * - * \copyright Copyright (c) 2014-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2014-2018 Governikus GmbH & Co. KG, Germany */ #include "states/StateProcessCertificatesFromEac2.h" diff --git a/test/qt/core/states/test_StateRedirectBrowser.cpp b/test/qt/core/states/test_StateRedirectBrowser.cpp index c824be3f6..a967fcf32 100644 --- a/test/qt/core/states/test_StateRedirectBrowser.cpp +++ b/test/qt/core/states/test_StateRedirectBrowser.cpp @@ -1,5 +1,5 @@ /*! - * \copyright Copyright (c) 2014-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2014-2018 Governikus GmbH & Co. KG, Germany */ #include "states/StateRedirectBrowser.h" diff --git a/test/qt/core/states/test_StateStartPaosResponse.cpp b/test/qt/core/states/test_StateStartPaosResponse.cpp index c2925ca9b..8639a0866 100644 --- a/test/qt/core/states/test_StateStartPaosResponse.cpp +++ b/test/qt/core/states/test_StateStartPaosResponse.cpp @@ -1,5 +1,5 @@ /*! - * \copyright Copyright (c) 2014-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2014-2018 Governikus GmbH & Co. KG, Germany */ #include diff --git a/test/qt/core/states/test_TermsOfUsage.cpp b/test/qt/core/states/test_TermsOfUsage.cpp index a308881fc..8f697d9ad 100644 --- a/test/qt/core/states/test_TermsOfUsage.cpp +++ b/test/qt/core/states/test_TermsOfUsage.cpp @@ -1,7 +1,7 @@ /*! * \brief Tests the Terms of Usage of CertificateDescription * - * \copyright Copyright (c) 2014-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2014-2018 Governikus GmbH & Co. KG, Germany */ #include "asn1/CertificateDescription.h" diff --git a/test/qt/core/test_CertificateChecker.cpp b/test/qt/core/test_CertificateChecker.cpp index 98ce20d55..b292a5c87 100644 --- a/test/qt/core/test_CertificateChecker.cpp +++ b/test/qt/core/test_CertificateChecker.cpp @@ -1,7 +1,7 @@ /*! * \brief Unit tests for \ref CertificateChecker * - * \copyright Copyright (c) 2015-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2015-2018 Governikus GmbH & Co. KG, Germany */ #include "CertificateChecker.h" diff --git a/test/qt/core/test_SelfAuthenticationData.cpp b/test/qt/core/test_SelfAuthenticationData.cpp index 6e93026c2..21185219a 100644 --- a/test/qt/core/test_SelfAuthenticationData.cpp +++ b/test/qt/core/test_SelfAuthenticationData.cpp @@ -1,7 +1,7 @@ /*! * \brief Unit tests for \ref SelfAuthenticationData * - * \copyright Copyright (c) 2014-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2014-2018 Governikus GmbH & Co. KG, Germany */ #include "SelfAuthenticationData.h" diff --git a/test/qt/core/test_TcToken.cpp b/test/qt/core/test_TcToken.cpp index 1a90017db..c5e417f00 100644 --- a/test/qt/core/test_TcToken.cpp +++ b/test/qt/core/test_TcToken.cpp @@ -1,7 +1,7 @@ /*! * \brief Unit tests for \ref TcToken * - * \copyright Copyright (c) 2014-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2014-2018 Governikus GmbH & Co. KG, Germany */ #include "TcToken.h" diff --git a/test/qt/drivers/test_ReaderDetector.cpp b/test/qt/drivers/test_ReaderDetector.cpp index 01e44b3ce..1bac6acb7 100644 --- a/test/qt/drivers/test_ReaderDetector.cpp +++ b/test/qt/drivers/test_ReaderDetector.cpp @@ -1,7 +1,7 @@ /*! * \brief Unit tests for \ref ReaderDetector * - * \copyright Copyright (c) 2015-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2015-2018 Governikus GmbH & Co. KG, Germany */ #include "ReaderDetector.h" diff --git a/test/qt/export/test_PdfExporter.cpp b/test/qt/export/test_PdfExporter.cpp index 2f40ca358..dc96ef5ae 100644 --- a/test/qt/export/test_PdfExporter.cpp +++ b/test/qt/export/test_PdfExporter.cpp @@ -1,7 +1,7 @@ /*! * \brief Unit tests for \ref PdfExporter * - * \copyright Copyright (c) 2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2017-2018 Governikus GmbH & Co. KG, Germany */ #include "PdfExporter.h" @@ -83,7 +83,7 @@ class test_PdfExporter { data << QPair(QString("key"), QString("value")); } - QTest::newRow("filled") << 25000 << 100000 << data; + QTest::newRow("filled") << 25000 << 150000 << data; } diff --git a/test/qt/file_provider/test_Downloader.cpp b/test/qt/file_provider/test_Downloader.cpp index 708b7eb20..7e36f9ccc 100644 --- a/test/qt/file_provider/test_Downloader.cpp +++ b/test/qt/file_provider/test_Downloader.cpp @@ -1,7 +1,7 @@ /*! * \brief Unit tests for class \ref Downloader * - * \copyright Copyright (c) 2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2017-2018 Governikus GmbH & Co. KG, Germany */ #include "Downloader.h" diff --git a/test/qt/file_provider/test_FileProvider.cpp b/test/qt/file_provider/test_FileProvider.cpp index 49024d145..a717d5243 100644 --- a/test/qt/file_provider/test_FileProvider.cpp +++ b/test/qt/file_provider/test_FileProvider.cpp @@ -1,5 +1,5 @@ /*! - * \copyright Copyright (c) 2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2017-2018 Governikus GmbH & Co. KG, Germany */ #include "FileProvider.h" diff --git a/test/qt/file_provider/test_UpdatableFile.cpp b/test/qt/file_provider/test_UpdatableFile.cpp index 5b3fb1ef3..5e0c401dc 100644 --- a/test/qt/file_provider/test_UpdatableFile.cpp +++ b/test/qt/file_provider/test_UpdatableFile.cpp @@ -1,5 +1,5 @@ /*! - * \copyright Copyright (c) 2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2017-2018 Governikus GmbH & Co. KG, Germany */ #include "UpdatableFile.h" diff --git a/test/qt/global/test_BuildHelper.cpp b/test/qt/global/test_BuildHelper.cpp index 7eb12e468..a7f1e430f 100644 --- a/test/qt/global/test_BuildHelper.cpp +++ b/test/qt/global/test_BuildHelper.cpp @@ -1,7 +1,7 @@ /*! * \brief Unit tests for \ref BuildHelper * - * \copyright Copyright (c) 2014-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2014-2018 Governikus GmbH & Co. KG, Germany */ #include "BuildHelper.h" diff --git a/test/qt/global/test_CardReturnCode.cpp b/test/qt/global/test_CardReturnCode.cpp index 088b99ce3..d13a946d8 100644 --- a/test/qt/global/test_CardReturnCode.cpp +++ b/test/qt/global/test_CardReturnCode.cpp @@ -1,7 +1,7 @@ /*! * \brief Unit tests for return codes. * - * \copyright Copyright (c) 2014-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2014-2018 Governikus GmbH & Co. KG, Germany */ #include "CardReturnCode.h" diff --git a/test/qt/global/test_DeviceInfo.cpp b/test/qt/global/test_DeviceInfo.cpp index 2f48d0061..7af58d51a 100644 --- a/test/qt/global/test_DeviceInfo.cpp +++ b/test/qt/global/test_DeviceInfo.cpp @@ -1,7 +1,7 @@ /*! * \brief Unit tests for \ref DeviceInfo * - * \copyright Copyright (c) 2015-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2015-2018 Governikus GmbH & Co. KG, Germany */ #include diff --git a/test/qt/global/test_EnumHelper.cpp b/test/qt/global/test_EnumHelper.cpp index f9fe53ae8..eb8307faf 100644 --- a/test/qt/global/test_EnumHelper.cpp +++ b/test/qt/global/test_EnumHelper.cpp @@ -1,7 +1,7 @@ /*! * \brief Unit tests for EnumHelper. * - * \copyright Copyright (c) 2014-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2014-2018 Governikus GmbH & Co. KG, Germany */ #include "EnumHelper.h" diff --git a/test/qt/global/test_Env.cpp b/test/qt/global/test_Env.cpp index c9f73f20e..adeb89cee 100644 --- a/test/qt/global/test_Env.cpp +++ b/test/qt/global/test_Env.cpp @@ -1,7 +1,7 @@ /*! * \brief Unit tests for \ref Env * - * \copyright Copyright (c) 2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2017-2018 Governikus GmbH & Co. KG, Germany */ #include "Env.h" diff --git a/test/qt/global/test_FileDestination.cpp b/test/qt/global/test_FileDestination.cpp index 09ad03479..e694893e3 100644 --- a/test/qt/global/test_FileDestination.cpp +++ b/test/qt/global/test_FileDestination.cpp @@ -1,7 +1,7 @@ /*! * \brief Unit tests for \ref FileDestination * - * \copyright Copyright (c) 2014-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2014-2018 Governikus GmbH & Co. KG, Germany */ #include "FileDestination.h" diff --git a/test/qt/global/test_FuncUtils.cpp b/test/qt/global/test_FuncUtils.cpp index b98a10f36..e68e29230 100644 --- a/test/qt/global/test_FuncUtils.cpp +++ b/test/qt/global/test_FuncUtils.cpp @@ -1,7 +1,7 @@ /*! * \brief Unit tests for \ref FuncUtils * - * \copyright Copyright (c) 2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2017-2018 Governikus GmbH & Co. KG, Germany */ #include "FuncUtils.h" diff --git a/test/qt/global/test_Initializer.cpp b/test/qt/global/test_Initializer.cpp index b0b6eb84d..2160d36a0 100644 --- a/test/qt/global/test_Initializer.cpp +++ b/test/qt/global/test_Initializer.cpp @@ -1,7 +1,7 @@ /*! * \brief Unit tests for \ref Initializer * - * \copyright Copyright (c) 2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2017-2018 Governikus GmbH & Co. KG, Germany */ #include "Initializer.h" diff --git a/test/qt/global/test_LanguageLoader.cpp b/test/qt/global/test_LanguageLoader.cpp index c771d3daf..96f11a748 100644 --- a/test/qt/global/test_LanguageLoader.cpp +++ b/test/qt/global/test_LanguageLoader.cpp @@ -1,7 +1,7 @@ /*! * \brief Unit tests for \ref LanguageLoader * - * \copyright Copyright (c) 2014-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2014-2018 Governikus GmbH & Co. KG, Germany */ #include "LanguageLoader.h" diff --git a/test/qt/global/test_LogHandler.cpp b/test/qt/global/test_LogHandler.cpp index 59bc7e7da..98108dfea 100644 --- a/test/qt/global/test_LogHandler.cpp +++ b/test/qt/global/test_LogHandler.cpp @@ -1,7 +1,7 @@ /*! * \brief Unit tests for \ref LogHandler * - * \copyright Copyright (c) 2014-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2014-2018 Governikus GmbH & Co. KG, Germany */ #include "LogHandler.h" diff --git a/test/qt/global/test_Randomizer.cpp b/test/qt/global/test_Randomizer.cpp index 5572983d3..c04f387de 100644 --- a/test/qt/global/test_Randomizer.cpp +++ b/test/qt/global/test_Randomizer.cpp @@ -1,7 +1,7 @@ /*! * \brief Unit tests for \ref Randomizer * - * \copyright Copyright (c) 2016-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2016-2018 Governikus GmbH & Co. KG, Germany */ #include "Randomizer.h" diff --git a/test/qt/global/test_ResourceLoader.cpp b/test/qt/global/test_ResourceLoader.cpp index b60b327c6..d81e563da 100644 --- a/test/qt/global/test_ResourceLoader.cpp +++ b/test/qt/global/test_ResourceLoader.cpp @@ -1,7 +1,7 @@ /*! * \brief Unit tests for \ref ResourceLoader * - * \copyright Copyright (c) 2016-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2016-2018 Governikus GmbH & Co. KG, Germany */ #include "ResourceLoader.h" diff --git a/test/qt/global/test_ScopeGuard.cpp b/test/qt/global/test_ScopeGuard.cpp index 15aca6322..e03d7dccf 100644 --- a/test/qt/global/test_ScopeGuard.cpp +++ b/test/qt/global/test_ScopeGuard.cpp @@ -1,7 +1,7 @@ /*! * \brief Unit tests for \ref ScopeGuard * - * \copyright Copyright (c) 2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2017-2018 Governikus GmbH & Co. KG, Germany */ #include "ScopeGuard.h" diff --git a/test/qt/global/test_VersionInfo.cpp b/test/qt/global/test_VersionInfo.cpp index fd652f2cd..59f9884f1 100644 --- a/test/qt/global/test_VersionInfo.cpp +++ b/test/qt/global/test_VersionInfo.cpp @@ -1,5 +1,5 @@ /*! - * \copyright Copyright (c) 2016-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2016-2018 Governikus GmbH & Co. KG, Germany */ #include diff --git a/test/qt/global/test_VersionNumber.cpp b/test/qt/global/test_VersionNumber.cpp index c3d2dae67..bb8d793b2 100644 --- a/test/qt/global/test_VersionNumber.cpp +++ b/test/qt/global/test_VersionNumber.cpp @@ -1,7 +1,7 @@ /*! * \brief Unit tests for \ref VersionNumber. * - * \copyright Copyright (c) 2016-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2016-2018 Governikus GmbH & Co. KG, Germany */ #include "VersionNumber.h" diff --git a/test/qt/global/test_result.cpp b/test/qt/global/test_result.cpp index a9ae42680..4f3a58ebd 100644 --- a/test/qt/global/test_result.cpp +++ b/test/qt/global/test_result.cpp @@ -1,7 +1,7 @@ /*! * \brief Unit tests for \ref result * - * \copyright Copyright (c) 2014-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2014-2018 Governikus GmbH & Co. KG, Germany */ #include "CardReturnCode.h" diff --git a/test/qt/jsonapi/test_Message.cpp b/test/qt/jsonapi/test_Message.cpp index 4b0ec3e7a..1f59635d9 100644 --- a/test/qt/jsonapi/test_Message.cpp +++ b/test/qt/jsonapi/test_Message.cpp @@ -1,7 +1,7 @@ /*! * \brief Unit tests for \ref MessageDispatcher * - * \copyright Copyright (c) 2016-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2016-2018 Governikus GmbH & Co. KG, Germany */ #include "MessageDispatcher.h" diff --git a/test/qt/jsonapi/test_MsgContext.cpp b/test/qt/jsonapi/test_MsgContext.cpp index 9b1909825..2a8ccbc8f 100644 --- a/test/qt/jsonapi/test_MsgContext.cpp +++ b/test/qt/jsonapi/test_MsgContext.cpp @@ -1,7 +1,7 @@ /*! * \brief Unit tests for \ref MsgContext * - * \copyright Copyright (c) 2016-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2016-2018 Governikus GmbH & Co. KG, Germany */ #include "messages/MsgContext.h" diff --git a/test/qt/jsonapi/test_MsgHandler.cpp b/test/qt/jsonapi/test_MsgHandler.cpp index 8c0f3baae..1e579949c 100644 --- a/test/qt/jsonapi/test_MsgHandler.cpp +++ b/test/qt/jsonapi/test_MsgHandler.cpp @@ -1,7 +1,7 @@ /*! * \brief Unit tests for \ref MsgHandler * - * \copyright Copyright (c) 2016-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2016-2018 Governikus GmbH & Co. KG, Germany */ #include "messages/MsgHandler.h" diff --git a/test/qt/jsonapi/test_MsgHandlerAccessRights.cpp b/test/qt/jsonapi/test_MsgHandlerAccessRights.cpp index b13085521..432892de5 100644 --- a/test/qt/jsonapi/test_MsgHandlerAccessRights.cpp +++ b/test/qt/jsonapi/test_MsgHandlerAccessRights.cpp @@ -1,7 +1,7 @@ /*! * \brief Unit tests for \ref MsgHandlerAccessRights * - * \copyright Copyright (c) 2016-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2016-2018 Governikus GmbH & Co. KG, Germany */ #include "messages/MsgHandlerAccessRights.h" diff --git a/test/qt/jsonapi/test_MsgHandlerApiLevel.cpp b/test/qt/jsonapi/test_MsgHandlerApiLevel.cpp index e40a18809..56ec22612 100644 --- a/test/qt/jsonapi/test_MsgHandlerApiLevel.cpp +++ b/test/qt/jsonapi/test_MsgHandlerApiLevel.cpp @@ -1,7 +1,7 @@ /*! * \brief Unit tests for \ref MsgHandlerApiLevel * - * \copyright Copyright (c) 2016-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2016-2018 Governikus GmbH & Co. KG, Germany */ #include "messages/MsgHandlerApiLevel.h" diff --git a/test/qt/jsonapi/test_MsgHandlerAuth.cpp b/test/qt/jsonapi/test_MsgHandlerAuth.cpp index 55d165ed4..2a01a9854 100644 --- a/test/qt/jsonapi/test_MsgHandlerAuth.cpp +++ b/test/qt/jsonapi/test_MsgHandlerAuth.cpp @@ -1,7 +1,7 @@ /*! * \brief Unit tests for \ref MsgHandlerAuth * - * \copyright Copyright (c) 2016-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2016-2018 Governikus GmbH & Co. KG, Germany */ #include "messages/MsgHandlerAuth.h" diff --git a/test/qt/jsonapi/test_MsgHandlerCertificate.cpp b/test/qt/jsonapi/test_MsgHandlerCertificate.cpp index 7d12dd185..8c55fce9b 100644 --- a/test/qt/jsonapi/test_MsgHandlerCertificate.cpp +++ b/test/qt/jsonapi/test_MsgHandlerCertificate.cpp @@ -1,7 +1,7 @@ /*! * \brief Unit tests for \ref MsgHandlerCertificate * - * \copyright Copyright (c) 2016-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2016-2018 Governikus GmbH & Co. KG, Germany */ #include "messages/MsgHandlerCertificate.h" diff --git a/test/qt/jsonapi/test_MsgHandlerEnterCan.cpp b/test/qt/jsonapi/test_MsgHandlerEnterCan.cpp index cd874296a..0223f0a75 100644 --- a/test/qt/jsonapi/test_MsgHandlerEnterCan.cpp +++ b/test/qt/jsonapi/test_MsgHandlerEnterCan.cpp @@ -1,7 +1,7 @@ /*! * \brief Unit tests for \ref MsgHandlerEnterCan * - * \copyright Copyright (c) 2016-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2016-2018 Governikus GmbH & Co. KG, Germany */ #include "messages/MsgHandlerEnterCan.h" diff --git a/test/qt/jsonapi/test_MsgHandlerEnterPin.cpp b/test/qt/jsonapi/test_MsgHandlerEnterPin.cpp index c8e10ef91..dcf56b9de 100644 --- a/test/qt/jsonapi/test_MsgHandlerEnterPin.cpp +++ b/test/qt/jsonapi/test_MsgHandlerEnterPin.cpp @@ -1,7 +1,7 @@ /*! * \brief Unit tests for \ref MsgHandlerEnterPin * - * \copyright Copyright (c) 2016-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2016-2018 Governikus GmbH & Co. KG, Germany */ #include "messages/MsgHandlerEnterPin.h" diff --git a/test/qt/jsonapi/test_MsgHandlerEnterPuk.cpp b/test/qt/jsonapi/test_MsgHandlerEnterPuk.cpp index 22cb98e89..2e518c8bc 100644 --- a/test/qt/jsonapi/test_MsgHandlerEnterPuk.cpp +++ b/test/qt/jsonapi/test_MsgHandlerEnterPuk.cpp @@ -1,7 +1,7 @@ /*! * \brief Unit tests for \ref MsgHandlerEnterPuk * - * \copyright Copyright (c) 2016-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2016-2018 Governikus GmbH & Co. KG, Germany */ #include "messages/MsgHandlerEnterPuk.h" diff --git a/test/qt/jsonapi/test_MsgHandlerInsertCard.cpp b/test/qt/jsonapi/test_MsgHandlerInsertCard.cpp index 0d31a68f5..6cfc34749 100644 --- a/test/qt/jsonapi/test_MsgHandlerInsertCard.cpp +++ b/test/qt/jsonapi/test_MsgHandlerInsertCard.cpp @@ -1,7 +1,7 @@ /*! * \brief Unit tests for \ref MsgHandlerInsertCard * - * \copyright Copyright (c) 2016-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2016-2018 Governikus GmbH & Co. KG, Germany */ #include "messages/MsgHandlerInsertCard.h" diff --git a/test/qt/jsonapi/test_MsgHandlerInternalError.cpp b/test/qt/jsonapi/test_MsgHandlerInternalError.cpp index 3a5cf2a46..7c87beae2 100644 --- a/test/qt/jsonapi/test_MsgHandlerInternalError.cpp +++ b/test/qt/jsonapi/test_MsgHandlerInternalError.cpp @@ -1,7 +1,7 @@ /*! * \brief Unit tests for \ref MsgHandlerInternalError * - * \copyright Copyright (c) 2016-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2016-2018 Governikus GmbH & Co. KG, Germany */ #include "messages/MsgHandlerInternalError.h" diff --git a/test/qt/jsonapi/test_MsgHandlerReader.cpp b/test/qt/jsonapi/test_MsgHandlerReader.cpp index 4926dca29..94d1bcd70 100644 --- a/test/qt/jsonapi/test_MsgHandlerReader.cpp +++ b/test/qt/jsonapi/test_MsgHandlerReader.cpp @@ -1,7 +1,7 @@ /*! * \brief Unit tests for \ref MsgHandlerReader * - * \copyright Copyright (c) 2016-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2016-2018 Governikus GmbH & Co. KG, Germany */ #include "messages/MsgHandlerReader.h" diff --git a/test/qt/jsonapi/test_MsgHandlerReaderList.cpp b/test/qt/jsonapi/test_MsgHandlerReaderList.cpp index f4d361a72..26dfedb66 100644 --- a/test/qt/jsonapi/test_MsgHandlerReaderList.cpp +++ b/test/qt/jsonapi/test_MsgHandlerReaderList.cpp @@ -1,7 +1,7 @@ /*! * \brief Unit tests for \ref MsgHandlerReaderList * - * \copyright Copyright (c) 2016-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2016-2018 Governikus GmbH & Co. KG, Germany */ #include "messages/MsgHandlerReader.h" diff --git a/test/qt/network/test_DatagramHandlerImpl.cpp b/test/qt/network/test_DatagramHandlerImpl.cpp index a2407dbce..54e40b96a 100644 --- a/test/qt/network/test_DatagramHandlerImpl.cpp +++ b/test/qt/network/test_DatagramHandlerImpl.cpp @@ -1,7 +1,7 @@ /*! * \brief Unit tests for \ref DatagramHandlerImpl * - * \copyright Copyright (c) 2016-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2016-2018 Governikus GmbH & Co. KG, Germany */ #include "DatagramHandlerImpl.h" diff --git a/test/qt/network/test_HttpRequest.cpp b/test/qt/network/test_HttpRequest.cpp index 1d4985731..7d5aef30b 100644 --- a/test/qt/network/test_HttpRequest.cpp +++ b/test/qt/network/test_HttpRequest.cpp @@ -1,7 +1,7 @@ /*! * \brief Unit tests for \ref HttpResponse * - * \copyright Copyright (c) 2016-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2016-2018 Governikus GmbH & Co. KG, Germany */ #include "HttpRequest.h" diff --git a/test/qt/network/test_HttpResponse.cpp b/test/qt/network/test_HttpResponse.cpp index eab472896..08cfdd263 100644 --- a/test/qt/network/test_HttpResponse.cpp +++ b/test/qt/network/test_HttpResponse.cpp @@ -1,7 +1,7 @@ /*! * \brief Unit tests for \ref HttpResponse * - * \copyright Copyright (c) 2016-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2016-2018 Governikus GmbH & Co. KG, Germany */ #include "HttpResponse.h" diff --git a/test/qt/network/test_HttpServer.cpp b/test/qt/network/test_HttpServer.cpp index e56c8db93..5ed8a17cf 100644 --- a/test/qt/network/test_HttpServer.cpp +++ b/test/qt/network/test_HttpServer.cpp @@ -1,7 +1,7 @@ /*! * \brief Unit tests for \ref HttpResponse * - * \copyright Copyright (c) 2016-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2016-2018 Governikus GmbH & Co. KG, Germany */ #include "HttpServer.h" diff --git a/test/qt/network/test_NetworkManager.cpp b/test/qt/network/test_NetworkManager.cpp index 34f164238..56c38cd26 100644 --- a/test/qt/network/test_NetworkManager.cpp +++ b/test/qt/network/test_NetworkManager.cpp @@ -1,7 +1,7 @@ /*! * \brief Unit tests for \ref NetworkManager * - * \copyright Copyright (c) 2014-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2014-2018 Governikus GmbH & Co. KG, Germany */ #include "context/SelfAuthContext.h" @@ -43,7 +43,7 @@ class test_NetworkManager void paosRequestAttached() { QNetworkRequest request(QUrl("https://dummy")); - auto reply = Env::getSingleton()->paos(request, "paosNamespace", "content", false, 1); + auto reply = Env::getSingleton()->paos(request, "paosNamespace", "content", false, QByteArray(), 1); QVERIFY(request.hasRawHeader("PAOS")); QCOMPARE(request.rawHeader("PAOS"), QByteArray("ver=\"paosNamespace\"")); QCOMPARE(reply->request(), request); @@ -61,7 +61,7 @@ class test_NetworkManager void paosRequestPsk() { QNetworkRequest request(QUrl("https://dummy")); - auto reply = Env::getSingleton()->paos(request, "paosNamespace", "content", true, 1); + auto reply = Env::getSingleton()->paos(request, "paosNamespace", "content", true, QByteArray(), 1); QVERIFY(request.hasRawHeader("PAOS")); QCOMPARE(request.rawHeader("PAOS"), QByteArray("ver=\"paosNamespace\"")); QCOMPARE(reply->request(), request); diff --git a/test/qt/network/test_TlsChecker.cpp b/test/qt/network/test_TlsChecker.cpp index 081bfafc9..df5153e3a 100644 --- a/test/qt/network/test_TlsChecker.cpp +++ b/test/qt/network/test_TlsChecker.cpp @@ -1,7 +1,7 @@ /*! * \brief Unit tests for \ref CertificateChecker * - * \copyright Copyright (c) 2015-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2015-2018 Governikus GmbH & Co. KG, Germany */ #include "TlsChecker.h" @@ -299,12 +299,13 @@ class test_TlsChecker QSslConfiguration cfg; TlsChecker::logSslConfig(cfg, qInfo(network)); - QCOMPARE(spy.count(), 5); + QCOMPARE(spy.count(), 6); QVERIFY(spy.at(0).at(0).toString().contains("Used session cipher QSslCipher(name=, bits=0, proto=)")); QVERIFY(spy.at(1).at(0).toString().contains("Used session protocol: \"UnknownProtocol\"")); QVERIFY(spy.at(2).at(0).toString().contains("Used ephemeral server key:")); QVERIFY(spy.at(3).at(0).toString().contains("Used peer certificate: QSslCertificate(\"\", \"\", \"1B2M2Y8AsgTpgAmY7PhCfg==\"")); - QVERIFY(spy.at(4).at(0).toString().contains("Handshake of tls connection done!")); + QVERIFY(spy.at(4).at(0).toString().contains("Used ssl session: \"\"")); + QVERIFY(spy.at(5).at(0).toString().contains("Handshake of tls connection done!")); } diff --git a/test/qt/network/test_UrlUtil.cpp b/test/qt/network/test_UrlUtil.cpp index abb61eea1..d2bae2d40 100644 --- a/test/qt/network/test_UrlUtil.cpp +++ b/test/qt/network/test_UrlUtil.cpp @@ -1,7 +1,7 @@ /*! * \brief Unit tests for \ref test_UrlUtil * - * \copyright Copyright (c) 2014-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2014-2018 Governikus GmbH & Co. KG, Germany */ #include "TestFileHelper.h" diff --git a/test/qt/network/test_WifiInfo.cpp b/test/qt/network/test_WifiInfo.cpp new file mode 100644 index 000000000..45e4bb7ab --- /dev/null +++ b/test/qt/network/test_WifiInfo.cpp @@ -0,0 +1,64 @@ +/*! + * \brief Unit tests for \ref WifiInfo + * + * \copyright Copyright (c) 2018 Governikus GmbH & Co. KG, Germany + */ + +#include "WifiInfo.h" + +#include + +Q_DECLARE_METATYPE(QHostAddress) + +using namespace governikus; + +class test_WifiInfo + : public QObject +{ + Q_OBJECT + + private Q_SLOTS: + void checkIpAddresses_data() + { + QTest::addColumn("ip"); + QTest::addColumn("isPrivate"); + + QTest::newRow("empty") << QHostAddress() << false; + QTest::newRow("localhost") << QHostAddress("127.0.0.1") << false; + QTest::newRow("linkLocal") << QHostAddress("169.254.0.1") << false; + + QTest::newRow("A lower") << QHostAddress("10.0.0.0") << true; + QTest::newRow("A upper") << QHostAddress("10.255.255.255") << true; + + QTest::newRow("B lower over") << QHostAddress("172.15.255.255") << false; + QTest::newRow("B lower") << QHostAddress("172.16.0.0") << true; + QTest::newRow("B upper") << QHostAddress("172.31.255.255") << true; + QTest::newRow("B upper over") << QHostAddress("172.32.0.0") << false; + + QTest::newRow("C lower") << QHostAddress("192.168.0.0") << true; + QTest::newRow("C upper") << QHostAddress("192.168.255.255") << true; + + QTest::newRow("fritzbox") << QHostAddress("192.168.178.0") << true; + QTest::newRow("fritzbox range") << QHostAddress("192.168.178.255") << true; + + QTest::newRow("google dns") << QHostAddress("8.8.8.8") << false; + QTest::newRow("governikus") << QHostAddress("194.31.70.66") << false; + QTest::newRow("telekom") << QHostAddress("91.39.48.2") << false; + QTest::newRow("vodafone mobile") << QHostAddress("100.90.174.1") << false; + QTest::newRow("service provider") << QHostAddress("100.64.0.0") << false; + } + + + void checkIpAddresses() + { + QFETCH(QHostAddress, ip); + QFETCH(bool, isPrivate); + + QCOMPARE(WifiInfo::isPrivateIp(ip), isPrivate); + } + + +}; + +QTEST_GUILESS_MAIN(test_WifiInfo) +#include "test_WifiInfo.moc" diff --git a/test/qt/qml/test_ProviderModel.cpp b/test/qt/qml/test_ProviderModel.cpp index 15323bf4e..344790a5b 100644 --- a/test/qt/qml/test_ProviderModel.cpp +++ b/test/qt/qml/test_ProviderModel.cpp @@ -1,7 +1,7 @@ /*! * \brief Unit tests for \ref ProviderModel * - * \copyright Copyright (c) 2016-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2016-2018 Governikus GmbH & Co. KG, Germany */ #include "ProviderModel.h" diff --git a/test/qt/remote_device/messages/test_IfdModifyPin.cpp b/test/qt/remote_device/messages/test_IfdModifyPin.cpp new file mode 100644 index 000000000..28e44f44b --- /dev/null +++ b/test/qt/remote_device/messages/test_IfdModifyPin.cpp @@ -0,0 +1,177 @@ +/*! + * \copyright Copyright (c) 2018 Governikus GmbH & Co. KG, Germany + */ + +#include "messages/IfdModifyPin.h" + +#include "LogHandler.h" + +#include + + +using namespace governikus; + + +class test_IfdModifyPin + : public QObject +{ + Q_OBJECT + + private Q_SLOTS: + void initTestCase() + { + LogHandler::getInstance().init(); + } + + + void invalidJson() + { + QSignalSpy logSpy(&LogHandler::getInstance(), &LogHandler::fireLog); + + QByteArray message("FooBar"); + const auto& obj = QJsonDocument::fromJson(message).object(); + QVERIFY(obj.isEmpty()); + + IfdModifyPin msg(obj); + + QCOMPARE(logSpy.count(), 4); + QVERIFY(logSpy.at(0).at(0).toString().contains("Missing value \"msg\"")); + QVERIFY(logSpy.at(1).at(0).toString().contains("Missing value \"ContextHandle\"")); + QVERIFY(logSpy.at(2).at(0).toString().contains("Missing value \"SlotHandle\"")); + QVERIFY(logSpy.at(3).at(0).toString().contains("Missing value \"InputData\"")); + } + + + void values() + { + const IfdModifyPin ifdModifyPin( + QStringLiteral("SlotHandle"), + QByteArray::fromHex("abcd1234") + ); + + QCOMPARE(ifdModifyPin.getType(), RemoteCardMessageType::IFDModifyPIN); + QCOMPARE(ifdModifyPin.getContextHandle(), QString()); + QCOMPARE(ifdModifyPin.getSlotHandle(), QStringLiteral("SlotHandle")); + QCOMPARE(ifdModifyPin.getInputData(), QByteArray::fromHex("abcd1234")); + } + + + void toJson() + { + const IfdModifyPin ifdModifyPin( + QStringLiteral("SlotHandle"), + QByteArray::fromHex("abcd1234") + ); + + const QJsonDocument& doc = ifdModifyPin.toJson(QStringLiteral("TestContext")); + QVERIFY(doc.isObject()); + QCOMPARE(doc.toJson(), + QByteArray("{\n" + " \"ContextHandle\": \"TestContext\",\n" + " \"InputData\": \"abcd1234\",\n" + " \"SlotHandle\": \"SlotHandle\",\n" + " \"msg\": \"IFDModifyPIN\"\n" + "}\n")); + + const QJsonObject obj = doc.object(); + QCOMPARE(obj.size(), 4); + QCOMPARE(obj.value(QLatin1String("msg")).toString(), QStringLiteral("IFDModifyPIN")); + QCOMPARE(obj.value(QLatin1String("ContextHandle")).toString(), QStringLiteral("TestContext")); + QCOMPARE(obj.value(QLatin1String("SlotHandle")).toString(), QStringLiteral("SlotHandle")); + QCOMPARE(obj.value(QLatin1String("InputData")).toString(), QStringLiteral("abcd1234")); + } + + + void fromJson() + { + QSignalSpy logSpy(&LogHandler::getInstance(), &LogHandler::fireLog); + + const QByteArray message("{\n" + " \"ContextHandle\": \"TestContext\",\n" + " \"InputData\": \"abcd1234\",\n" + " \"SlotHandle\": \"SlotHandle\",\n" + " \"msg\": \"IFDModifyPIN\"\n" + "}\n"); + + const QJsonObject& obj = QJsonDocument::fromJson(message).object(); + const IfdModifyPin ifdModifyPin(obj); + QCOMPARE(ifdModifyPin.getType(), RemoteCardMessageType::IFDModifyPIN); + QCOMPARE(ifdModifyPin.getContextHandle(), QStringLiteral("TestContext")); + QCOMPARE(ifdModifyPin.getSlotHandle(), QStringLiteral("SlotHandle")); + QCOMPARE(ifdModifyPin.getInputData(), QByteArray::fromHex("abcd1234")); + + QCOMPARE(logSpy.count(), 0); + } + + + void msgField_data() + { + QTest::addColumn("type"); + + const auto& msgTypes = Enum::getList(); + for (const auto& type : msgTypes) + { + QTest::newRow(getEnumName(type).data()) << type; + } + } + + + void msgField() + { + QFETCH(RemoteCardMessageType, type); + + QSignalSpy logSpy(&LogHandler::getInstance(), &LogHandler::fireLog); + + QByteArray message("{\n" + " \"ContextHandle\": \"TestContext\",\n" + " \"InputData\": \"abcd1234\",\n" + " \"SlotHandle\": \"SlotHandle\",\n" + " \"msg\": \"%1\"\n" + "}\n"); + const QJsonObject& obj = QJsonDocument::fromJson(message.replace("%1", QTest::currentDataTag())).object(); + const IfdModifyPin ifdModifyPin(obj); + + if (type == RemoteCardMessageType::IFDModifyPIN) + { + QCOMPARE(ifdModifyPin.getType(), RemoteCardMessageType::IFDModifyPIN); + + QCOMPARE(logSpy.count(), 0); + + return; + } + + QVERIFY(ifdModifyPin.isValid()); + QCOMPARE(ifdModifyPin.getType(), type); + + QCOMPARE(logSpy.count(), 0); + } + + + void wrongTypes() + { + QSignalSpy logSpy(&LogHandler::getInstance(), &LogHandler::fireLog); + + const QByteArray message("{\n" + " \"ContextHandle\": \"TestContext\",\n" + " \"InputData\": 1,\n" + " \"SlotHandle\": 2,\n" + " \"msg\": \"IFDModifyPIN\"\n" + "}\n"); + + const QJsonObject& obj = QJsonDocument::fromJson(message).object(); + const IfdModifyPin ifdModifyPin(obj); + QCOMPARE(ifdModifyPin.getType(), RemoteCardMessageType::IFDModifyPIN); + QCOMPARE(ifdModifyPin.getContextHandle(), QStringLiteral("TestContext")); + QCOMPARE(ifdModifyPin.getSlotHandle(), QString()); + QCOMPARE(ifdModifyPin.getInputData(), QByteArray()); + + QCOMPARE(logSpy.count(), 2); + QVERIFY(logSpy.at(0).at(0).toString().contains("The value of \"SlotHandle\" should be of type \"string\"")); + QVERIFY(logSpy.at(1).at(0).toString().contains("The value of \"InputData\" should be of type \"string\"")); + } + + +}; + +QTEST_GUILESS_MAIN(test_IfdModifyPin) +#include "test_IfdModifyPin.moc" diff --git a/test/qt/remote_device/messages/test_IfdModifyPinResponse.cpp b/test/qt/remote_device/messages/test_IfdModifyPinResponse.cpp new file mode 100644 index 000000000..4dc252f13 --- /dev/null +++ b/test/qt/remote_device/messages/test_IfdModifyPinResponse.cpp @@ -0,0 +1,193 @@ +/*! + * \copyright Copyright (c) 2018 Governikus GmbH & Co. KG, Germany + */ + +#include "messages/IfdModifyPinResponse.h" + +#include "LogHandler.h" + +#include + + +using namespace governikus; + + +class test_IfdModifyPinResponse + : public QObject +{ + Q_OBJECT + + private Q_SLOTS: + void initTestCase() + { + LogHandler::getInstance().init(); + } + + + void invalidJson() + { + QSignalSpy logSpy(&LogHandler::getInstance(), &LogHandler::fireLog); + + QByteArray message("FooBar"); + const auto& obj = QJsonDocument::fromJson(message).object(); + QVERIFY(obj.isEmpty()); + + IfdModifyPinResponse msg(obj); + + QCOMPARE(logSpy.count(), 6); + QVERIFY(logSpy.at(0).at(0).toString().contains("Missing value \"msg\"")); + QVERIFY(logSpy.at(1).at(0).toString().contains("Missing value \"ContextHandle\"")); + QVERIFY(logSpy.at(2).at(0).toString().contains("Missing value \"ResultMajor\"")); + QVERIFY(logSpy.at(3).at(0).toString().contains("Missing value \"ResultMinor\"")); + QVERIFY(logSpy.at(4).at(0).toString().contains("Missing value \"SlotHandle\"")); + QVERIFY(logSpy.at(5).at(0).toString().contains("Missing value \"OutputData\"")); + } + + + void values() + { + const IfdModifyPinResponse ifdModifyPinResponse( + QStringLiteral("SlotHandle"), + QByteArray::fromHex("abcd1234") + ); + + QCOMPARE(ifdModifyPinResponse.getType(), RemoteCardMessageType::IFDModifyPINResponse); + QCOMPARE(ifdModifyPinResponse.getContextHandle(), QString()); + QCOMPARE(ifdModifyPinResponse.getSlotHandle(), QStringLiteral("SlotHandle")); + QCOMPARE(ifdModifyPinResponse.getOutputData(), QByteArray::fromHex("abcd1234")); + QVERIFY(!ifdModifyPinResponse.resultHasError()); + QCOMPARE(ifdModifyPinResponse.getResultMinor(), QString()); + } + + + void toJson() + { + const IfdModifyPinResponse ifdModifyPinResponse( + QStringLiteral("SlotHandle"), + QByteArray::fromHex("abcd1234") + ); + + const QJsonDocument& doc = ifdModifyPinResponse.toJson(QStringLiteral("TestContext")); + QVERIFY(doc.isObject()); + QCOMPARE(doc.toJson(), + QByteArray("{\n" + " \"ContextHandle\": \"TestContext\",\n" + " \"OutputData\": \"abcd1234\",\n" + " \"ResultMajor\": \"http://www.bsi.bund.de/ecard/api/1.1/resultmajor#ok\",\n" + " \"ResultMinor\": null,\n" + " \"SlotHandle\": \"SlotHandle\",\n" + " \"msg\": \"IFDModifyPINResponse\"\n" + "}\n")); + + const QJsonObject obj = doc.object(); + QCOMPARE(obj.size(), 6); + QCOMPARE(obj.value(QLatin1String("msg")).toString(), QStringLiteral("IFDModifyPINResponse")); + QCOMPARE(obj.value(QLatin1String("ContextHandle")).toString(), QStringLiteral("TestContext")); + QCOMPARE(obj.value(QLatin1String("SlotHandle")).toString(), QStringLiteral("SlotHandle")); + QCOMPARE(obj.value(QLatin1String("OutputData")).toString(), QStringLiteral("abcd1234")); + } + + + void fromJson() + { + QSignalSpy logSpy(&LogHandler::getInstance(), &LogHandler::fireLog); + + const QByteArray message("{\n" + " \"ContextHandle\": \"TestContext\",\n" + " \"OutputData\": \"abcd1234\",\n" + " \"ResultMajor\": \"http://www.bsi.bund.de/ecard/api/1.1/resultmajor#ok\",\n" + " \"ResultMinor\": null,\n" + " \"SlotHandle\": \"SlotHandle\",\n" + " \"msg\": \"IFDModifyPINResponse\"\n" + "}\n"); + + const QJsonObject& obj = QJsonDocument::fromJson(message).object(); + const IfdModifyPinResponse ifdModifyPinResponse(obj); + QCOMPARE(ifdModifyPinResponse.getType(), RemoteCardMessageType::IFDModifyPINResponse); + QCOMPARE(ifdModifyPinResponse.getContextHandle(), QString("TestContext")); + QCOMPARE(ifdModifyPinResponse.getSlotHandle(), QStringLiteral("SlotHandle")); + QCOMPARE(ifdModifyPinResponse.getOutputData(), QByteArray::fromHex("abcd1234")); + QVERIFY(!ifdModifyPinResponse.resultHasError()); + QCOMPARE(ifdModifyPinResponse.getResultMinor(), QString()); + + QCOMPARE(logSpy.count(), 0); + } + + + void msgField_data() + { + QTest::addColumn("type"); + + const auto& msgTypes = Enum::getList(); + for (const auto& type : msgTypes) + { + QTest::newRow(getEnumName(type).data()) << type; + } + } + + + void msgField() + { + QFETCH(RemoteCardMessageType, type); + + QSignalSpy logSpy(&LogHandler::getInstance(), &LogHandler::fireLog); + + QByteArray message("{\n" + " \"ContextHandle\": \"TestContext\",\n" + " \"OutputData\": \"abcd1234\",\n" + " \"ResultMajor\": \"http://www.bsi.bund.de/ecard/api/1.1/resultmajor#ok\",\n" + " \"ResultMinor\": null,\n" + " \"SlotHandle\": \"SlotHandle\",\n" + " \"msg\": \"%1\"\n" + "}\n"); + const QJsonObject& obj = QJsonDocument::fromJson(message.replace("%1", QTest::currentDataTag())).object(); + const IfdModifyPinResponse ifdModifyPinResponse(obj); + + if (type == RemoteCardMessageType::IFDModifyPINResponse) + { + QCOMPARE(ifdModifyPinResponse.getType(), RemoteCardMessageType::IFDModifyPINResponse); + + QCOMPARE(logSpy.count(), 0); + + return; + } + + QVERIFY(ifdModifyPinResponse.isValid()); + QCOMPARE(ifdModifyPinResponse.getType(), type); + + QCOMPARE(logSpy.count(), 0); + } + + + void wrongTypes() + { + QSignalSpy logSpy(&LogHandler::getInstance(), &LogHandler::fireLog); + + const QByteArray message("{\n" + " \"ContextHandle\": \"TestContext\",\n" + " \"OutputData\": 1,\n" + " \"ResultMajor\": \"http://www.bsi.bund.de/ecard/api/1.1/resultmajor#ok\",\n" + " \"ResultMinor\": null,\n" + " \"SlotHandle\": 2,\n" + " \"msg\": \"IFDModifyPINResponse\"\n" + "}\n"); + + const QJsonObject& obj = QJsonDocument::fromJson(message).object(); + const IfdModifyPinResponse ifdModifyPinResponse(obj); + QCOMPARE(ifdModifyPinResponse.getType(), RemoteCardMessageType::IFDModifyPINResponse); + QCOMPARE(ifdModifyPinResponse.getContextHandle(), QStringLiteral("TestContext")); + QCOMPARE(ifdModifyPinResponse.getSlotHandle(), QString()); + QCOMPARE(ifdModifyPinResponse.getOutputData(), QByteArray()); + QVERIFY(!ifdModifyPinResponse.resultHasError()); + QCOMPARE(ifdModifyPinResponse.getResultMinor(), QString()); + + QCOMPARE(logSpy.count(), 2); + QVERIFY(logSpy.at(0).at(0).toString().contains("The value of \"SlotHandle\" should be of type \"string\"")); + QVERIFY(logSpy.at(1).at(0).toString().contains("The value of \"OutputData\" should be of type \"string\"")); + } + + +}; + +QTEST_GUILESS_MAIN(test_IfdModifyPinResponse) +#include "test_IfdModifyPinResponse.moc" diff --git a/test/qt/remote_device/messages/test_IfdVersion.cpp b/test/qt/remote_device/messages/test_IfdVersion.cpp new file mode 100644 index 000000000..58d4a9077 --- /dev/null +++ b/test/qt/remote_device/messages/test_IfdVersion.cpp @@ -0,0 +1,57 @@ +/*! + * \copyright Copyright (c) 2018 Governikus GmbH & Co. KG, Germany + */ + +#include "messages/IfdVersion.h" + +#include + +using namespace governikus; + + +class test_IfdVersion + : public QObject +{ + Q_OBJECT + + private Q_SLOTS: + void stringParsing() + { + QCOMPARE(IfdVersion::fromString("IFDInterface_WebSocket_v0"), IfdVersion(IfdVersion::Version::v0)); + + QCOMPARE(IfdVersion::fromString("IFDInterface_WebSocket_v9001"), IfdVersion(IfdVersion::Version::Unknown)); + } + + + void isValid() + { + QCOMPARE(IfdVersion(IfdVersion::Version::Unknown).isValid(), false); + QCOMPARE(IfdVersion(IfdVersion::Version::v0).isValid(), true); + } + + + void isSupported() + { + QCOMPARE(IfdVersion(IfdVersion::Version::Unknown).isSupported(), false); + QCOMPARE(IfdVersion(IfdVersion::Version::v0).isSupported(), true); + } + + + void supportedVersions() + { + QCOMPARE(IfdVersion::supported(), {IfdVersion::Version::v0}); + } + + + void selectSupportedVersions() + { + QCOMPARE(IfdVersion::selectLatestSupported({}), IfdVersion(IfdVersion::Version::Unknown)); + QCOMPARE(IfdVersion::selectLatestSupported({IfdVersion::Version::Unknown}), IfdVersion(IfdVersion::Version::Unknown)); + QCOMPARE(IfdVersion::selectLatestSupported({IfdVersion::Version::v0}), IfdVersion(IfdVersion::Version::v0)); + } + + +}; + +QTEST_GUILESS_MAIN(test_IfdVersion) +#include "test_IfdVersion.moc" diff --git a/test/qt/remote_device/test_RemoteClientImpl.cpp b/test/qt/remote_device/test_RemoteClientImpl.cpp index c3cef306f..eed195bc8 100644 --- a/test/qt/remote_device/test_RemoteClientImpl.cpp +++ b/test/qt/remote_device/test_RemoteClientImpl.cpp @@ -1,5 +1,5 @@ /*! - * \copyright Copyright (c) 2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2017-2018 Governikus GmbH & Co. KG, Germany */ #include "RemoteClientImpl.h" @@ -288,7 +288,7 @@ class test_RemoteClient QVERIFY(!mRemoteConnectorMock.isNull()); QSignalSpy spyConnectionRequest(mRemoteConnectorMock.data(), &RemoteConnectorMock::fireConnectionRequestReceived); - const QSharedPointer msg(new Discovery("", QStringLiteral("0123456789ABCDEF"), 12345, {QStringLiteral("IFDInterface_WebSocket_v0"), QStringLiteral("IFDInterface_WebSocket_v2")})); + const QSharedPointer msg(new Discovery("", QStringLiteral("0123456789ABCDEF"), 12345, {IfdVersion::Version::v0})); const RemoteDeviceDescriptor descr(msg, QHostAddress("192.168.1.88")); QSharedPointer emptyEntry(new RemoteDeviceListEntry(descr)); client.establishConnection(emptyEntry, QString("password1")); diff --git a/test/qt/remote_device/test_RemoteConnector.cpp b/test/qt/remote_device/test_RemoteConnector.cpp index ae476b9a0..f4b557a35 100644 --- a/test/qt/remote_device/test_RemoteConnector.cpp +++ b/test/qt/remote_device/test_RemoteConnector.cpp @@ -1,7 +1,7 @@ /*! * \brief Unit tests for \ref RemoteConnector * - * \copyright Copyright (c) 2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2017-2018 Governikus GmbH & Co. KG, Germany */ #include "RemoteConnectorImpl.h" @@ -162,7 +162,7 @@ class test_RemoteConnector // No device name. const QHostAddress hostAddress(QHostAddress::LocalHost); - const QSharedPointer msg(new Discovery(QString(), QStringLiteral("0123456789ABCDEF"), 2020, {QStringLiteral("IFDInterface_WebSocket_v0")})); + const QSharedPointer msg(new Discovery(QString(), QStringLiteral("0123456789ABCDEF"), 2020, {IfdVersion::Version::v0})); sendRequest(connector, hostAddress, msg, QString()); waitForSignals(&spyError, 1, cSignalTimeoutMs); @@ -213,7 +213,7 @@ class test_RemoteConnector // Password is empty. const QHostAddress hostAddress(QHostAddress::LocalHost); - const QSharedPointer msg(new Discovery(QStringLiteral("Smartphone1"), QStringLiteral("0123456789ABCDEF"), server->getServerPort(), {QStringLiteral("IFDInterface_WebSocket_v0")})); + const QSharedPointer msg(new Discovery(QStringLiteral("Smartphone1"), QStringLiteral("0123456789ABCDEF"), server->getServerPort(), {IfdVersion::Version::v0})); sendRequest(connector, hostAddress, msg, QString()); waitForSignals(&spyError, 1, cSignalTimeoutMs); @@ -238,7 +238,7 @@ class test_RemoteConnector // Currently, only API level 1 is supported. const QHostAddress hostAddress(QHostAddress::LocalHost); - const QSharedPointer msg(new Discovery(QStringLiteral("Smartphone1"), QStringLiteral("0123456789ABCDEF"), 2020, {QStringLiteral("IFDInterface_WebSocket_v2")})); + const QSharedPointer msg(new Discovery(QStringLiteral("Smartphone1"), QStringLiteral("0123456789ABCDEF"), 2020, {IfdVersion::Version::Unknown})); sendRequest(connector, hostAddress, msg, QStringLiteral("secret")); waitForSignals(&spyError, 1, cSignalTimeoutMs); @@ -263,7 +263,7 @@ class test_RemoteConnector // Correct request but no server is running. const QHostAddress hostAddress(QHostAddress::LocalHost); - const QSharedPointer msg(new Discovery(QStringLiteral("Smartphone1"), QStringLiteral("0123456789ABCDEF"), 2020, {QStringLiteral("IFDInterface_WebSocket_v0")})); + const QSharedPointer msg(new Discovery(QStringLiteral("Smartphone1"), QStringLiteral("0123456789ABCDEF"), 2020, {IfdVersion::Version::v0})); sendRequest(connector, hostAddress, msg, QString("dummy")); waitForSignals(&spyError, 1, cSignalTimeoutMs); @@ -343,7 +343,7 @@ class test_RemoteConnector // Send valid encrypted connect request. const QHostAddress hostAddress(QHostAddress::LocalHost); - const QSharedPointer msg(new Discovery(QStringLiteral("Smartphone1"), QStringLiteral("0123456789ABCDEF"), serverPort, {QStringLiteral("IFDInterface_WebSocket_v0")})); + const QSharedPointer msg(new Discovery(QStringLiteral("Smartphone1"), QStringLiteral("0123456789ABCDEF"), serverPort, {IfdVersion::Version::v0})); sendRequest(connector, hostAddress, msg, psk); waitForSignals(&spyConnectorSuccess, 1, cSignalTimeoutMs); @@ -405,7 +405,7 @@ class test_RemoteConnector // Send encrypted connect request with wrong psk. const QHostAddress hostAddress(QHostAddress::LocalHost); - const QSharedPointer msg(new Discovery(QStringLiteral("Smartphone1"), QStringLiteral("0123456789ABCDEF"), serverPort, {QStringLiteral("IFDInterface_WebSocket_v0")})); + const QSharedPointer msg(new Discovery(QStringLiteral("Smartphone1"), QStringLiteral("0123456789ABCDEF"), serverPort, {IfdVersion::Version::v0})); sendRequest(connector, hostAddress, msg, QStringLiteral("sekret")); waitForSignals(&spyConnectorError, 1, cSignalTimeoutMs); diff --git a/test/qt/remote_device/test_RemoteDeviceDescriptor.cpp b/test/qt/remote_device/test_RemoteDeviceDescriptor.cpp index d61e37dcf..5a1e4279e 100644 --- a/test/qt/remote_device/test_RemoteDeviceDescriptor.cpp +++ b/test/qt/remote_device/test_RemoteDeviceDescriptor.cpp @@ -1,5 +1,5 @@ /*! - * \copyright Copyright (c) 2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2017-2018 Governikus GmbH & Co. KG, Germany */ #include "RemoteDeviceDescriptor.h" @@ -29,7 +29,7 @@ class test_RemoteDeviceDescriptor void testValidDescriptorIsEqualToItself() { - const QSharedPointer validMsg(new Discovery(QStringLiteral("Device"), QStringLiteral("0123456789ABCDEF"), mPort, {QStringLiteral("IFDInterface_WebSocket_v0")})); + const QSharedPointer validMsg(new Discovery(QStringLiteral("Device"), QStringLiteral("0123456789ABCDEF"), mPort, {IfdVersion::Version::v0})); const QHostAddress address(QHostAddress::LocalHost); const RemoteDeviceDescriptor valid(validMsg, address); @@ -51,7 +51,7 @@ class test_RemoteDeviceDescriptor void testValidDescriptorIsDifferentFromInvalid() { - const QSharedPointer validMsg(new Discovery(QStringLiteral("Device"), QStringLiteral("0123456789ABCDEF"), mPort, {QStringLiteral("IFDInterface_WebSocket_v0")})); + const QSharedPointer validMsg(new Discovery(QStringLiteral("Device"), QStringLiteral("0123456789ABCDEF"), mPort, {IfdVersion::Version::v0})); const QSharedPointer invalidMsg; const QHostAddress address(QHostAddress::LocalHost); @@ -64,8 +64,8 @@ class test_RemoteDeviceDescriptor void testDistinctValidDescriptorsWithDifferentDataAreDifferent() { - const QSharedPointer validMsg1(new Discovery(QStringLiteral("Device"), QStringLiteral("0123456789ABCDEF"), mPort, {QStringLiteral("IFDInterface_WebSocket_v0")})); - const QSharedPointer validMsg2(new Discovery(QStringLiteral("Device"), QStringLiteral("0123456789ABCDEF"), mPort, {QStringLiteral("IFDInterface_WebSocket_v0"), QStringLiteral("IFDInterface_WebSocket_v2")})); + const QSharedPointer validMsg1(new Discovery(QStringLiteral("Device"), QStringLiteral("0123456789ABCDEF"), mPort, {IfdVersion::Version::v0})); + const QSharedPointer validMsg2(new Discovery(QStringLiteral("Device"), QStringLiteral("0123456789ABCDEF"), mPort, {IfdVersion::Version::v0, IfdVersion::Version::Unknown})); const QHostAddress address(QHostAddress::LocalHost); const RemoteDeviceDescriptor valid1(validMsg1, address); @@ -77,8 +77,8 @@ class test_RemoteDeviceDescriptor void testDistinctValidDescriptorsWithTheSameDataAreEqual() { - const QSharedPointer validMsg1(new Discovery(QStringLiteral("Device"), QStringLiteral("0123456789ABCDEF"), mPort, {QStringLiteral("IFDInterface_WebSocket_v0")})); - const QSharedPointer validMsg2(new Discovery(QStringLiteral("Device"), QStringLiteral("0123456789ABCDEF"), mPort, {QStringLiteral("IFDInterface_WebSocket_v0")})); + const QSharedPointer validMsg1(new Discovery(QStringLiteral("Device"), QStringLiteral("0123456789ABCDEF"), mPort, {IfdVersion::Version::v0})); + const QSharedPointer validMsg2(new Discovery(QStringLiteral("Device"), QStringLiteral("0123456789ABCDEF"), mPort, {IfdVersion::Version::v0})); const QHostAddress address(QHostAddress::LocalHost); const RemoteDeviceDescriptor valid1(validMsg1, address); diff --git a/test/qt/remote_device/test_RemoteDeviceListImpl.cpp b/test/qt/remote_device/test_RemoteDeviceListImpl.cpp index 4144bdbe6..f4b7c3172 100644 --- a/test/qt/remote_device/test_RemoteDeviceListImpl.cpp +++ b/test/qt/remote_device/test_RemoteDeviceListImpl.cpp @@ -1,5 +1,5 @@ /*! - * \copyright Copyright (c) 2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2017-2018 Governikus GmbH & Co. KG, Germany */ #include "RemoteDeviceList.h" @@ -26,7 +26,7 @@ class test_RemoteDeviceListImpl QSharedPointer offerMsg1; QHostAddress addr1; { - offerMsg1 = QSharedPointer(new Discovery("Dev1", QStringLiteral("0123456789ABCDEF"), 1234, {QStringLiteral("IFDInterface_WebSocket_v0")})); + offerMsg1 = QSharedPointer(new Discovery("Dev1", QStringLiteral("0123456789ABCDEF"), 1234, {IfdVersion::Version::v0})); addr1 = QHostAddress(QString("5.6.7.8")); const RemoteDeviceDescriptor descr(offerMsg1, addr1); @@ -38,7 +38,7 @@ class test_RemoteDeviceListImpl QSharedPointer offerMsg2; QHostAddress addr2; { - offerMsg2 = QSharedPointer(new Discovery("Dev1", QStringLiteral("0123456789ABCDEF"), 1234, {QStringLiteral("IFDInterface_WebSocket_v0")})); + offerMsg2 = QSharedPointer(new Discovery("Dev1", QStringLiteral("0123456789ABCDEF"), 1234, {IfdVersion::Version::v0})); addr2 = QHostAddress(QString("5.6.7.8")); const RemoteDeviceDescriptor descr(offerMsg1, addr2); @@ -48,7 +48,7 @@ class test_RemoteDeviceListImpl } { - offerMsg2 = QSharedPointer(new Discovery("Dev1", QStringLiteral("0123456789ABCDEF"), 1234, {QStringLiteral("IFDInterface_WebSocket_v0")})); + offerMsg2 = QSharedPointer(new Discovery("Dev1", QStringLiteral("0123456789ABCDEF"), 1234, {IfdVersion::Version::v0})); addr2 = QHostAddress(QString("5.6.7.9")); const RemoteDeviceDescriptor descr(offerMsg1, addr2); diff --git a/test/qt/remote_device/test_RemoteDispImpl.cpp b/test/qt/remote_device/test_RemoteDispImpl.cpp index ba6670fd4..d8357aa81 100644 --- a/test/qt/remote_device/test_RemoteDispImpl.cpp +++ b/test/qt/remote_device/test_RemoteDispImpl.cpp @@ -1,7 +1,7 @@ /*! * \brief Unit tests for \ref RemoteDispatcher * - * \copyright Copyright (c) 2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2017-2018 Governikus GmbH & Co. KG, Germany */ #include "RemoteDispatcherImpl.h" diff --git a/test/qt/remote_device/test_RemoteHelper.cpp b/test/qt/remote_device/test_RemoteHelper.cpp index a9ce4b120..1488b1c09 100644 --- a/test/qt/remote_device/test_RemoteHelper.cpp +++ b/test/qt/remote_device/test_RemoteHelper.cpp @@ -1,7 +1,7 @@ /*! * \brief Unit tests for \ref RemoteHelper * - * \copyright Copyright (c) 2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2017-2018 Governikus GmbH & Co. KG, Germany */ #include "AppSettings.h" diff --git a/test/qt/remote_device/test_RemoteMessageParser.cpp b/test/qt/remote_device/test_RemoteMessageParser.cpp index ca5493cb2..ba02478e2 100644 --- a/test/qt/remote_device/test_RemoteMessageParser.cpp +++ b/test/qt/remote_device/test_RemoteMessageParser.cpp @@ -1,7 +1,7 @@ /*! * \brief Unit tests for \ref RemoteMessageParser * - * \copyright Copyright (c) 2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2017-2018 Governikus GmbH & Co. KG, Germany */ #include "messages/RemoteMessageParser.h" diff --git a/test/qt/remote_device/test_RemoteMessages.cpp b/test/qt/remote_device/test_RemoteMessages.cpp index c40ddafbc..44aa4febe 100644 --- a/test/qt/remote_device/test_RemoteMessages.cpp +++ b/test/qt/remote_device/test_RemoteMessages.cpp @@ -1,7 +1,7 @@ /*! * \brief Unit tests for \ref RemoteMessages * - * \copyright Copyright (c) 2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2017-2018 Governikus GmbH & Co. KG, Germany */ #include "messages/Discovery.h" @@ -48,7 +48,7 @@ class test_RemoteMessages new Discovery(QStringLiteral("Sony Xperia Z5 compact"), QStringLiteral("0123456789ABCDEF"), 24728, - {QStringLiteral("IFDInterface_WebSocket_v0"), QStringLiteral("IFDInterface_WebSocket_v2")}) + {IfdVersion::Version::v0}) ); mChecker.processDiscovery(message); @@ -64,17 +64,15 @@ class test_RemoteMessages QCOMPARE(object.value(QLatin1String("port")).toInt(), 24728); const QJsonValue apiLevels = object.value(QLatin1String("SupportedAPI")); QVERIFY(apiLevels.isArray()); - QCOMPARE(apiLevels.toArray().size(), 2); + QCOMPARE(apiLevels.toArray().size(), 1); QCOMPARE(apiLevels.toArray().at(0).toString(), QStringLiteral("IFDInterface_WebSocket_v0")); - QCOMPARE(apiLevels.toArray().at(1).toString(), QStringLiteral("IFDInterface_WebSocket_v2")); QCOMPARE(document.toJson(), QByteArray("{\n" " \"IFDID\": \"0123456789ABCDEF\",\n" " \"IFDName\": \"Sony Xperia Z5 compact\",\n" " \"SupportedAPI\": [\n" - " \"IFDInterface_WebSocket_v0\",\n" - " \"IFDInterface_WebSocket_v2\"\n" + " \"IFDInterface_WebSocket_v0\"\n" " ],\n" " \"msg\": \"REMOTE_IFD\",\n" " \"port\": 24728\n" @@ -84,7 +82,7 @@ class test_RemoteMessages void ifdEstablishContext() { - const QSharedPointer message(new IfdEstablishContext("IFDInterface_WebSocket_v0", "MAC-MINI")); + const QSharedPointer message(new IfdEstablishContext(IfdVersion::Version::v0, "MAC-MINI")); mChecker.receive(message); diff --git a/test/qt/remote_device/test_RemoteReaderAdvertiser.cpp b/test/qt/remote_device/test_RemoteReaderAdvertiser.cpp index ade00ca6c..0721c4f57 100644 --- a/test/qt/remote_device/test_RemoteReaderAdvertiser.cpp +++ b/test/qt/remote_device/test_RemoteReaderAdvertiser.cpp @@ -1,7 +1,7 @@ /*! * \brief Unit tests for \ref RemoteReaderAdvertiserImpl * - * \copyright Copyright (c) 2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2017-2018 Governikus GmbH & Co. KG, Germany */ #include "RemoteReaderAdvertiser.h" @@ -104,7 +104,7 @@ class test_RemoteReaderAdvertiser QCOMPARE(offerMsg->getIfdName(), ifdName); QCOMPARE(offerMsg->getIfdId(), ifdId); QCOMPARE(offerMsg->getPort(), port); - QCOMPARE(offerMsg->getSupportedApis(), {QStringLiteral("IFDInterface_WebSocket_v0")}); + QCOMPARE(offerMsg->getSupportedApis(), {IfdVersion::Version::v0}); } diff --git a/test/qt/remote_device/test_RemoteServer.cpp b/test/qt/remote_device/test_RemoteServer.cpp index 84c5258f0..aef440948 100644 --- a/test/qt/remote_device/test_RemoteServer.cpp +++ b/test/qt/remote_device/test_RemoteServer.cpp @@ -1,7 +1,7 @@ /*! * \brief Unit tests for \ref RemoteServerImpl * - * \copyright Copyright (c) 2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2017-2018 Governikus GmbH & Co. KG, Germany */ #include "Env.h" diff --git a/test/qt/remote_device/test_RemoteTlsServer.cpp b/test/qt/remote_device/test_RemoteTlsServer.cpp index 14e41fd42..306eab72b 100644 --- a/test/qt/remote_device/test_RemoteTlsServer.cpp +++ b/test/qt/remote_device/test_RemoteTlsServer.cpp @@ -1,7 +1,7 @@ /*! * \brief Unit tests for \ref RemoteTlsServer * - * \copyright Copyright (c) 2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2017-2018 Governikus GmbH & Co. KG, Germany */ #include "RemoteTlsServer.h" diff --git a/test/qt/remote_device/test_RemoteWebSocketServer.cpp b/test/qt/remote_device/test_RemoteWebSocketServer.cpp index 6ef186a23..ffd7b1c37 100644 --- a/test/qt/remote_device/test_RemoteWebSocketServer.cpp +++ b/test/qt/remote_device/test_RemoteWebSocketServer.cpp @@ -1,7 +1,7 @@ /*! * \brief Unit tests for \ref RemoteWebSocketServer * - * \copyright Copyright (c) 2016-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2017-2018 Governikus GmbH & Co. KG, Germany */ #include "RemoteWebSocketServer.h" diff --git a/test/qt/remote_device/test_ServerMessageHandler.cpp b/test/qt/remote_device/test_ServerMessageHandler.cpp index 7d52f1185..37d30911e 100644 --- a/test/qt/remote_device/test_ServerMessageHandler.cpp +++ b/test/qt/remote_device/test_ServerMessageHandler.cpp @@ -1,7 +1,7 @@ /*! * \brief Unit tests for \ref test_ServerMessageHandlerImpl * - * \copyright Copyright (c) 2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2017-2018 Governikus GmbH & Co. KG, Germany */ #include "ServerMessageHandler.h" diff --git a/test/qt/securestorage/test_SecureStorage.cpp b/test/qt/securestorage/test_SecureStorage.cpp index 9270ba6e5..6a699c14a 100644 --- a/test/qt/securestorage/test_SecureStorage.cpp +++ b/test/qt/securestorage/test_SecureStorage.cpp @@ -1,7 +1,7 @@ /*! * \brief Unit tests for \ref SecureStorage * - * \copyright Copyright (c) 2014-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2014-2018 Governikus GmbH & Co. KG, Germany */ #include @@ -192,8 +192,6 @@ class test_SecureStorage { QVERIFY(mSecureStorage.getSelfAuthenticationUrl(false).isValid()); QVERIFY(mSecureStorage.getSelfAuthenticationUrl(true).isValid()); - QVERIFY(!mSecureStorage.getSelfAuthenticationCertDescr(false).isEmpty()); - QVERIFY(!mSecureStorage.getSelfAuthenticationCertDescr(true).isEmpty()); } diff --git a/test/qt/securestorage/test_TlsConfiguration.cpp b/test/qt/securestorage/test_TlsConfiguration.cpp index 37141354d..2490ddaca 100644 --- a/test/qt/securestorage/test_TlsConfiguration.cpp +++ b/test/qt/securestorage/test_TlsConfiguration.cpp @@ -1,7 +1,7 @@ /*! * \brief Unit tests for \ref TlsConfiguration * - * \copyright Copyright (c) 2016-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2016-2018 Governikus GmbH & Co. KG, Germany */ #include "TlsConfiguration.h" diff --git a/test/qt/services/test_AppUpdatr.cpp b/test/qt/services/test_AppUpdatr.cpp index 8cc9a1fcd..0e8d093f6 100644 --- a/test/qt/services/test_AppUpdatr.cpp +++ b/test/qt/services/test_AppUpdatr.cpp @@ -1,7 +1,7 @@ /*! * \brief Unit tests for \ref AppUpdater * - * \copyright Copyright (c) 2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2017-2018 Governikus GmbH & Co. KG, Germany */ #include "AppUpdater.h" diff --git a/test/qt/settings/test_AppSettings.cpp b/test/qt/settings/test_AppSettings.cpp index 26ce0e556..12b17be93 100644 --- a/test/qt/settings/test_AppSettings.cpp +++ b/test/qt/settings/test_AppSettings.cpp @@ -1,7 +1,7 @@ /*! * \brief Unit tests for \ref AppSettings * - * \copyright Copyright (c) 2014-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2014-2018 Governikus GmbH & Co. KG, Germany */ #include diff --git a/test/qt/settings/test_GeneralSettings.cpp b/test/qt/settings/test_GeneralSettings.cpp index 8c473c9f0..0e2512560 100644 --- a/test/qt/settings/test_GeneralSettings.cpp +++ b/test/qt/settings/test_GeneralSettings.cpp @@ -1,11 +1,12 @@ /*! * \brief Unit tests for \ref GeneralSettings * - * \copyright Copyright (c) 2014-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2014-2018 Governikus GmbH & Co. KG, Germany */ #include #include +#include #include #include "GeneralSettings.h" @@ -104,6 +105,7 @@ class test_GeneralSettings QCOMPARE(mSettings->getPersistentSettingsVersion(), QString()); QCOMPARE(mSettings->isDeveloperMode(), false); QCOMPARE(mSettings->useSelfAuthTestUri(), false); + QCOMPARE(mSettings->getLastReaderPluginType(), QString()); } @@ -181,6 +183,26 @@ class test_GeneralSettings } + void testLastReaderPluginType() + { + QString initial = mSettings->getLastReaderPluginType(); + QCOMPARE(initial, QString()); + QSignalSpy spy(mSettings.data(), &GeneralSettings::fireSettingsChanged); + + QString newValue; + mSettings->setLastReaderPluginType(newValue); + + QCOMPARE(mSettings->getLastReaderPluginType(), newValue); + mSettings->save(); + QCOMPARE(spy.count(), 0); + newValue = QStringLiteral("REMOTE"); + mSettings->setLastReaderPluginType(newValue); + QCOMPARE(mSettings->getLastReaderPluginType(), newValue); + QCOMPARE(spy.count(), 1); + mSettings->save(); + } + + }; QTEST_GUILESS_MAIN(test_GeneralSettings) diff --git a/test/qt/settings/test_HistorySettings.cpp b/test/qt/settings/test_HistorySettings.cpp index bc337df41..05bd26f17 100644 --- a/test/qt/settings/test_HistorySettings.cpp +++ b/test/qt/settings/test_HistorySettings.cpp @@ -4,7 +4,7 @@ * All tests ends with _QTEST to be able to identify them later. * All original history entry from AusweisApp2 do not have this. * - * \copyright Copyright (c) 2014-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2014-2018 Governikus GmbH & Co. KG, Germany */ #include "HistorySettings.h" diff --git a/test/qt/settings/test_KeyPair.cpp b/test/qt/settings/test_KeyPair.cpp index 7bef46b24..c425d7c54 100644 --- a/test/qt/settings/test_KeyPair.cpp +++ b/test/qt/settings/test_KeyPair.cpp @@ -1,7 +1,7 @@ /*! * \brief Unit tests for \ref CertificateGenerator * - * \copyright Copyright (c) 2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2017-2018 Governikus GmbH & Co. KG, Germany */ #include "KeyPair.h" diff --git a/test/qt/settings/test_PreVerificationSettings.cpp b/test/qt/settings/test_PreVerificationSettings.cpp index d531d6ad7..12a986a7f 100644 --- a/test/qt/settings/test_PreVerificationSettings.cpp +++ b/test/qt/settings/test_PreVerificationSettings.cpp @@ -1,7 +1,7 @@ /*! * \brief Unit tests for \ref PreVerificationSettings * - * \copyright Copyright (c) 2014-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2014-2018 Governikus GmbH & Co. KG, Germany */ #include "PreVerificationSettings.h" diff --git a/test/qt/settings/test_RemoteServiceSettings.cpp b/test/qt/settings/test_RemoteServiceSettings.cpp index 80e2ad939..3a22b407e 100644 --- a/test/qt/settings/test_RemoteServiceSettings.cpp +++ b/test/qt/settings/test_RemoteServiceSettings.cpp @@ -1,7 +1,7 @@ /*! * \brief Unit tests for \ref RemoteSertviceSettings * - * \copyright Copyright (c) 2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2017-2018 Governikus GmbH & Co. KG, Germany */ #include "RemoteServiceSettings.h" diff --git a/test/qt/websocket/test_UIPlugInWebSocket.cpp b/test/qt/websocket/test_UIPlugInWebSocket.cpp index d44728dce..8bfedd3a5 100644 --- a/test/qt/websocket/test_UIPlugInWebSocket.cpp +++ b/test/qt/websocket/test_UIPlugInWebSocket.cpp @@ -1,7 +1,7 @@ /*! * \brief Unit tests for \ref UIPlugInWebSocket * - * \copyright Copyright (c) 2016-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2016-2018 Governikus GmbH & Co. KG, Germany */ #include "UIPlugInWebSocket.h" diff --git a/test/qt/widget/test_HelpAction.cpp b/test/qt/widget/test_HelpAction.cpp index fdf93a5d7..d47be92cd 100644 --- a/test/qt/widget/test_HelpAction.cpp +++ b/test/qt/widget/test_HelpAction.cpp @@ -1,7 +1,7 @@ /*! * \brief Unit tests for \ref HelpAction * - * \copyright Copyright (c) 2015-2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2015-2018 Governikus GmbH & Co. KG, Germany */ #include "TestFileHelper.h" diff --git a/test/qt/widget/test_ReaderDriverModel.cpp b/test/qt/widget/test_ReaderDriverModel.cpp index 35b473d61..86cf55e11 100644 --- a/test/qt/widget/test_ReaderDriverModel.cpp +++ b/test/qt/widget/test_ReaderDriverModel.cpp @@ -1,5 +1,5 @@ /*! - * \copyright Copyright (c) 2017 Governikus GmbH & Co. KG, Germany + * \copyright Copyright (c) 2017-2018 Governikus GmbH & Co. KG, Germany */ #include "ReaderDriverModel.h" diff --git a/uncrustify.cfg b/uncrustify.cfg index 9d7657646..1d7f5ad31 100644 --- a/uncrustify.cfg +++ b/uncrustify.cfg @@ -1,4 +1,4 @@ -# Uncrustify-0.65_f +# Uncrustify-0.66.1_f newlines = lf input_tab_size = 4 output_tab_size = 4 @@ -13,6 +13,7 @@ utf8_bom = remove utf8_byte = false utf8_force = false sp_arith = force +sp_arith_additive = ignore sp_assign = force sp_cpp_lambda_assign = ignore sp_cpp_lambda_paren = ignore @@ -52,6 +53,7 @@ sp_before_template_paren = ignore sp_template_angle = remove sp_before_angle = remove sp_inside_angle = remove +sp_angle_colon = ignore sp_after_angle = force sp_angle_paren = remove sp_angle_paren_empty = ignore @@ -242,6 +244,7 @@ indent_member = 0 indent_sing_line_comments = 0 indent_relative_single_line_comments = false indent_switch_case = 4 +indent_switch_pp = true indent_case_shift = 0 indent_case_brace = 0 indent_col1_comment = true @@ -250,6 +253,9 @@ indent_access_spec = 0 indent_access_spec_body = true indent_paren_nl = false indent_paren_close = 0 +indent_paren_after_func_def = false +indent_paren_after_func_decl = false +indent_paren_after_func_call = false indent_comma_paren = false indent_bool_paren = false indent_first_bool_expr = false @@ -271,6 +277,7 @@ indent_token_after_brace = true indent_cpp_lambda_body = true indent_using_block = true indent_ternary_operator = 0 +indent_ignore_asm_block = false nl_collapse_empty_body = false nl_assign_leave_one_liners = false nl_class_leave_one_liners = false @@ -347,7 +354,11 @@ nl_func_class_scope = ignore nl_func_scope_name = ignore nl_func_proto_type_name = ignore nl_func_paren = ignore +nl_func_paren_empty = ignore nl_func_def_paren = ignore +nl_func_def_paren_empty = ignore +nl_func_call_paren = ignore +nl_func_call_paren_empty = ignore nl_func_decl_start = ignore nl_func_def_start = ignore nl_func_decl_start_single = ignore @@ -366,6 +377,7 @@ nl_func_decl_end_multi_line = false nl_func_def_end_multi_line = false nl_func_decl_empty = ignore nl_func_def_empty = ignore +nl_func_call_empty = ignore nl_func_call_start_multi_line = false nl_func_call_args_multi_line = false nl_func_call_end_multi_line = false @@ -463,8 +475,12 @@ ls_code_width = false align_keep_tabs = false align_with_tabs = true align_on_tabstop = false +align_number_right = false align_keep_extra_space = false align_func_params = false +align_func_params_span = 0 +align_func_params_thresh = 0 +align_func_params_gap = 0 align_same_func_call_params = false align_var_def_span = 0 align_var_def_star_style = 0 @@ -581,6 +597,10 @@ pp_indent_if = 0 pp_if_indent_code = false pp_define_at_level = false pp_ignore_define_body = false +pp_indent_case = true +pp_indent_func_def = true +pp_indent_extern = true +pp_indent_brace = true include_category_0 = "" include_category_1 = "" include_category_2 = "" @@ -591,5 +611,5 @@ warn_level_tabs_found_in_verbatim_string_literals = 2 macro-open ASN1_ITEM_TEMPLATE macro-close ASN1_ITEM_TEMPLATE_END set PRIVATE Q_SIGNALS -# option(s) with 'not default' value: 150 +# option(s) with 'not default' value: 151 #