Skip to content

Commit

Permalink
Add web-eid to diagnostics (#64)
Browse files Browse the repository at this point in the history
IB-7183

Signed-off-by: Raul Metsma <[email protected]>
  • Loading branch information
metsma authored Nov 29, 2021
1 parent 15830ef commit fae9457
Show file tree
Hide file tree
Showing 8 changed files with 125 additions and 54 deletions.
31 changes: 21 additions & 10 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ jobs:
runs-on: macos-latest
env:
MAKEFLAGS: -j3
MACOSX_DEPLOYMENT_TARGET: '10.13'
MACOSX_DEPLOYMENT_TARGET: '10.14'
steps:
- name: Checkout
uses: actions/checkout@v2
Expand All @@ -18,7 +18,7 @@ jobs:
run: |
mkdir build
cd build
cmake ..
cmake -DCMAKE_OSX_ARCHITECTURES="x86_64;arm64" ..
cmake --build . --target pkgbuild
- name: Archive artifacts
uses: actions/upload-artifact@v2
Expand All @@ -27,15 +27,27 @@ jobs:
path: build/*.pkg
windows:
name: Build on Windows
runs-on: windows-latest
runs-on: ${{ matrix.image }}
strategy:
matrix:
arch: [x86, x64]
build: [VC17x86, VC17x64, VC19x86, VC19x64]
include:
- arch: x86
- build: VC17x86
arch: x86
qt: win32_msvc2017
- arch: x64
image: 'windows-2016'
- build: VC17x64
arch: x64
qt: win64_msvc2017_64
image: 'windows-2016'
- build: VC19x86
arch: x86
qt: win32_msvc2017
image: 'windows-2019'
- build: VC19x64
arch: x64
qt: win64_msvc2017_64
image: 'windows-2019'
steps:
- name: Checkout
uses: actions/checkout@v2
Expand All @@ -46,18 +58,17 @@ jobs:
id: runvcpkg
with:
vcpkgArguments: openssl
vcpkgGitCommitId: 18376a2f2ce989e022db5c1199b468e43f7c1a79
vcpkgGitCommitId: 772d435ba18bf2f342458e0187ab7b48b84fe3f0
vcpkgTriplet: ${{ matrix.arch }}-windows
- name: Install Qt
uses: jurplel/install-qt-action@v2
with:
version: '5.12.10'
version: '5.12.11'
arch: ${{ matrix.qt }}
- name: Setup dev env
uses: ilammy/msvc-dev-cmd@v1
with:
arch: ${{ matrix.arch }}
toolset: 14.16
- name: Build
run: |
mkdir build
Expand All @@ -69,4 +80,4 @@ jobs:
uses: actions/upload-artifact@v2
with:
name: msi
path: build/*.msi
path: build/*.msi
8 changes: 4 additions & 4 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ cmake_minimum_required(VERSION 3.16)
if(POLICY CMP0074)
cmake_policy(SET CMP0074 NEW)
endif()
project(id-updater VERSION 3.13.2)
project(id-updater VERSION 3.13.3)

set(CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake/modules")

Expand Down Expand Up @@ -73,14 +73,15 @@ if( APPLE )
COMMAND cp $<TARGET_FILE:id-updater-helper> $<TARGET_BUNDLE_CONTENT_DIR:${PROGNAME}>/Resources )
install( TARGETS ${PROGNAME} DESTINATION /Library/PreferencePanes )

add_custom_target( signhelper DEPENDS ${PROGNAME} )
if(SIGNCERT)
add_custom_command( TARGET ${PROGNAME} POST_BUILD
add_custom_command( TARGET signhelper POST_BUILD
COMMAND codesign -f --options=runtime -s "Developer ID Application: ${SIGNCERT}"
$<TARGET_BUNDLE_CONTENT_DIR:${PROGNAME}>/Resources/id-updater-helper
$<TARGET_BUNDLE_DIR:${PROGNAME}>
)
endif()
add_custom_target( pkgbuild DEPENDS ${PROGNAME}
add_custom_target( pkgbuild DEPENDS signhelper
COMMAND make install DESTDIR=install
COMMAND chmod 755 install/Library/PreferencePanes/ID-updater.prefPane/Contents/Resources/id-updater-helper
COMMAND pkgbuild --root install "$<$<BOOL:${SIGNCERT}>:--sign;${SIGNCERT}>" updater_${VERSION}$ENV{VER_SUFFIX}.pkg
Expand Down Expand Up @@ -137,7 +138,6 @@ else()
target_link_libraries( ${PROGNAME} Qt5::Widgets Qt5::Network qtsingleapplication OpenSSL::Crypto
msi Mstask Userenv wintrust Crypt32 taskschd comsupp ws2_32 Setupapi winscard Wtsapi32
)
add_manifest( ${PROGNAME} )

if(CMAKE_SIZEOF_VOID_P EQUAL 8)
set(PLATFORM x64)
Expand Down
2 changes: 1 addition & 1 deletion cmake
2 changes: 1 addition & 1 deletion common
Submodule common updated 4 files
+10 −7 CMakeLists.txt
+31 −98 Common.cpp
+0 −1 Common.h
+7 −1 QPCSC.cpp
37 changes: 28 additions & 9 deletions prefPane/en.lproj/Localizable.strings
Original file line number Diff line number Diff line change
@@ -1,3 +1,15 @@
/* No comment provided by engineer. */
"Chrome browser extension (Web-eID)" = "Chrome browser extension (Web-eID)";

/* No comment provided by engineer. */
"Chrome browser extension policy (Web-eID)" = "Chrome browser extension policy (Web-eID)";

/* No comment provided by engineer. */
"Chrome browser plugin" = "Chrome browser plugin";

/* No comment provided by engineer. */
"Chrome browser plugin policy" = "Chrome browser plugin policy";

/* No comment provided by engineer. */
"Chrome/Firefox browser plugin" = "Chrome/Firefox browser plugin";

Expand All @@ -17,10 +29,16 @@
"Failed to open xar archive: %@" = "Failed to open xar archive: %@";

/* No comment provided by engineer. */
"Failed to parse certificate" = "Failed to parse certificate";
"Failed to verify signature" = "Failed to verify signature";

/* No comment provided by engineer. */
"Failed to verify signature" = "Failed to verify signature";
"File not found" = "File not found";

/* No comment provided by engineer. */
"Firefox browser extension (Web-eID)" = "Firefox browser extension (Web-eID)";

/* No comment provided by engineer. */
"Firefox browser plugin" = "Firefox browser plugin";

/* No comment provided by engineer. */
"https://www.id.ee/en/article/id-software-versions-info-release-notes/" = "https://www.id.ee/en/article/id-software-versions-info-release-notes/";
Expand All @@ -29,16 +47,16 @@
"ID-Card Utility" = "ID-Card Utility";

/* No comment provided by engineer. */
"No matching certificate" = "No matching certificate";
"ID-software" = "ID-software";

/* No comment provided by engineer. */
"PKCS11" = "PKCS11";
"IDEMIA PKCS11 loader" = "IDEMIA PKCS11 loader";

/* No comment provided by engineer. */
"PKCS11 loader" = "PKCS11 loader";
"No matching certificate" = "No matching certificate";

/* No comment provided by engineer. */
"IDEMIA PKCS11 loader" = "IDEMIA PKCS11 loader";
"PKCS11 loader" = "PKCS11 loader";

/* No comment provided by engineer. */
"Safari (Extensions) browser plugin" = "Safari (Extensions) browser plugin";
Expand All @@ -47,10 +65,10 @@
"Safari (NPAPI) browser plugin" = "Safari (NPAPI) browser plugin";

/* No comment provided by engineer. */
"The configuration file located on the server cannot be validated." = "The configuration file located on the server cannot be validated.";
"Safari browser extension (Web-eID)" = "Safari browser extension (Web-eID)";

/* No comment provided by engineer. */
"Tokend" = "Tokend";
"The configuration file located on the server cannot be validated." = "The configuration file located on the server cannot be validated.";

/* No comment provided by engineer. */
"Update available" = "Update available";
Expand All @@ -59,4 +77,5 @@
"Update message" = "Update message";

/* No comment provided by engineer. */
"ID-software" = "ID-software";
"Web-eID native component" = "Web-eID native component";

37 changes: 28 additions & 9 deletions prefPane/et.lproj/Localizable.strings
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,18 @@
/* Class = "NSMenuItem"; title = "Once a week"; ObjectID = "wj9-Or-Pru"; */
"Once a week" = "Kord nädalas";

/* No comment provided by engineer. */
"Chrome browser extension (Web-eID)" = "Chrome browser extension (Web-eID)";

/* No comment provided by engineer. */
"Chrome browser extension policy (Web-eID)" = "Chrome browser extension policy (Web-eID)";

/* No comment provided by engineer. */
"Chrome browser plugin" = "Chrome browser plugin";

/* No comment provided by engineer. */
"Chrome browser plugin policy" = "Chrome browser plugin policy";

/* No comment provided by engineer. */
"Chrome/Firefox browser plugin" = "Chrome/Firefox browser plugin";

Expand All @@ -62,10 +74,16 @@
"Failed to open xar archive: %@" = "Failed to open xar archive: %@";

/* No comment provided by engineer. */
"Failed to parse certificate" = "Failed to parse certificate";
"Failed to verify signature" = "Failed to verify signature";

/* No comment provided by engineer. */
"Failed to verify signature" = "Failed to verify signature";
"File not found" = "File not found";

/* No comment provided by engineer. */
"Firefox browser extension (Web-eID)" = "Firefox browser extension (Web-eID)";

/* No comment provided by engineer. */
"Firefox browser plugin" = "Firefox browser plugin";

/* No comment provided by engineer. */
"https://www.id.ee/en/article/id-software-versions-info-release-notes/" = "https://www.id.ee/artikkel/id-tarkvara-versioonide-info-release-notes/";
Expand All @@ -74,16 +92,16 @@
"ID-Card Utility" = "ID-Card Utility";

/* No comment provided by engineer. */
"No matching certificate" = "No matching certificate";
"ID-software" = "ID-tarkvara";

/* No comment provided by engineer. */
"PKCS11" = "PKCS11";
"IDEMIA PKCS11 loader" = "IDEMIA PKCS11 loader";

/* No comment provided by engineer. */
"PKCS11 loader" = "PKCS11 loader";
"No matching certificate" = "No matching certificate";

/* No comment provided by engineer. */
"IDEMIA PKCS11 loader" = "IDEMIA PKCS11 loader";
"PKCS11 loader" = "PKCS11 loader";

/* No comment provided by engineer. */
"Safari (Extensions) browser plugin" = "Safari (Extensions) browser plugin";
Expand All @@ -92,10 +110,10 @@
"Safari (NPAPI) browser plugin" = "Safari (NPAPI) browser plugin";

/* No comment provided by engineer. */
"The configuration file located on the server cannot be validated." = "Serveris olev konfiguratsioonifail ei valideeru.";
"Safari browser extension (Web-eID)" = "Safari browser extension (Web-eID)";

/* No comment provided by engineer. */
"Tokend" = "Tokend";
"The configuration file located on the server cannot be validated." = "Serveris olev konfiguratsioonifail ei valideeru.";

/* No comment provided by engineer. */
"Update available" = "Uuendus on saadaval";
Expand All @@ -104,4 +122,5 @@
"Update message" = "Update message";

/* No comment provided by engineer. */
"ID-software" = "ID-tarkvara";
"Web-eID native component" = "Web-eID native component";

24 changes: 14 additions & 10 deletions prefPane/id-updater.m
Original file line number Diff line number Diff line change
Expand Up @@ -95,21 +95,26 @@ - (void)mainViewDidLoad {
NSLocalizedString(@"DigiDoc3 Client", nil): update.clientversion,
NSLocalizedString(@"DigiDoc4", nil): update.digidoc4,
NSLocalizedString(@"ID-Card Utility", nil): update.utilityversion,
NSLocalizedString(@"Open-EID", nil): update.baseversion,
NSLocalizedString(@"ID-Updater", nil): [update versionInfo:@"ee.ria.ID-updater"],
@"Open-EID": update.baseversion,
@"ID-Updater": [update versionInfo:@"ee.ria.ID-updater"],
NSLocalizedString(@"Safari (Extensions) browser plugin", nil): [update versionInfo:@"ee.ria.safari-token-signing"],
NSLocalizedString(@"Safari (NPAPI) browser plugin", nil): [update versionInfo:@"ee.ria.firefox-token-signing"],
NSLocalizedString(@"Chrome/Firefox browser plugin", nil): [update versionInfo:@"ee.ria.chrome-token-signing"],
NSLocalizedString(@"Chrome browser plugin", nil): [update versionInfo:@"ee.ria.token-signing-chrome"],
NSLocalizedString(@"Chrome browser plugin policy", nil): [update versionInfo:@"ee.ria.token-signing-chrome-policy"],
NSLocalizedString(@"Firefox browser plugin", nil): [update versionInfo:@"ee.ria.token-signing-firefox"],
NSLocalizedString(@"Web-eID native component", nil): [update versionInfo:@"eu.web-eid.web-eid"],
NSLocalizedString(@"Safari browser extension (Web-eID)", nil): [update versionInfo:@"eu.web-eid.web-eid-safari"],
NSLocalizedString(@"Chrome browser extension (Web-eID)", nil): [update versionInfo:@"eu.web-eid.web-eid-chrome"],
NSLocalizedString(@"Chrome browser extension policy (Web-eID)", nil): [update versionInfo:@"eu.web-eid.web-eid-chrome-policy"],
NSLocalizedString(@"Firefox browser extension (Web-eID)", nil): [update versionInfo:@"eu.web-eid.web-eid-firefox"],
NSLocalizedString(@"PKCS11 loader", nil): [update versionInfo:@"ee.ria.firefox-pkcs11-loader"],
NSLocalizedString(@"IDEMIA PKCS11 loader", nil): [update versionInfo:@"com.idemia.awp.xpi"],
NSLocalizedString(@"OpenSC", nil): [update versionInfo:@"org.opensc-project.mac"],
NSLocalizedString(@"IDEMIA PKCS11", nil): [update versionInfo:@"com.idemia.awp.pkcs11"],
NSLocalizedString(@"EstEID Tokend", nil): [update versionInfo:@"ee.ria.esteid-tokend"],
NSLocalizedString(@"EstEID CTK Tokend", nil): [update versionInfo:@"ee.ria.esteid-ctk-tokend"],
NSLocalizedString(@"IDEMIA Tokend", nil): [update versionInfo:@"com.idemia.awp.tokend"],
@"OpenSC": [update versionInfo:@"org.opensc-project.mac"],
@"IDEMIA PKCS11": [update versionInfo:@"com.idemia.awp.pkcs11"],
@"EstEID Tokend": [update versionInfo:@"ee.ria.esteid-tokend"],
@"EstEID CTK Tokend": [update versionInfo:@"ee.ria.esteid-ctk-tokend"],
@"IDEMIA Tokend": [update versionInfo:@"com.idemia.awp.tokend"],
};
NSMutableArray *list = [[NSMutableArray alloc] init];
[versions enumerateKeysAndObjectsUsingBlock:^(id key, id object, BOOL *stop) {
Expand Down Expand Up @@ -270,10 +275,9 @@ - (void)URLSession:(NSURLSession *)session downloadTask:(NSURLSessionDownloadTas
}

SecCertificateRef certref = SecCertificateCreateWithData(0, (__bridge CFDataRef)certData);
SecKeyRef publickey = nil;
OSStatus oserr = SecCertificateCopyPublicKey(certref, &publickey);
SecKeyRef publickey = SecCertificateCopyKey(certref);
CFRelease(certref);
if (oserr) {
if (publickey == nil) {
status.stringValue = NSLocalizedString(@"Failed to copy public key", nil);
return;
}
Expand Down
Loading

0 comments on commit fae9457

Please sign in to comment.