-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Verify file w/o identity, support additional chipsets
There is no mention of version in the project. Add VERSION file under revision control to track it. Add support for Actalis and Bit4id cards to middleware. Move ATR handling logic to dedicated unit. Signature info is missing id-aa-signingCertificateV2 attribute. Add it. Verifying a file in CIEID requires selecting an associated identity. Use a separate flow instead. Remove build dependencies and static library as in macOS and Windows repositories.
- Loading branch information
Showing
371 changed files
with
1,172 additions
and
124,542 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
13 changes: 13 additions & 0 deletions
13
TestCIE/.settings/org.eclipse.cdt.managedbuilder.core.prefs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
eclipse.preferences.version=1 | ||
environment/buildEnvironmentInclude/cdt.managedbuild.config.gnu.exe.debug.1271518045/CPATH/delimiter=\: | ||
environment/buildEnvironmentInclude/cdt.managedbuild.config.gnu.exe.debug.1271518045/CPATH/operation=remove | ||
environment/buildEnvironmentInclude/cdt.managedbuild.config.gnu.exe.debug.1271518045/CPLUS_INCLUDE_PATH/delimiter=\: | ||
environment/buildEnvironmentInclude/cdt.managedbuild.config.gnu.exe.debug.1271518045/CPLUS_INCLUDE_PATH/operation=remove | ||
environment/buildEnvironmentInclude/cdt.managedbuild.config.gnu.exe.debug.1271518045/C_INCLUDE_PATH/delimiter=\: | ||
environment/buildEnvironmentInclude/cdt.managedbuild.config.gnu.exe.debug.1271518045/C_INCLUDE_PATH/operation=remove | ||
environment/buildEnvironmentInclude/cdt.managedbuild.config.gnu.exe.debug.1271518045/append=true | ||
environment/buildEnvironmentInclude/cdt.managedbuild.config.gnu.exe.debug.1271518045/appendContributed=true | ||
environment/buildEnvironmentLibrary/cdt.managedbuild.config.gnu.exe.debug.1271518045/LIBRARY_PATH/delimiter=\: | ||
environment/buildEnvironmentLibrary/cdt.managedbuild.config.gnu.exe.debug.1271518045/LIBRARY_PATH/operation=remove | ||
environment/buildEnvironmentLibrary/cdt.managedbuild.config.gnu.exe.debug.1271518045/append=true | ||
environment/buildEnvironmentLibrary/cdt.managedbuild.config.gnu.exe.debug.1271518045/appendContributed=true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
1.4.3-2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
#include "ATR.h" | ||
#include "../LOGGER/Logger.h" | ||
#include <algorithm> | ||
|
||
using namespace CieIDLogger; | ||
|
||
cie_atr atr_list[] = { | ||
{CIE_Type::CIE_NXP, "NXP", { 0x80, 0x31, 0x80, 0x65, 0x49, 0x54, 0x4E, 0x58, 0x50, 0x12, 0x0F, 0xFF, 0x82, 0x90, 0xF0 }}, | ||
{CIE_Type::CIE_Gemalto, "Gemalto", { 0x80, 0x31, 0x80, 0x65, 0xB0, 0x85, 0x04, 0x00, 0x11 }}, | ||
{CIE_Type::CIE_Gemalto, "Gemalto2", {0x80, 0x31, 0x80, 0x65, 0xB0, 0x85, 0x03, 0x00, 0xEF }}, | ||
{CIE_Type::CIE_STM,"STM", {0x80, 0x66, 0x47, 0x50, 0x00, 0xB8, 0x00, 0x7F }}, | ||
{CIE_Type::CIE_STM2,"STM2", { 0x80, 0x80, 0x01, 0x01 }}, | ||
{CIE_Type::CIE_STM3,"STM3", {0x80, 0x01, 0x80, 0x66, 0x47, 0x50, 0x00, 0xB8, 0x00, 0x94, 0x82, 0x90, 0x00, 0xC5 }}, | ||
{CIE_Type::CIE_ACTALIS,"Actalis", {0x80, 0x01, 0x80, 0x31, 0x80, 0x65, 0x49, 0x54, 0x4a, 0x34, 0x41, 0x12, 0x0f, 0xff, 0x82, 0x90, 0x00, 0x88 }}, | ||
{CIE_Type::CIE_BIT4ID, "Bit4Id", {0x80, 0x01, 0x80, 0x31, 0x80, 0x65, 0x49, 0x54, 0x4a, 0x34, 0x42, 0x12, 0x0f, 0xff, 0x82, 0x90, 0x00, 0x8b }} | ||
}; | ||
|
||
|
||
template <typename T> | ||
bool IsSubset(std::vector<T> A, std::vector<T> B) | ||
{ | ||
if (A.size() < B.size()) | ||
return false; | ||
|
||
sort(A.begin(), A.end()); | ||
sort(B.begin(), B.end()); | ||
return includes(A.begin(), A.end(), B.begin(), B.end()); | ||
} | ||
|
||
string get_manufacturer(vector<uint8_t> atr) { | ||
|
||
for (cie_atr el : atr_list) { | ||
if (IsSubset(atr, el.atr)) { | ||
LOG_INFO("ReadCIEType - CIE %s detected", el.type.c_str()); | ||
return el.type; | ||
} | ||
} | ||
|
||
return ""; | ||
} | ||
|
||
CIE_Type get_type(vector<uint8_t> atr) { | ||
|
||
|
||
for (cie_atr el : atr_list) { | ||
if (IsSubset(atr, el.atr)) { | ||
return el.cie_type; | ||
} | ||
} | ||
|
||
return CIE_Type::CIE_Unknown; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
#ifndef _CIE_ATR_H_ | ||
#define _CIE_ATR_H_ | ||
|
||
#include <iostream> | ||
#include <string> | ||
#include <vector> | ||
#include <stdint.h> | ||
|
||
using namespace std; | ||
|
||
enum CIE_Type { | ||
CIE_Unknown, | ||
CIE_Gemalto, | ||
CIE_STM, | ||
CIE_STM2, | ||
CIE_STM3, | ||
CIE_NXP, | ||
CIE_ACTALIS, | ||
CIE_BIT4ID | ||
}; | ||
|
||
typedef struct _cie_atr { | ||
CIE_Type cie_type; | ||
string type; | ||
vector<uint8_t> atr; | ||
}cie_atr; | ||
|
||
|
||
string get_manufacturer(vector<uint8_t> atr); | ||
CIE_Type get_type(vector<uint8_t> atr); | ||
|
||
#endif // _CIE_ATR_H_ | ||
|
Oops, something went wrong.