diff --git a/VS_2019/beid.sln b/VS_2019/beid.sln
new file mode 100644
index 000000000..8060a34af
--- /dev/null
+++ b/VS_2019/beid.sln
@@ -0,0 +1,61 @@
+
+Microsoft Visual Studio Solution File, Format Version 12.00
+# Visual Studio Version 16
+VisualStudioVersion = 16.0.30204.135
+MinimumVisualStudioVersion = 10.0.40219.1
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "mdrv", "..\cardcomm\minidriver\VS_2019\beidmdrv.vcxproj", "{479FFA33-2B41-4A15-8192-A41F9FBE3D6A}"
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "pkcs11", "..\cardcomm\pkcs11\VS_2019\beidpkcs11.vcxproj", "{12F6CD4F-FC01-4E0A-AE06-F7A315094DFE}"
+EndProject
+Global
+ GlobalSection(SolutionConfigurationPlatforms) = preSolution
+ Debug|x64 = Debug|x64
+ Debug|x86 = Debug|x86
+ PKCS11_FF_DEBUG|x64 = PKCS11_FF_DEBUG|x64
+ PKCS11_FF_DEBUG|x86 = PKCS11_FF_DEBUG|x86
+ PKCS11_FF_Release|x64 = PKCS11_FF_Release|x64
+ PKCS11_FF_Release|x86 = PKCS11_FF_Release|x86
+ Release|x64 = Release|x64
+ Release|x86 = Release|x86
+ EndGlobalSection
+ GlobalSection(ProjectConfigurationPlatforms) = postSolution
+ {479FFA33-2B41-4A15-8192-A41F9FBE3D6A}.Debug|x64.ActiveCfg = Debug|x64
+ {479FFA33-2B41-4A15-8192-A41F9FBE3D6A}.Debug|x64.Build.0 = Debug|x64
+ {479FFA33-2B41-4A15-8192-A41F9FBE3D6A}.Debug|x86.ActiveCfg = Debug|Win32
+ {479FFA33-2B41-4A15-8192-A41F9FBE3D6A}.Debug|x86.Build.0 = Debug|Win32
+ {479FFA33-2B41-4A15-8192-A41F9FBE3D6A}.PKCS11_FF_DEBUG|x64.ActiveCfg = Release|x64
+ {479FFA33-2B41-4A15-8192-A41F9FBE3D6A}.PKCS11_FF_DEBUG|x64.Build.0 = Release|x64
+ {479FFA33-2B41-4A15-8192-A41F9FBE3D6A}.PKCS11_FF_DEBUG|x86.ActiveCfg = Release|Win32
+ {479FFA33-2B41-4A15-8192-A41F9FBE3D6A}.PKCS11_FF_DEBUG|x86.Build.0 = Release|Win32
+ {479FFA33-2B41-4A15-8192-A41F9FBE3D6A}.PKCS11_FF_Release|x64.ActiveCfg = Release|x64
+ {479FFA33-2B41-4A15-8192-A41F9FBE3D6A}.PKCS11_FF_Release|x64.Build.0 = Release|x64
+ {479FFA33-2B41-4A15-8192-A41F9FBE3D6A}.PKCS11_FF_Release|x86.ActiveCfg = Release|Win32
+ {479FFA33-2B41-4A15-8192-A41F9FBE3D6A}.PKCS11_FF_Release|x86.Build.0 = Release|Win32
+ {479FFA33-2B41-4A15-8192-A41F9FBE3D6A}.Release|x64.ActiveCfg = Release|x64
+ {479FFA33-2B41-4A15-8192-A41F9FBE3D6A}.Release|x64.Build.0 = Release|x64
+ {479FFA33-2B41-4A15-8192-A41F9FBE3D6A}.Release|x86.ActiveCfg = Release|Win32
+ {479FFA33-2B41-4A15-8192-A41F9FBE3D6A}.Release|x86.Build.0 = Release|Win32
+ {12F6CD4F-FC01-4E0A-AE06-F7A315094DFE}.Debug|x64.ActiveCfg = Debug|x64
+ {12F6CD4F-FC01-4E0A-AE06-F7A315094DFE}.Debug|x64.Build.0 = Debug|x64
+ {12F6CD4F-FC01-4E0A-AE06-F7A315094DFE}.Debug|x86.ActiveCfg = Debug|Win32
+ {12F6CD4F-FC01-4E0A-AE06-F7A315094DFE}.Debug|x86.Build.0 = Debug|Win32
+ {12F6CD4F-FC01-4E0A-AE06-F7A315094DFE}.PKCS11_FF_DEBUG|x64.ActiveCfg = PKCS11_FF_DEBUG|x64
+ {12F6CD4F-FC01-4E0A-AE06-F7A315094DFE}.PKCS11_FF_DEBUG|x64.Build.0 = PKCS11_FF_DEBUG|x64
+ {12F6CD4F-FC01-4E0A-AE06-F7A315094DFE}.PKCS11_FF_DEBUG|x86.ActiveCfg = PKCS11_FF_DEBUG|Win32
+ {12F6CD4F-FC01-4E0A-AE06-F7A315094DFE}.PKCS11_FF_DEBUG|x86.Build.0 = PKCS11_FF_DEBUG|Win32
+ {12F6CD4F-FC01-4E0A-AE06-F7A315094DFE}.PKCS11_FF_Release|x64.ActiveCfg = PKCS11_FF_Release|x64
+ {12F6CD4F-FC01-4E0A-AE06-F7A315094DFE}.PKCS11_FF_Release|x64.Build.0 = PKCS11_FF_Release|x64
+ {12F6CD4F-FC01-4E0A-AE06-F7A315094DFE}.PKCS11_FF_Release|x86.ActiveCfg = PKCS11_FF_Release|Win32
+ {12F6CD4F-FC01-4E0A-AE06-F7A315094DFE}.PKCS11_FF_Release|x86.Build.0 = PKCS11_FF_Release|Win32
+ {12F6CD4F-FC01-4E0A-AE06-F7A315094DFE}.Release|x64.ActiveCfg = Release|x64
+ {12F6CD4F-FC01-4E0A-AE06-F7A315094DFE}.Release|x64.Build.0 = Release|x64
+ {12F6CD4F-FC01-4E0A-AE06-F7A315094DFE}.Release|x86.ActiveCfg = Release|Win32
+ {12F6CD4F-FC01-4E0A-AE06-F7A315094DFE}.Release|x86.Build.0 = Release|Win32
+ EndGlobalSection
+ GlobalSection(SolutionProperties) = preSolution
+ HideSolutionNode = FALSE
+ EndGlobalSection
+ GlobalSection(ExtensibilityGlobals) = postSolution
+ SolutionGuid = {0EC9E511-2A5A-4C32-8EB6-B55B3275EBDD}
+ EndGlobalSection
+EndGlobal
diff --git a/cardcomm/ctkToken/BEIDToken/TokenSession.m b/cardcomm/ctkToken/BEIDToken/TokenSession.m
index 1c415f9dd..7fb673e70 100644
--- a/cardcomm/ctkToken/BEIDToken/TokenSession.m
+++ b/cardcomm/ctkToken/BEIDToken/TokenSession.m
@@ -166,9 +166,9 @@ - (uint8_t)pinDigit:(uint8_t) digit
if ('0' <= digit && digit <= '9')
return digit - '0';
else if ('A' <= digit && digit <= 'F')
- return digit - 'A' + 0x10;
+ return digit - 'A' + 0x0A;
else if ('a' <= digit && digit <= 'f')
- return digit - 'a' + 0x10;
+ return digit - 'a' + 0x0A;
else {
os_log_error(OS_LOG_DEFAULT, "BEID impossible PIN digit enterred");
return 0xFF;
diff --git a/cardcomm/minidriver/VS_2019/beidmdrv.vcxproj b/cardcomm/minidriver/VS_2019/beidmdrv.vcxproj
new file mode 100644
index 000000000..69149818b
--- /dev/null
+++ b/cardcomm/minidriver/VS_2019/beidmdrv.vcxproj
@@ -0,0 +1,342 @@
+
+
+
+
+ Debug
+ Win32
+
+
+ Debug
+ x64
+
+
+ Release
+ Win32
+
+
+ Release
+ x64
+
+
+
+ mdrv
+ {479FFA33-2B41-4A15-8192-A41F9FBE3D6A}
+ beidmdrv
+ 10.0
+
+
+
+ DynamicLibrary
+ false
+ Unicode
+ true
+ v142
+
+
+ DynamicLibrary
+ Unicode
+ v142
+ false
+
+
+ DynamicLibrary
+ false
+ true
+ Unicode
+ v142
+
+
+ DynamicLibrary
+ false
+ Unicode
+ v142
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ <_ProjectFileVersion>10.0.30319.1
+ Binaries\$(Platform)_$(Configuration)\
+ $(Platform)_$(Configuration)\
+ true
+ Binaries\$(Platform)_$(Configuration)\
+ $(Platform)_$(Configuration)\
+ true
+ Binaries\$(Platform)_$(Configuration)\
+ $(Platform)_$(Configuration)\
+ false
+ Binaries\$(Platform)_$(Configuration)\
+ $(Platform)_$(Configuration)\
+ false
+ beid$(ProjectName)32
+ beid$(ProjectName)32D
+ beid$(ProjectName)64
+ beid$(ProjectName)64D
+
+
+
+ Disabled
+ ..\src\inc;%(AdditionalIncludeDirectories)
+ NO_DIALOGS;_CRT_SECURE_NO_WARNINGS;_CRT_NON_CONFORMING_SWPRINTFS;%(PreprocessorDefinitions)
+ true
+ EnableFastChecks
+ MultiThreadedDebugDLL
+ $(IntDir)
+ $(IntDir)
+ $(IntDir)
+ Level3
+ true
+ EditAndContinue
+ /w35045 %(AdditionalOptions)
+
+
+ _DEBUG;%(PreprocessorDefinitions)
+ 0x0813
+
+
+ winscard.lib;Crypt32.lib;Advapi32.lib
+ Binaries\$(Platform)_$(Configuration)\beid$(ProjectName)32D.dll
+ true
+ ..\src\res\beidmdrv.def
+ true
+ false
+
+
+ MachineX86
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Disabled
+ ..\src\inc;%(AdditionalIncludeDirectories)
+ NO_DIALOGS;_CRT_SECURE_NO_WARNINGS;_CRT_NON_CONFORMING_SWPRINTFS;%(PreprocessorDefinitions)
+ true
+ EnableFastChecks
+ MultiThreadedDebug
+ $(IntDir)
+ $(IntDir)
+ $(IntDir)
+ Level3
+ true
+ ProgramDatabase
+ /w35045 %(AdditionalOptions)
+
+
+ _DEBUG;%(PreprocessorDefinitions)
+ 0x0813
+
+
+ winscard.lib;Crypt32.lib;Advapi32.lib
+ Binaries\$(Platform)_$(Configuration)\beid$(ProjectName)64D.dll
+ true
+ %(AdditionalLibraryDirectories)
+ ..\src\res\beidmdrv.def
+ true
+ false
+
+
+ MachineX64
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ MaxSpeed
+ OnlyExplicitInline
+ ..\src\inc;%(AdditionalIncludeDirectories)
+ NO_DIALOGS;_CRT_SECURE_NO_WARNINGS;_CRT_NON_CONFORMING_SWPRINTFS;%(PreprocessorDefinitions)
+ true
+ MultiThreaded
+ true
+ $(IntDir)
+ $(IntDir)
+ $(IntDir)
+ Level3
+ true
+ /w35045 %(AdditionalOptions)
+
+
+ NDEBUG;%(PreprocessorDefinitions)
+ 0x0813
+
+
+ winscard.lib;Crypt32.lib;Advapi32.lib
+ Binaries\$(Platform)_$(Configuration)\beid$(ProjectName)32.dll
+ true
+ ..\src\res\beidmdrv.def
+ false
+
+
+ MachineX86
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ MaxSpeed
+ OnlyExplicitInline
+ ..\src\inc;%(AdditionalIncludeDirectories)
+ NO_DIALOGS;_CRT_SECURE_NO_WARNINGS;_CRT_NON_CONFORMING_SWPRINTFS;%(PreprocessorDefinitions)
+ true
+ MultiThreaded
+ true
+ $(IntDir)
+ $(IntDir)
+ $(IntDir)
+ Level3
+ true
+ /w35045 %(AdditionalOptions)
+
+
+ NDEBUG;%(PreprocessorDefinitions)
+ 0x0813
+
+
+ winscard.lib;Crypt32.lib;Advapi32.lib
+ Binaries\$(Platform)_$(Configuration)\beid$(ProjectName)64.dll
+ true
+ ..\src\res\beidmdrv.def
+ false
+
+
+ MachineX64
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ %(PreprocessorDefinitions)
+ %(PreprocessorDefinitions)
+ %(PreprocessorDefinitions)
+ %(PreprocessorDefinitions)
+
+
+ %(PreprocessorDefinitions)
+ %(PreprocessorDefinitions)
+ %(PreprocessorDefinitions)
+ %(PreprocessorDefinitions)
+
+
+ %(PreprocessorDefinitions)
+ %(PreprocessorDefinitions)
+ %(PreprocessorDefinitions)
+ %(PreprocessorDefinitions)
+
+
+
+ %(PreprocessorDefinitions)
+ %(PreprocessorDefinitions)
+ %(PreprocessorDefinitions)
+ %(PreprocessorDefinitions)
+
+
+
+
+ %(PreprocessorDefinitions)
+ %(PreprocessorDefinitions)
+ %(PreprocessorDefinitions)
+ %(PreprocessorDefinitions)
+
+
+ %(PreprocessorDefinitions)
+ %(PreprocessorDefinitions)
+ %(PreprocessorDefinitions)
+ %(PreprocessorDefinitions)
+
+
+ %(PreprocessorDefinitions)
+ %(PreprocessorDefinitions)
+ %(PreprocessorDefinitions)
+ %(PreprocessorDefinitions)
+
+
+ %(PreprocessorDefinitions)
+ %(PreprocessorDefinitions)
+ %(PreprocessorDefinitions)
+ %(PreprocessorDefinitions)
+
+
+
+ %(PreprocessorDefinitions)
+ %(PreprocessorDefinitions)
+ %(PreprocessorDefinitions)
+ %(PreprocessorDefinitions)
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/cardcomm/pkcs11/VS_2019/beidpkcs11.rc b/cardcomm/pkcs11/VS_2019/beidpkcs11.rc
new file mode 100644
index 000000000..ed79bfe0f
--- /dev/null
+++ b/cardcomm/pkcs11/VS_2019/beidpkcs11.rc
@@ -0,0 +1,59 @@
+// Microsoft Visual C++ generated resource script.
+//
+//#include "resource.h"
+
+#include "..\..\..\scripts\windows\beidversions.h"
+
+#define APSTUDIO_READONLY_SYMBOLS
+#include "windows.h"
+#undef APSTUDIO_READONLY_SYMBOLS
+
+/////////////////////////////////////////////////////////////////////////////
+// English (U.K.) resources
+
+#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENG)
+#ifdef _WIN32
+LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_UK
+#pragma code_page(1252)
+#endif //_WIN32
+
+/////////////////////////////////////////////////////////////////////////////
+//
+// Version
+//
+
+VS_VERSION_INFO VERSIONINFO
+ FILEVERSION WIN_PKCS11_VERSION1,WIN_PKCS11_VERSION2,WIN_PKCS11_VERSION3,WIN_PKCS11_VERSION4
+ PRODUCTVERSION WIN_PKCS11_VERSION1,WIN_PKCS11_VERSION2,WIN_PKCS11_VERSION3,WIN_PKCS11_VERSION4
+ FILEFLAGSMASK 0x17L
+#ifdef _DEBUG
+ FILEFLAGS 0x1L
+#else
+ FILEFLAGS 0x0L
+#endif
+ FILEOS 0x4L
+ FILETYPE 0x2L
+ FILESUBTYPE 0x0L
+BEGIN
+ BLOCK "StringFileInfo"
+ BEGIN
+ BLOCK "080904b0"
+ BEGIN
+ VALUE "FileDescription", "pkcs11 Dynamic Link Library"
+ VALUE "CompanyName", BEID_COMPANY_NAME
+ VALUE "FileVersion", WIN_PKCS11_VERSION_STRING
+ VALUE "InternalName", "beidpkcs11"
+ VALUE "LegalCopyright", BEID_COPYRIGHT
+ VALUE "OriginalFilename", "beidpkcs11.dll"
+ VALUE "ProductName", BEID_PRODUCT_NAME
+ VALUE "ProductVersion", BEID_PRODUCT_VERSION
+ END
+ END
+ BLOCK "VarFileInfo"
+ BEGIN
+ VALUE "Translation", 0x809, 1200
+ END
+END
+
+#endif // English (U.K.) resources
+/////////////////////////////////////////////////////////////////////////////
diff --git a/cardcomm/pkcs11/VS_2019/beidpkcs11.vcxproj b/cardcomm/pkcs11/VS_2019/beidpkcs11.vcxproj
new file mode 100644
index 000000000..957cf5365
--- /dev/null
+++ b/cardcomm/pkcs11/VS_2019/beidpkcs11.vcxproj
@@ -0,0 +1,625 @@
+
+
+
+
+ Debug
+ Win32
+
+
+ Debug
+ x64
+
+
+ PKCS11_FF_DEBUG
+ Win32
+
+
+ PKCS11_FF_DEBUG
+ x64
+
+
+ PKCS11_FF_Release
+ Win32
+
+
+ PKCS11_FF_Release
+ x64
+
+
+ Release
+ Win32
+
+
+ Release
+ x64
+
+
+
+ pkcs11
+ {12F6CD4F-FC01-4E0A-AE06-F7A315094DFE}
+ beidpkcs11
+ Win32Proj
+ 10.0
+
+
+
+ DynamicLibrary
+ Unicode
+ true
+ v142
+
+
+ DynamicLibrary
+ Unicode
+ true
+ v142
+
+
+ DynamicLibrary
+ Unicode
+ false
+ v142
+
+
+ DynamicLibrary
+ Unicode
+ false
+ v142
+
+
+ DynamicLibrary
+ Unicode
+ true
+ v142
+
+
+ DynamicLibrary
+ Unicode
+ true
+ v142
+
+
+ DynamicLibrary
+ Unicode
+ true
+ v142
+
+
+ DynamicLibrary
+ Unicode
+ v142
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ <_ProjectFileVersion>10.0.30319.1
+ Binaries\$(Platform)_$(Configuration)\
+ $(Platform)_$(Configuration)\
+ true
+ Binaries\$(Platform)_$(Configuration)\
+ $(Platform)_$(Configuration)\
+ true
+ Binaries\$(Platform)_$(Configuration)\
+ Binaries\$(Platform)_$(Configuration)\
+ Binaries\$(Platform)_$(Configuration)\
+ $(Platform)_$(Configuration)\
+ $(Platform)_$(Configuration)\
+ $(Platform)_$(Configuration)\
+ false
+ false
+ true
+ Binaries\$(Platform)_$(Configuration)\
+ Binaries\$(Platform)_$(Configuration)\
+ Binaries\$(Platform)_$(Configuration)\
+ $(Platform)_$(Configuration)\
+ $(Platform)_$(Configuration)\
+ $(Platform)_$(Configuration)\
+ false
+ false
+ true
+ beid$(ProjectName)
+ beid_ff_$(ProjectName)
+ beid_ff_$(ProjectName)
+ beid$(ProjectName)D
+ beid$(ProjectName)
+ beid_ff_$(ProjectName)
+ beid_ff_$(ProjectName)D
+ beid$(ProjectName)D
+
+
+
+ Disabled
+ ..\src;..\src\common;..\src\common\libtomcrypt;..\src\cardlayer\cardpluginbeid;..\src\cardlayer;..\src\dialogs\dialogswin32;..\src\dialogs;..\..\..\doc\sdk\include\v240;%(AdditionalIncludeDirectories)
+ WIN32;_DEBUG;_WINDOWS;_USRDLL;BEID_OLD_PINPAD;%(PreprocessorDefinitions)
+ true
+ EnableFastChecks
+ MultiThreadedDebugDLL
+
+
+ Level3
+ EditAndContinue
+
+
+ _UNICODE;UNICODE;%(PreprocessorDefinitions)
+
+
+ false
+
+
+ winscard.lib;User32.lib;Gdi32.lib;Advapi32.lib;Shell32.lib
+ Binaries/$(Platform)_$(Configuration)/beid$(ProjectName)D.dll
+ Binaries/$(Platform)_$(Configuration);%(AdditionalLibraryDirectories)
+ true
+ Windows
+ MachineX86
+
+
+
+
+
+
+
+
+
+
+
+
+ X64
+
+
+ Disabled
+ ..\src;..\src\common;..\src\common\libtomcrypt;..\src\cardlayer\cardpluginbeid;..\src\cardlayer;..\src\dialogs\dialogswin32;..\src\dialogs;..\..\..\doc\sdk\include\v240;%(AdditionalIncludeDirectories)
+ WIN32;_DEBUG;_WINDOWS;_USRDLL;BEID_OLD_PINPAD;%(PreprocessorDefinitions)
+ true
+ EnableFastChecks
+ MultiThreadedDebugDLL
+
+
+ Level3
+ ProgramDatabase
+
+
+ BEID_35;_UNICODE;UNICODE;%(PreprocessorDefinitions)
+
+
+ false
+
+
+ winscard.lib;User32.lib;Gdi32.lib;Advapi32.lib;Shell32.lib
+ Binaries/$(Platform)_$(Configuration)/beid$(ProjectName)D.dll
+ Binaries/$(Platform)_$(Configuration);%(AdditionalLibraryDirectories)
+ true
+ Windows
+ MachineX64
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ MaxSpeed
+ ..\src;..\src\common;..\src\common\libtomcrypt;..\src\cardlayer\cardpluginbeid;..\src\cardlayer;..\src\dialogs\dialogswin32;..\src\dialogs;..\..\..\doc\sdk\include\v240;%(AdditionalIncludeDirectories)
+ WIN32;NDEBUG;_WINDOWS;_USRDLL;BEID_OLD_PINPAD;%(PreprocessorDefinitions)
+ MultiThreadedDLL
+
+
+ Level3
+
+
+ /w35045 %(AdditionalOptions)
+
+
+ _UNICODE;UNICODE;%(PreprocessorDefinitions)
+
+
+ false
+
+
+ winscard.lib;User32.lib;Gdi32.lib;Advapi32.lib;Shell32.lib
+ Binaries/$(Platform)_$(Configuration)/beid$(ProjectName).dll
+ Binaries/$(Platform)_$(Configuration);%(AdditionalLibraryDirectories)
+ true
+ Windows
+ true
+ true
+ MachineX86
+
+
+
+
+
+
+
+
+
+
+
+
+ MaxSpeed
+ ..\src;..\src\common;..\src\common\libtomcrypt;..\src\cardlayer\cardpluginbeid;..\src\cardlayer;..\src\dialogs\dialogswin32;..\src\dialogs;..\..\..\doc\sdk\include\v240;%(AdditionalIncludeDirectories)
+ PKCS11_FF;WIN32;NDEBUG;_WINDOWS;_USRDLL;BEID_OLD_PINPAD;%(PreprocessorDefinitions)
+ MultiThreadedDLL
+
+
+ Level3
+
+
+
+
+ _UNICODE;UNICODE;%(PreprocessorDefinitions)
+
+
+ false
+
+
+ winscard.lib;User32.lib;Gdi32.lib;Advapi32.lib;Shell32.lib
+ Binaries/$(Platform)_$(Configuration)/beid_ff_$(ProjectName).dll
+ Binaries/$(Platform)_$(Configuration);Binaries/$(Platform)_Release;%(AdditionalLibraryDirectories)
+ true
+ Windows
+ true
+ true
+ MachineX86
+
+
+
+
+
+
+
+
+
+
+
+
+ Disabled
+ ..\src;..\src\common;..\src\common\libtomcrypt;..\src\cardlayer\cardpluginbeid;..\src\cardlayer;..\src\dialogs\dialogswin32;..\src\dialogs;..\..\..\doc\sdk\include\v240;%(AdditionalIncludeDirectories)
+ WIN32;_DEBUG;_WINDOWS;_USRDLL;PKCS11_FF;BEID_OLD_PINPAD;%(PreprocessorDefinitions)
+ MultiThreadedDebugDLL
+
+
+ Level3
+ EditAndContinue
+ EnableFastChecks
+ true
+
+
+ _UNICODE;UNICODE;%(PreprocessorDefinitions)
+
+
+ false
+
+
+ winscard.lib;User32.lib;Gdi32.lib;Advapi32.lib;Shell32.lib
+ Binaries/$(Platform)_$(Configuration)/beid_ff_$(ProjectName)D.dll
+ Binaries/$(Platform)_$(Configuration);Binaries/$(Platform)_Release;%(AdditionalLibraryDirectories)
+ true
+ Windows
+ true
+ true
+ MachineX86
+
+
+
+
+
+
+
+
+
+
+
+
+ X64
+
+
+ MaxSpeed
+ ..\src;..\src\common;..\src\common\libtomcrypt;..\src\cardlayer\cardpluginbeid;..\src\cardlayer;..\src\dialogs\dialogswin32;..\src\dialogs;..\..\..\doc\sdk\include\v240;%(AdditionalIncludeDirectories)
+ WIN32;NDEBUG;_WINDOWS;_USRDLL;BEID_OLD_PINPAD;%(PreprocessorDefinitions)
+ MultiThreadedDLL
+
+
+ Level3
+
+
+ /w35045 %(AdditionalOptions)
+
+
+ BEID_35;_UNICODE;UNICODE;%(PreprocessorDefinitions)
+
+
+ false
+
+
+ winscard.lib;User32.lib;Gdi32.lib;Advapi32.lib;Shell32.lib
+ Binaries/$(Platform)_$(Configuration)/beid$(ProjectName).dll
+ Binaries/$(Platform)_$(Configuration);%(AdditionalLibraryDirectories)
+ true
+ Windows
+ true
+ true
+ MachineX64
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ X64
+
+
+ MaxSpeed
+ ..\src;..\src\common;..\src\common\libtomcrypt;..\src\cardlayer\cardpluginbeid;..\src\cardlayer;..\src\dialogs\dialogswin32;..\src\dialogs;..\..\..\doc\sdk\include\v240;%(AdditionalIncludeDirectories)
+ PKCS11_FF;WIN32;NDEBUG;_WINDOWS;_USRDLL;BEID_OLD_PINPAD;%(PreprocessorDefinitions)
+ MultiThreadedDLL
+
+
+ Level3
+
+
+
+
+ BEID_35;_UNICODE;UNICODE;%(PreprocessorDefinitions)
+
+
+ false
+
+
+ winscard.lib;User32.lib;Gdi32.lib;Advapi32.lib;Shell32.lib
+ Binaries/$(Platform)_$(Configuration)/beid_ff_$(ProjectName).dll
+ Binaries/$(Platform)_$(Configuration);Binaries/$(Platform)_Release;%(AdditionalLibraryDirectories)
+ true
+ Windows
+ true
+ true
+ MachineX64
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ X64
+
+
+ Disabled
+ ..\src;..\src\common;..\src\common\libtomcrypt;..\src\cardlayer\cardpluginbeid;..\src\cardlayer;..\src\dialogs\dialogswin32;..\src\dialogs;..\..\..\doc\sdk\include\v240;%(AdditionalIncludeDirectories)
+ WIN32;_DEBUG;_WINDOWS;_USRDLL;PKCS11_FF;BEID_OLD_PINPAD;%(PreprocessorDefinitions)
+ MultiThreadedDebugDLL
+
+
+ Level3
+ EditAndContinue
+ false
+ true
+ EnableFastChecks
+ false
+
+
+ BEID_35;_UNICODE;UNICODE;%(PreprocessorDefinitions)
+
+
+ false
+
+
+ winscard.lib;User32.lib;Gdi32.lib;Advapi32.lib;Shell32.lib
+ Binaries/$(Platform)_$(Configuration)/beid_ff_$(ProjectName).dll
+ Binaries/$(Platform)_$(Configuration);Binaries/$(Platform)_Release;%(AdditionalLibraryDirectories)
+ true
+ Windows
+ true
+ true
+ MachineX64
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ ..\src;..\src\common;..\src\common\libtomcrypt;..\src\cardlayer\cardpluginbeid;..\cardlayer\src;..\src\dialogs\dialogswin32;..\src\dialogs;%(AdditionalIncludeDirectories)
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/cardcomm/pkcs11/VS_2019/beidpkcs11.vcxproj.filters b/cardcomm/pkcs11/VS_2019/beidpkcs11.vcxproj.filters
new file mode 100644
index 000000000..5825e5134
--- /dev/null
+++ b/cardcomm/pkcs11/VS_2019/beidpkcs11.vcxproj.filters
@@ -0,0 +1,415 @@
+
+
+
+
+ Common
+
+
+ Common
+
+
+ Common
+
+
+ Common
+
+
+ Common
+
+
+ Common
+
+
+ Common
+
+
+ Common
+
+
+ Cardlayer
+
+
+ Cardlayer
+
+
+ Cardlayer
+
+
+ Dialogs
+
+
+ Dialogs
+
+
+ Dialogs
+
+
+ Dialogs
+
+
+ Dialogs
+
+
+ Dialogs
+
+
+ Dialogs
+
+
+ Dialogs
+
+
+ Pkcs11
+
+
+ Pkcs11
+
+
+ Pkcs11
+
+
+ Common
+
+
+ Pkcs11
+
+
+ Pkcs11
+
+
+ Dialogs
+
+
+ Common\LibTomCrypt
+
+
+ Common
+
+
+ Pkcs11
+
+
+ Pkcs11
+
+
+ Cardlayer
+
+
+ Pkcs11
+
+
+ Cardlayer
+
+
+ Cardlayer
+
+
+ Cardlayer
+
+
+ Pkcs11
+
+
+ Pkcs11
+
+
+ Cardlayer
+
+
+ Cardlayer
+
+
+ Cardlayer
+
+
+ Cardlayer
+
+
+ Common\LibTomCrypt
+
+
+ Pkcs11
+
+
+ Common\LibTomCrypt
+
+
+ Common\LibTomCrypt
+
+
+ Common\LibTomCrypt
+
+
+ Common\LibTomCrypt
+
+
+ Pkcs11
+
+
+ Common
+
+
+ Common
+
+
+ Common
+
+
+
+
+ Common
+
+
+ Common
+
+
+ Common
+
+
+ Common
+
+
+ Common
+
+
+ Common
+
+
+ Common
+
+
+ Common
+
+
+ Cardlayer
+
+
+ Cardlayer
+
+
+ Cardlayer
+
+
+ Cardlayer
+
+
+ Dialogs
+
+
+ Dialogs
+
+
+ Dialogs
+
+
+ Dialogs
+
+
+ Dialogs
+
+
+ Dialogs
+
+
+ Dialogs
+
+
+ Dialogs
+
+
+ Pkcs11
+
+
+ Pkcs11
+
+
+ Pkcs11
+
+
+ Common
+
+
+ Common
+
+
+ Cardlayer
+
+
+ Dialogs
+
+
+ Dialogs
+
+
+ Common
+
+
+ Pkcs11
+
+
+ Cardlayer
+
+
+ Cardlayer
+
+
+ Pkcs11
+
+
+ Cardlayer
+
+
+ Cardlayer
+
+
+ Cardlayer
+
+
+ Cardlayer
+
+
+ Pkcs11\Pkcs11_standard
+
+
+ Cardlayer
+
+
+ Cardlayer
+
+
+ Cardlayer
+
+
+ Cardlayer
+
+
+ Dialogs
+
+
+ Cardlayer
+
+
+ Dialogs
+
+
+ Common
+
+
+ Common
+
+
+ Common
+
+
+ Common
+
+
+ Common\LibTomCrypt
+
+
+ Common\LibTomCrypt
+
+
+ Common\LibTomCrypt
+
+
+ Common\LibTomCrypt
+
+
+ Pkcs11
+
+
+
+
+ Dialogs\Icons
+
+
+ Dialogs\Icons
+
+
+ Dialogs\Icons
+
+
+ Dialogs\Icons
+
+
+ Dialogs\Icons
+
+
+ Dialogs\Icons
+
+
+ Dialogs\Icons
+
+
+ Dialogs\Icons
+
+
+ Dialogs\Icons
+
+
+ Dialogs\Icons
+
+
+ Dialogs\Icons
+
+
+ Dialogs\Icons
+
+
+ Dialogs\Icons
+
+
+ Dialogs\Icons
+
+
+ Dialogs\Icons
+
+
+ Dialogs\Icons
+
+
+ Dialogs\Icons
+
+
+ Dialogs\Icons
+
+
+ Dialogs\Icons
+
+
+
+
+ {8779b4bf-1d5c-415b-b3e7-3ae37d9b9581}
+
+
+ {91cdc724-c904-412f-9dce-d9559c68b411}
+
+
+ {58d42979-b45f-44e9-aeb5-eb698f20dd98}
+
+
+ {36ad2a9b-45d7-49c3-95da-9615cce0be86}
+
+
+ {a3ac402e-4118-45ad-b474-58fe20680b83}
+
+
+ {34c81207-fd0b-48ad-8579-4063cbb0fd4b}
+
+
+ {e0464b9b-521a-4c19-a06b-3206ecca3f02}
+
+
+
+
+ Common
+
+
+
+
+
+ Pkcs11
+
+
+
\ No newline at end of file
diff --git a/cardcomm/pkcs11/src/beid_p11.h b/cardcomm/pkcs11/src/beid_p11.h
index f390e7d46..afcd4de02 100644
--- a/cardcomm/pkcs11/src/beid_p11.h
+++ b/cardcomm/pkcs11/src/beid_p11.h
@@ -47,6 +47,7 @@
#define BEID_FILE_PHOTO "3F00DF014035"
#define BEID_FILE_CERT_RRN "3F00DF00503C"
#define BEID_FILE_CERT_RRNCA "3F00DF00503D"
+#define BEID_FILE_BASIC_KEY "3F00DF014040"
#define BEID_FIELD_TAG_ID_Version 0x00
#define BEID_FIELD_TAG_ID_CardNr 0x01
@@ -74,7 +75,7 @@
#define BEID_FIELD_TAG_ID_Vat1 0x17
#define BEID_FIELD_TAG_ID_Vat2 0x18
#define BEID_FIELD_TAG_ID_RegionalFileNumber 0x19
-#define BEID_FIELD_TAG_ID_BasicKeyHash 0x20
+#define BEID_FIELD_TAG_ID_BasicKeyHash 0x1A
#define BEID_FIELD_TAG_ADDR_Version 0x00
#define BEID_FIELD_TAG_ADDR_Street 0x01
diff --git a/cardcomm/pkcs11/src/cal.cpp b/cardcomm/pkcs11/src/cal.cpp
index 7f2dfabef..258206e22 100644
--- a/cardcomm/pkcs11/src/cal.cpp
+++ b/cardcomm/pkcs11/src/cal.cpp
@@ -1607,6 +1607,7 @@ CK_RV cal_read_ID_files(CK_SLOT_ID hSlot, CK_ULONG dataType)
BEID_DATA_LABELS_NAME ADDRESS_LABELS[] = BEID_ADDRESS_DATA_LABELS;
int i = 0;
int nrOfItems = 0;
+ unsigned char ucAppletVersion = 0;
CK_ULONG hObject = 0;
@@ -1628,180 +1629,206 @@ CK_RV cal_read_ID_files(CK_SLOT_ID hSlot, CK_ULONG dataType)
CCard* poCard = oReader.GetCard();
switch (dataType)
{
- case CACHED_DATA_TYPE_ALL_DATA:
- case CACHED_DATA_TYPE_ID:
- oFileData = poCard->ReadCardFile(BEID_FILE_ID);
-
-// dataSize = fread((void *)buffer,1,4096, BEIDfile);
-// fclose(BEIDfile);
-// oFileData.Append(buffer, dataSize);
-
- plabel = BEID_LABEL_DATA_FILE;
- pobjectID = (char *) BEID_OBJECTID_ID;
- /* XXX the const-ness of pobjectID and plabel should
- * ideally not be cast away, but it goes pretty deep.
- * Not Now(TM). */
- ret = p11_add_slot_ID_object(pSlot, ID_DATA,
- sizeof(ID_DATA) / sizeof(CK_ATTRIBUTE),
- CK_TRUE,
- CKO_DATA,
- CK_FALSE,
- &hObject,
- (CK_VOID_PTR) plabel, (CK_ULONG) strlen(plabel),
- (CK_VOID_PTR) oFileData.GetBytes(), (CK_ULONG) oFileData.Size(),
- (CK_VOID_PTR) pobjectID, (CK_ULONG) strlen (pobjectID),
- CK_FALSE);
- if (ret)
- goto cleanup;
+ case CACHED_DATA_TYPE_ALL_DATA:
+ case CACHED_DATA_TYPE_ID:
+ oFileData = poCard->ReadCardFile(BEID_FILE_ID);
- oTLVBuffer.ParseTLV(oFileData.GetBytes(), oFileData.Size());
+ // dataSize = fread((void *)buffer,1,4096, BEIDfile);
+ // fclose(BEIDfile);
+ // oFileData.Append(buffer, dataSize);
- nrOfItems = sizeof(ID_LABELS)/sizeof(BEID_DATA_LABELS_NAME);
+ plabel = BEID_LABEL_DATA_FILE;
+ pobjectID = (char *)BEID_OBJECTID_ID;
+ /* XXX the const-ness of pobjectID and plabel should
+ * ideally not be cast away, but it goes pretty deep.
+ * Not Now(TM). */
+ ret = p11_add_slot_ID_object(pSlot, ID_DATA,
+ sizeof(ID_DATA) / sizeof(CK_ATTRIBUTE),
+ CK_TRUE,
+ CKO_DATA,
+ CK_FALSE,
+ &hObject,
+ (CK_VOID_PTR)plabel, (CK_ULONG)strlen(plabel),
+ (CK_VOID_PTR)oFileData.GetBytes(), (CK_ULONG)oFileData.Size(),
+ (CK_VOID_PTR)pobjectID, (CK_ULONG)strlen(pobjectID),
+ CK_FALSE);
+ if (ret)
+ goto cleanup;
- for (i = 0; i < nrOfItems; i++)
- {
- ulLen = sizeof(cBuffer);
- memset(cBuffer, 0, ulLen);
- if(oTLVBuffer.FillUTF8Data(ID_LABELS[i].tag, cBuffer, &ulLen)) {
- plabel = ID_LABELS[i].name;
- ret = p11_add_slot_ID_object(pSlot, ID_DATA, sizeof(ID_DATA) / sizeof(CK_ATTRIBUTE),
- CK_TRUE, CKO_DATA, CK_FALSE, &hObject, (CK_VOID_PTR)plabel,
- (CK_ULONG)strlen(plabel), (CK_VOID_PTR)cBuffer, ulLen,
- (CK_VOID_PTR) pobjectID, (CK_ULONG)strlen(pobjectID), CK_FALSE);
- if (ret)
- goto cleanup;
- }
- }
- if (dataType != CACHED_DATA_TYPE_ALL_DATA)
- {
- break;
- }
- /* Falls through */
- case CACHED_DATA_TYPE_ADDRESS:
- oFileData = poCard->ReadCardFile(BEID_FILE_ADDRESS);
- plabel = BEID_LABEL_ADDRESS_FILE;
- pobjectID = BEID_OBJECTID_ADDRESS;
- ret = p11_add_slot_ID_object(pSlot, ID_DATA, sizeof(ID_DATA) / sizeof(CK_ATTRIBUTE), CK_TRUE, CKO_DATA,
- CK_FALSE, &hObject, (CK_VOID_PTR)plabel, (CK_ULONG)strlen(plabel),
- (CK_VOID_PTR)oFileData.GetBytes(), (CK_ULONG)oFileData.Size(),
- (CK_VOID_PTR)pobjectID, (CK_ULONG)strlen(pobjectID), CK_FALSE);
- if (ret)
- goto cleanup;
- oTLVBufferAddress.ParseTLV(oFileData.GetBytes(),
- oFileData.Size());
- nrOfItems = sizeof(ADDRESS_LABELS)/sizeof(BEID_DATA_LABELS_NAME);
- for (i = 0; i < nrOfItems; i++)
- {
- ulLen = sizeof(cBuffer);
- memset(cBuffer, 0, ulLen);
- if(oTLVBufferAddress.FillUTF8Data(ADDRESS_LABELS[i].tag, cBuffer, &ulLen)) {
- plabel = ADDRESS_LABELS[i].name;
- ret = p11_add_slot_ID_object(pSlot, ID_DATA, sizeof(ID_DATA) / sizeof(CK_ATTRIBUTE), CK_TRUE,
- CKO_DATA, CK_FALSE, &hObject, (CK_VOID_PTR)plabel,
- (CK_ULONG)strlen(plabel), (CK_VOID_PTR)cBuffer, ulLen,
- (CK_VOID_PTR)pobjectID, (CK_ULONG)strlen(pobjectID), CK_FALSE);
- if (ret)
- goto cleanup;
- }
- }
- if (dataType != CACHED_DATA_TYPE_ALL_DATA)
- {
- break;
- }
- /* Falls through */
- case CACHED_DATA_TYPE_PHOTO:
- plabel = BEID_LABEL_PHOTO;
- pobjectID = BEID_OBJECTID_PHOTO;
- oFileData = poCard->ReadCardFile(BEID_FILE_PHOTO);
- ret = p11_add_slot_ID_object(pSlot, ID_DATA,
- sizeof(ID_DATA) / sizeof(CK_ATTRIBUTE),
- CK_TRUE,
- CKO_DATA,
- CK_FALSE,
- &hObject,
- (CK_VOID_PTR)plabel, (CK_ULONG)strlen(plabel),
- (CK_VOID_PTR)oFileData.GetBytes(), (CK_ULONG)oFileData.Size(),
- (CK_VOID_PTR)pobjectID, (CK_ULONG)strlen(BEID_OBJECTID_PHOTO),
- CK_FALSE);
- if (ret)
- goto cleanup;
- if (dataType != CACHED_DATA_TYPE_ALL_DATA)
- {
- break;
- }
- /* Falls through */
- case CACHED_DATA_TYPE_RNCERT:
- oFileData = poCard->ReadCardFile(BEID_FILE_CERT_RRN);
- plabel = BEID_LABEL_CERT_RN;
- pobjectID = BEID_OBJECTID_RNCERT;
- ret = p11_add_slot_ID_object(pSlot, ID_DATA,
- sizeof(ID_DATA) / sizeof(CK_ATTRIBUTE),
- CK_TRUE,
- CKO_DATA,
- CK_FALSE,
- &hObject,
- (CK_VOID_PTR)plabel, (CK_ULONG)strlen(plabel),
- (CK_VOID_PTR)oFileData.GetBytes(), (CK_ULONG)oFileData.Size(),
- (CK_VOID_PTR)pobjectID, (CK_ULONG)strlen(BEID_OBJECTID_RNCERT),
- CK_FALSE);
- if (ret)
- goto cleanup;
- if (dataType != CACHED_DATA_TYPE_ALL_DATA)
- {
- break;
+ oTLVBuffer.ParseTLV(oFileData.GetBytes(), oFileData.Size());
+
+ nrOfItems = sizeof(ID_LABELS) / sizeof(BEID_DATA_LABELS_NAME);
+
+ for (i = 0; i < nrOfItems; i++)
+ {
+ ulLen = sizeof(cBuffer);
+ memset(cBuffer, 0, ulLen);
+ if (oTLVBuffer.FillUTF8Data(ID_LABELS[i].tag, cBuffer, &ulLen)) {
+ plabel = ID_LABELS[i].name;
+ ret = p11_add_slot_ID_object(pSlot, ID_DATA, sizeof(ID_DATA) / sizeof(CK_ATTRIBUTE),
+ CK_TRUE, CKO_DATA, CK_FALSE, &hObject, (CK_VOID_PTR)plabel,
+ (CK_ULONG)strlen(plabel), (CK_VOID_PTR)cBuffer, ulLen,
+ (CK_VOID_PTR)pobjectID, (CK_ULONG)strlen(pobjectID), CK_FALSE);
+ if (ret)
+ goto cleanup;
}
- /* Falls through */
- case CACHED_DATA_TYPE_SIGN_DATA_FILE:
- plabel = BEID_LABEL_SGN_RN;
- oFileData = poCard->ReadCardFile(BEID_FILE_ID_SIGN);
- ret = p11_add_slot_ID_object(pSlot, ID_DATA,
- sizeof(ID_DATA) / sizeof(CK_ATTRIBUTE),
- CK_TRUE,
- CKO_DATA,
- CK_FALSE,
- &hObject,
- (CK_VOID_PTR)plabel, (CK_ULONG)strlen(plabel),
- (CK_VOID_PTR)oFileData.GetBytes(), (CK_ULONG)oFileData.Size(),
- (CK_VOID_PTR)BEID_OBJECTID_SIGN_DATA_FILE,
- (CK_ULONG) strlen(BEID_OBJECTID_SIGN_DATA_FILE),
- CK_FALSE);
- if (ret)
- goto cleanup;
- if (dataType != CACHED_DATA_TYPE_ALL_DATA)
- {
- break;
+ }
+ if (dataType != CACHED_DATA_TYPE_ALL_DATA)
+ {
+ break;
+ }
+ /* Falls through */
+ case CACHED_DATA_TYPE_ADDRESS:
+ oFileData = poCard->ReadCardFile(BEID_FILE_ADDRESS);
+ plabel = BEID_LABEL_ADDRESS_FILE;
+ pobjectID = BEID_OBJECTID_ADDRESS;
+ ret = p11_add_slot_ID_object(pSlot, ID_DATA, sizeof(ID_DATA) / sizeof(CK_ATTRIBUTE), CK_TRUE, CKO_DATA,
+ CK_FALSE, &hObject, (CK_VOID_PTR)plabel, (CK_ULONG)strlen(plabel),
+ (CK_VOID_PTR)oFileData.GetBytes(), (CK_ULONG)oFileData.Size(),
+ (CK_VOID_PTR)pobjectID, (CK_ULONG)strlen(pobjectID), CK_FALSE);
+ if (ret)
+ goto cleanup;
+ oTLVBufferAddress.ParseTLV(oFileData.GetBytes(),
+ oFileData.Size());
+ nrOfItems = sizeof(ADDRESS_LABELS) / sizeof(BEID_DATA_LABELS_NAME);
+ for (i = 0; i < nrOfItems; i++)
+ {
+ ulLen = sizeof(cBuffer);
+ memset(cBuffer, 0, ulLen);
+ if (oTLVBufferAddress.FillUTF8Data(ADDRESS_LABELS[i].tag, cBuffer, &ulLen)) {
+ plabel = ADDRESS_LABELS[i].name;
+ ret = p11_add_slot_ID_object(pSlot, ID_DATA, sizeof(ID_DATA) / sizeof(CK_ATTRIBUTE), CK_TRUE,
+ CKO_DATA, CK_FALSE, &hObject, (CK_VOID_PTR)plabel,
+ (CK_ULONG)strlen(plabel), (CK_VOID_PTR)cBuffer, ulLen,
+ (CK_VOID_PTR)pobjectID, (CK_ULONG)strlen(pobjectID), CK_FALSE);
+ if (ret)
+ goto cleanup;
}
- /* Falls through */
- case CACHED_DATA_TYPE_SIGN_ADDRESS_FILE:
- plabel = BEID_LABEL_SGN_ADDRESS;
- oFileData = poCard->ReadCardFile(BEID_FILE_ADDRESS_SIGN);
+ }
+ if (dataType != CACHED_DATA_TYPE_ALL_DATA)
+ {
+ break;
+ }
+ /* Falls through */
+ case CACHED_DATA_TYPE_PHOTO:
+ plabel = BEID_LABEL_PHOTO;
+ pobjectID = BEID_OBJECTID_PHOTO;
+ oFileData = poCard->ReadCardFile(BEID_FILE_PHOTO);
+ ret = p11_add_slot_ID_object(pSlot, ID_DATA,
+ sizeof(ID_DATA) / sizeof(CK_ATTRIBUTE),
+ CK_TRUE,
+ CKO_DATA,
+ CK_FALSE,
+ &hObject,
+ (CK_VOID_PTR)plabel, (CK_ULONG)strlen(plabel),
+ (CK_VOID_PTR)oFileData.GetBytes(), (CK_ULONG)oFileData.Size(),
+ (CK_VOID_PTR)pobjectID, (CK_ULONG)strlen(BEID_OBJECTID_PHOTO),
+ CK_FALSE);
+ if (ret)
+ goto cleanup;
+ if (dataType != CACHED_DATA_TYPE_ALL_DATA)
+ {
+ break;
+ }
+ /* Falls through */
+ case CACHED_DATA_TYPE_RNCERT:
+ oFileData = poCard->ReadCardFile(BEID_FILE_CERT_RRN);
+ plabel = BEID_LABEL_CERT_RN;
+ pobjectID = BEID_OBJECTID_RNCERT;
+ ret = p11_add_slot_ID_object(pSlot, ID_DATA,
+ sizeof(ID_DATA) / sizeof(CK_ATTRIBUTE),
+ CK_TRUE,
+ CKO_DATA,
+ CK_FALSE,
+ &hObject,
+ (CK_VOID_PTR)plabel, (CK_ULONG)strlen(plabel),
+ (CK_VOID_PTR)oFileData.GetBytes(), (CK_ULONG)oFileData.Size(),
+ (CK_VOID_PTR)pobjectID, (CK_ULONG)strlen(BEID_OBJECTID_RNCERT),
+ CK_FALSE);
+ if (ret)
+ goto cleanup;
+ if (dataType != CACHED_DATA_TYPE_ALL_DATA)
+ {
+ break;
+ }
+ /* Falls through */
+ case CACHED_DATA_TYPE_SIGN_DATA_FILE:
+ plabel = BEID_LABEL_SGN_RN;
+ oFileData = poCard->ReadCardFile(BEID_FILE_ID_SIGN);
+ ret = p11_add_slot_ID_object(pSlot, ID_DATA,
+ sizeof(ID_DATA) / sizeof(CK_ATTRIBUTE),
+ CK_TRUE,
+ CKO_DATA,
+ CK_FALSE,
+ &hObject,
+ (CK_VOID_PTR)plabel, (CK_ULONG)strlen(plabel),
+ (CK_VOID_PTR)oFileData.GetBytes(), (CK_ULONG)oFileData.Size(),
+ (CK_VOID_PTR)BEID_OBJECTID_SIGN_DATA_FILE,
+ (CK_ULONG)strlen(BEID_OBJECTID_SIGN_DATA_FILE),
+ CK_FALSE);
+ if (ret)
+ goto cleanup;
+ if (dataType != CACHED_DATA_TYPE_ALL_DATA)
+ {
+ break;
+ }
+ /* Falls through */
+ case CACHED_DATA_TYPE_SIGN_ADDRESS_FILE:
+ plabel = BEID_LABEL_SGN_ADDRESS;
+ oFileData = poCard->ReadCardFile(BEID_FILE_ADDRESS_SIGN);
+ ret = p11_add_slot_ID_object(pSlot, ID_DATA,
+ sizeof(ID_DATA) / sizeof(CK_ATTRIBUTE),
+ CK_TRUE,
+ CKO_DATA,
+ CK_FALSE,
+ &hObject,
+ (CK_VOID_PTR)plabel, (CK_ULONG)strlen(plabel),
+ (CK_VOID_PTR)oFileData.GetBytes(),
+ (CK_ULONG)oFileData.Size(),
+ (CK_VOID_PTR)BEID_OBJECTID_SIGN_ADDRESS_FILE, (CK_ULONG)strlen(BEID_OBJECTID_SIGN_ADDRESS_FILE),
+ CK_FALSE);
+ if (ret)
+ goto cleanup;
+ if (dataType != CACHED_DATA_TYPE_ALL_DATA)
+ {
+ break;
+ }
+ /* Falls through */
+ case CACHED_DATA_TYPE_BASIC_KEY_FILE:
+ ucAppletVersion = poCard->GetAppletVersion();
+
+ if (ucAppletVersion >= 0x18)
+ {
+ plabel = BEID_LABEL_BASIC_KEY;
+ pobjectID = BEID_OBJECTID_BASIC_KEY_FILE;
+ oFileData = poCard->ReadCardFile(BEID_FILE_BASIC_KEY);
ret = p11_add_slot_ID_object(pSlot, ID_DATA,
- sizeof(ID_DATA) / sizeof(CK_ATTRIBUTE),
- CK_TRUE,
- CKO_DATA,
- CK_FALSE,
- &hObject,
- (CK_VOID_PTR)plabel, (CK_ULONG)strlen(plabel),
- (CK_VOID_PTR)oFileData.GetBytes(),
- (CK_ULONG)oFileData.Size(),
- (CK_VOID_PTR)BEID_OBJECTID_SIGN_ADDRESS_FILE, (CK_ULONG)strlen(BEID_OBJECTID_SIGN_ADDRESS_FILE),
- CK_FALSE);
+ sizeof(ID_DATA) / sizeof(CK_ATTRIBUTE),
+ CK_TRUE,
+ CKO_DATA,
+ CK_FALSE,
+ &hObject,
+ (CK_VOID_PTR)plabel, (CK_ULONG)strlen(plabel),
+ (CK_VOID_PTR)oFileData.GetBytes(), (CK_ULONG)oFileData.Size(),
+ (CK_VOID_PTR)pobjectID, (CK_ULONG)strlen(BEID_OBJECTID_BASIC_KEY_FILE),
+ CK_FALSE);
if (ret)
goto cleanup;
- if (dataType != CACHED_DATA_TYPE_ALL_DATA)
- {
- break;
- }
- /* Falls through */
- default:
+ }
+ if (dataType != CACHED_DATA_TYPE_ALL_DATA)
+ {
break;
+ }
+ /* Falls through */
+ default:
+ break;
}
}
- catch(CMWException &e)
+ catch (CMWException &e)
{
return (cal_translate_error(WHERE, e.GetError()));
}
- catch( ...)
+ catch (...)
{
//ret = -1;
log_trace(WHERE, "E: unknown exception thrown");
diff --git a/cardcomm/pkcs11/src/cal.h b/cardcomm/pkcs11/src/cal.h
index 5505f094b..cf4b800a3 100644
--- a/cardcomm/pkcs11/src/cal.h
+++ b/cardcomm/pkcs11/src/cal.h
@@ -266,6 +266,7 @@ extern "C"
#define BEID_OBJECTID_RNCERT "rncert"
#define BEID_OBJECTID_SIGN_DATA_FILE "sign_data_file"
#define BEID_OBJECTID_SIGN_ADDRESS_FILE "sign_address_file"
+#define BEID_OBJECTID_BASIC_KEY_FILE "basic_key_file"
//to give the hidden record objects their own (hidden/undocumented) CKA_OBJECT_ID
//this "record" CKA_OBJECT_ID is not meant to (and can not) be used to retrieve all hidden objects
#define BEID_OBJECTID_RECORD "record"
@@ -282,9 +283,9 @@ extern "C"
#define BEID_LABEL_CARD_DATA "CARD_DATA"
#define BEID_LABEL_CERT_RN "CERT_RN_FILE"
//#define BEID_LABEL_CERT_RNCA "CERT_RNCA_FILE"
-
#define BEID_LABEL_SGN_RN "SIGN_DATA_FILE"
#define BEID_LABEL_SGN_ADDRESS "SIGN_ADDRESS_FILE"
+#define BEID_LABEL_BASIC_KEY "BASIC_KEY_FILE"
typedef enum {
BEID_PIN_READ_EF,
diff --git a/cardcomm/pkcs11/src/cardlayer/pkcs15.h b/cardcomm/pkcs11/src/cardlayer/pkcs15.h
index c9374f1c5..16245dca6 100644
--- a/cardcomm/pkcs11/src/cardlayer/pkcs15.h
+++ b/cardcomm/pkcs11/src/cardlayer/pkcs15.h
@@ -41,7 +41,7 @@ namespace eIDMW
// const unsigned long TOKENFLAG_PRNGENERATION = 0x00000004;
// const unsigned long TOKENFLAG_EIDCOMPLIANT = 0x00000008;
- typedef struct
+ typedef struct PKCSFile
{
bool isRead;
std::string path;
diff --git a/cardcomm/pkcs11/src/cardlayer/pkcs15parser.h b/cardcomm/pkcs11/src/cardlayer/pkcs15parser.h
index b1fa5c799..63ca68905 100644
--- a/cardcomm/pkcs11/src/cardlayer/pkcs15parser.h
+++ b/cardcomm/pkcs11/src/cardlayer/pkcs15parser.h
@@ -28,7 +28,7 @@
namespace eIDMW
{
- typedef struct
+ typedef struct commonObject
{
std::string csLabel;
unsigned long ulFlags;
diff --git a/cardcomm/pkcs11/src/object.c b/cardcomm/pkcs11/src/object.c
index 131726c6a..e48769007 100644
--- a/cardcomm/pkcs11/src/object.c
+++ b/cardcomm/pkcs11/src/object.c
@@ -492,9 +492,9 @@ CK_RV C_FindObjectsInit(CK_SESSION_HANDLE hSession, /* the session's handle */
((filesToCacheFlag == CACHED_DATA_TYPE_ALL_DATA) && (pSlot->ulCardDataCached != CACHED_DATA_TYPE_ALL_DATA)) )
{
CK_ULONG counter = 0;
- CK_ULONG flagsToCheckListLen = 6;
- CK_BYTE flagsToCheckList[6] = {CACHED_DATA_TYPE_ID,CACHED_DATA_TYPE_ADDRESS,CACHED_DATA_TYPE_PHOTO,
- CACHED_DATA_TYPE_RNCERT,CACHED_DATA_TYPE_SIGN_DATA_FILE,CACHED_DATA_TYPE_SIGN_ADDRESS_FILE};
+ CK_ULONG flagsToCheckListLen = 7;
+ CK_ULONG flagsToCheckList[7] = {CACHED_DATA_TYPE_ID,CACHED_DATA_TYPE_ADDRESS,CACHED_DATA_TYPE_PHOTO,
+ CACHED_DATA_TYPE_RNCERT,CACHED_DATA_TYPE_SIGN_DATA_FILE,CACHED_DATA_TYPE_SIGN_ADDRESS_FILE, CACHED_DATA_TYPE_BASIC_KEY_FILE };
switch(filesToCacheFlag)
{
@@ -893,6 +893,14 @@ void SetParseFlagByLabel(CK_ULONG* pFilesToParseFlag,CK_UTF8CHAR_PTR pLabel,CK_U
return;
}
}
+ //label of the public basic key
+ if (strlen(BEID_LABEL_BASIC_KEY) == len)
+ {
+ if (memcmp(BEID_LABEL_BASIC_KEY, pLabel, len) == 0) {
+ *pFilesToParseFlag = CACHED_DATA_TYPE_BASIC_KEY_FILE;
+ return;
+ }
+ }
//labels from card data
counter = 0;
while(counter < carddataLabelsListLen)
@@ -965,6 +973,13 @@ void SetParseFlagByObjectID(CK_ULONG* pFilesToParseFlag,CK_UTF8CHAR_PTR pObjectI
return;
}
}
+ if (strlen(BEID_OBJECTID_BASIC_KEY_FILE) == len) {
+ if (memcmp(BEID_OBJECTID_BASIC_KEY_FILE, pObjectID, len) == 0) {
+ *pFilesToParseFlag = CACHED_DATA_TYPE_BASIC_KEY_FILE;
+ return;
+ }
+ }
+
return;
}
diff --git a/cardcomm/pkcs11/src/p11.h b/cardcomm/pkcs11/src/p11.h
index d0a53abea..6352ab75b 100644
--- a/cardcomm/pkcs11/src/p11.h
+++ b/cardcomm/pkcs11/src/p11.h
@@ -65,13 +65,15 @@ extern "C"
#define CACHED_DATA_TYPE_RNCERT 0x010
#define CACHED_DATA_TYPE_SIGN_DATA_FILE 0x020
#define CACHED_DATA_TYPE_SIGN_ADDRESS_FILE 0x040
-#define CACHED_DATA_TYPE_ALL_DATA 0x07F //All the above are set
+#define CACHED_DATA_TYPE_ALL_DATA 0x207F //All the above are set and CACHED_DATA_TYPE_BASIC_KEY_FILE
#define CACHED_DATA_TYPE_CDF 0x080
#define CACHED_DATA_TYPE_AUTH_CERT 0x100
#define CACHED_DATA_TYPE_SIGN_CERT 0x200
#define CACHED_DATA_TYPE_CA_CERT 0x400
#define CACHED_DATA_TYPE_ROOT_CERT 0x800
#define CACHED_DATA_TYPE_PER_RECORD 0x1000
+#define CACHED_DATA_TYPE_BASIC_KEY_FILE 0x2000
+
#define CARD_FUNCTION_NOT_IMPLEMENTED -101
#define CARD_FUNCTION_NOT_SUPPORTED -102
diff --git a/cardcomm/tokend/Tokend-36720/BELPIC/BELPICToken.cpp b/cardcomm/tokend/Tokend-36720/BELPIC/BELPICToken.cpp
index 776400d5f..c0440afe6 100755
--- a/cardcomm/tokend/Tokend-36720/BELPIC/BELPICToken.cpp
+++ b/cardcomm/tokend/Tokend-36720/BELPIC/BELPICToken.cpp
@@ -385,9 +385,9 @@ uint8_t BELPICToken::pinDigit(uint8_t digit)
if ('0' <= digit && digit <= '9')
return digit - '0';
else if ('A' <= digit && digit <= 'F')
- return digit - 'A' + 0x10;
+ return digit - 'A' + 0x0A;
else if ('a' <= digit && digit <= 'f')
- return digit - 'a' + 0x10;
+ return digit - 'a' + 0x0A;
else
CssmError::throwMe(CSSM_ERRCODE_SAMPLE_VALUE_NOT_SUPPORTED);
}
diff --git a/doc/sdk/documentation/Appendix 1 Belgian Electronic Identity Card content.pdf b/doc/sdk/documentation/Applet 1.7 eID Cards/Appendix 1 Belgian Electronic Identity Card content.pdf
similarity index 100%
rename from doc/sdk/documentation/Appendix 1 Belgian Electronic Identity Card content.pdf
rename to doc/sdk/documentation/Applet 1.7 eID Cards/Appendix 1 Belgian Electronic Identity Card content.pdf
diff --git a/doc/sdk/documentation/Belgian Electronic Identity Card content v4 01.pdf b/doc/sdk/documentation/Applet 1.7 eID Cards/Belgian Electronic Identity Card content v4 01.pdf
similarity index 100%
rename from doc/sdk/documentation/Belgian Electronic Identity Card content v4 01.pdf
rename to doc/sdk/documentation/Applet 1.7 eID Cards/Belgian Electronic Identity Card content v4 01.pdf
diff --git a/doc/sdk/documentation/Public_Belpic_Applet_v1 7_Ref_Manual - A01.doc b/doc/sdk/documentation/Applet 1.7 eID Cards/Public_Belpic_Applet_v1 7_Ref_Manual - A01.doc
similarity index 100%
rename from doc/sdk/documentation/Public_Belpic_Applet_v1 7_Ref_Manual - A01.doc
rename to doc/sdk/documentation/Applet 1.7 eID Cards/Public_Belpic_Applet_v1 7_Ref_Manual - A01.doc
diff --git a/doc/sdk/documentation/Public_Belpic_Applet_v1 7_Ref_Manual - A01.pdf b/doc/sdk/documentation/Applet 1.7 eID Cards/Public_Belpic_Applet_v1 7_Ref_Manual - A01.pdf
similarity index 100%
rename from doc/sdk/documentation/Public_Belpic_Applet_v1 7_Ref_Manual - A01.pdf
rename to doc/sdk/documentation/Applet 1.7 eID Cards/Public_Belpic_Applet_v1 7_Ref_Manual - A01.pdf
diff --git a/doc/sdk/documentation/belgian_electronic_identity_card_content_v2.8.a.pdf b/doc/sdk/documentation/Applet 1.7 eID Cards/belgian_electronic_identity_card_content_v2.8.a.pdf
similarity index 100%
rename from doc/sdk/documentation/belgian_electronic_identity_card_content_v2.8.a.pdf
rename to doc/sdk/documentation/Applet 1.7 eID Cards/belgian_electronic_identity_card_content_v2.8.a.pdf
diff --git a/doc/sdk/documentation/Applet 1.8 eID Cards/Belgian Electronic Identity Card content v5_01.pdf b/doc/sdk/documentation/Applet 1.8 eID Cards/Belgian Electronic Identity Card content v5_01.pdf
new file mode 100644
index 000000000..2ff305b07
Binary files /dev/null and b/doc/sdk/documentation/Applet 1.8 eID Cards/Belgian Electronic Identity Card content v5_01.pdf differ
diff --git a/doc/sdk/documentation/Applet 1.8 eID Cards/Certificate_samples/BRCA6.pem b/doc/sdk/documentation/Applet 1.8 eID Cards/Certificate_samples/BRCA6.pem
new file mode 100644
index 000000000..238846241
--- /dev/null
+++ b/doc/sdk/documentation/Applet 1.8 eID Cards/Certificate_samples/BRCA6.pem
@@ -0,0 +1,21 @@
+-----BEGIN CERTIFICATE-----
+MIIDaDCCAu2gAwIBAgIUcYtX/2tpPlocI17Yh6PvUfQBDyYwCgYIKoZIzj0EAwMw
+geAxCzAJBgNVBAYTAkJFMREwDwYDVQQHDAhCcnVzc2VsczEwMC4GA1UECgwnS2lu
+Z2RvbSBvZiBCZWxnaXVtIC0gRmVkZXJhbCBHb3Zlcm5tZW50MTYwNAYDVQQLDC1G
+UFMgSG9tZSBBZmZhaXJzIC0gQklLLUdDSSAoTlRSQkUtMDM2MjQ3NTUzOCkxOTA3
+BgNVBAsMMEZQUyBQb2xpY3kgYW5kIFN1cHBvcnQgLSBCT1NBIChOVFJCRS0wNjcx
+NTE2NjQ3KTEZMBcGA1UEAwwQQmVsZ2l1bSBSb290IENBNjAeFw0yMDA2MDMxMDAx
+MzFaFw00MDA2MDMxMDAxMzFaMIHgMQswCQYDVQQGEwJCRTERMA8GA1UEBwwIQnJ1
+c3NlbHMxMDAuBgNVBAoMJ0tpbmdkb20gb2YgQmVsZ2l1bSAtIEZlZGVyYWwgR292
+ZXJubWVudDE2MDQGA1UECwwtRlBTIEhvbWUgQWZmYWlycyAtIEJJSy1HQ0kgKE5U
+UkJFLTAzNjI0NzU1MzgpMTkwNwYDVQQLDDBGUFMgUG9saWN5IGFuZCBTdXBwb3J0
+IC0gQk9TQSAoTlRSQkUtMDY3MTUxNjY0NykxGTAXBgNVBAMMEEJlbGdpdW0gUm9v
+dCBDQTYwdjAQBgcqhkjOPQIBBgUrgQQAIgNiAAR532ARaLVsPSf5Pz9+b5ExaxpC
+e8iGGkDgkbUlGM0ulbr0YqbKva7EoOAY+YL5ZJs8S0KIsuQNc0f2vgI8xcyPQHge
+CaLcw0OzvmfCHf/OMOIozEKgKaAK6pHvaBXP0tijZjBkMBIGA1UdEwEB/wQIMAYB
+Af8CAQEwHwYDVR0jBBgwFoAULqCIsAsNYonsHT/Un8ySRI5IaUYwHQYDVR0OBBYE
+FC6giLALDWKJ7B0/1J/MkkSOSGlGMA4GA1UdDwEB/wQEAwIBBjAKBggqhkjOPQQD
+AwNpADBmAjEAt2e2vVG4/aMjIokbQQuCnvI8so8rZl/IbKupMCJitfFi7oVlHllY
+FDdYMDTKWLZgAjEAsa2wuz3Ew6/68XXtIT+51snqkl2KLlaVgKXYlpTh2zqQBIBd
+KO1nMO/rQRfuZ701
+-----END CERTIFICATE-----
diff --git a/doc/sdk/documentation/Applet 1.8 eID Cards/Certificate_samples/CitizenCA202002.pem b/doc/sdk/documentation/Applet 1.8 eID Cards/Certificate_samples/CitizenCA202002.pem
new file mode 100644
index 000000000..c60d04fd6
--- /dev/null
+++ b/doc/sdk/documentation/Applet 1.8 eID Cards/Certificate_samples/CitizenCA202002.pem
@@ -0,0 +1,29 @@
+Subject: CN=Citizen CA,SN=202002,OU=FPS Policy and Support - BOSA (NTRBE-0671516647),OU=FPS Home Affairs - BIK-GCI (NTRBE-0362475538),O=Kingdom of Belgium - Federal Government,L=Brussels,C=BE
+Issuer: CN=Belgium Root CA6,OU=FPS Policy and Support - BOSA (NTRBE-0671516647),OU=FPS Home Affairs - BIK-GCI (NTRBE-0362475538),O=Kingdom of Belgium - Federal Government,L=Brussels,C=BE
+-----BEGIN CERTIFICATE-----
+MIIEmjCCBCCgAwIBAgIULtbkYSnFlNDu9AHhjDYrOy+HmyswCgYIKoZIzj0EAwMw
+geAxCzAJBgNVBAYTAkJFMREwDwYDVQQHDAhCcnVzc2VsczEwMC4GA1UECgwnS2lu
+Z2RvbSBvZiBCZWxnaXVtIC0gRmVkZXJhbCBHb3Zlcm5tZW50MTYwNAYDVQQLDC1G
+UFMgSG9tZSBBZmZhaXJzIC0gQklLLUdDSSAoTlRSQkUtMDM2MjQ3NTUzOCkxOTA3
+BgNVBAsMMEZQUyBQb2xpY3kgYW5kIFN1cHBvcnQgLSBCT1NBIChOVFJCRS0wNjcx
+NTE2NjQ3KTEZMBcGA1UEAwwQQmVsZ2l1bSBSb290IENBNjAeFw0yMDA2MDMxNjQ4
+MjNaFw0zMjA2MDMxNjQ4MjNaMIHrMQswCQYDVQQGEwJCRTERMA8GA1UEBwwIQnJ1
+c3NlbHMxMDAuBgNVBAoMJ0tpbmdkb20gb2YgQmVsZ2l1bSAtIEZlZGVyYWwgR292
+ZXJubWVudDE2MDQGA1UECwwtRlBTIEhvbWUgQWZmYWlycyAtIEJJSy1HQ0kgKE5U
+UkJFLTAzNjI0NzU1MzgpMTkwNwYDVQQLDDBGUFMgUG9saWN5IGFuZCBTdXBwb3J0
+IC0gQk9TQSAoTlRSQkUtMDY3MTUxNjY0NykxDzANBgNVBAUTBjIwMjAwMjETMBEG
+A1UEAwwKQ2l0aXplbiBDQTB2MBAGByqGSM49AgEGBSuBBAAiA2IABGm/xr09Igfi
+fHCbha2pPOKHslYQ2sHivezdP3upkQ/fxpg5iXpQtnN/aa9Kx9SBoUrQX6bMChr6
+YbFLbHmb9bUH9dL2dD5wRpyspSCEqC9eyUi6t2sfi98IvxKJV7IK3aOCAYwwggGI
+MBIGA1UdEwEB/wQIMAYBAf8CAQAwHwYDVR0jBBgwFoAULqCIsAsNYonsHT/Un8yS
+RI5IaUYwewYIKwYBBQUHAQEEbzBtMDYGCCsGAQUFBzAChipodHRwOi8vY3J0LmVp
+ZHBraS5iZWxnaXVtLmJlL2VpZC9icmNhNi5jcnQwMwYIKwYBBQUHMAGGJ2h0dHA6
+Ly9vY3NwLmVpZHBraS5iZWxnaXVtLmJlL2VpZC9icmNhNjBJBgNVHSAEQjBAMD4G
+BFUdIAAwNjA0BggrBgEFBQcCARYoaHR0cHM6Ly9yZXBvc2l0b3J5LmVpZHBraS5i
+ZWxnaXVtLmJlL2VpZDAdBgNVHSUEFjAUBggrBgEFBQcDAgYIKwYBBQUHAwQwOwYD
+VR0fBDQwMjAwoC6gLIYqaHR0cDovL2NybC5laWRwa2kuYmVsZ2l1bS5iZS9laWQv
+YnJjYTYuY3JsMB0GA1UdDgQWBBSvMdNkTV80uG70wpduAZ1hMphehjAOBgNVHQ8B
+Af8EBAMCAQYwCgYIKoZIzj0EAwMDaAAwZQIwG3A3+oDsuzHkKwCdTpGFiszcHDyf
+WKOJ0IRw5FNXCIfpTZaBKJcQWhF0WAXv1vhvAjEA93Dsx/I5IR41nwMaV1e7Lkp6
+OUh7tqMLzCkMPC6TTM/wXbmjffCYG+0IyMDpxqre
+-----END CERTIFICATE-----
diff --git a/doc/sdk/documentation/Applet 1.8 eID Cards/Certificate_samples/ForeignerCA202001.pem b/doc/sdk/documentation/Applet 1.8 eID Cards/Certificate_samples/ForeignerCA202001.pem
new file mode 100644
index 000000000..47687f08b
--- /dev/null
+++ b/doc/sdk/documentation/Applet 1.8 eID Cards/Certificate_samples/ForeignerCA202001.pem
@@ -0,0 +1,29 @@
+Subject: CN=Foreigner CA,SN=202001,OU=FPS Policy and Support - BOSA (NTRBE-0671516647),OU=FPS Home Affairs - BIK-GCI (NTRBE-0362475538),O=Kingdom of Belgium - Federal Government,L=Brussels,C=BE
+Issuer: CN=Belgium Root CA6,OU=FPS Policy and Support - BOSA (NTRBE-0671516647),OU=FPS Home Affairs - BIK-GCI (NTRBE-0362475538),O=Kingdom of Belgium - Federal Government,L=Brussels,C=BE
+-----BEGIN CERTIFICATE-----
+MIIEnDCCBCKgAwIBAgIUaiLehgh5xSg56XU+ZxDMS4MXqKAwCgYIKoZIzj0EAwMw
+geAxCzAJBgNVBAYTAkJFMREwDwYDVQQHDAhCcnVzc2VsczEwMC4GA1UECgwnS2lu
+Z2RvbSBvZiBCZWxnaXVtIC0gRmVkZXJhbCBHb3Zlcm5tZW50MTYwNAYDVQQLDC1G
+UFMgSG9tZSBBZmZhaXJzIC0gQklLLUdDSSAoTlRSQkUtMDM2MjQ3NTUzOCkxOTA3
+BgNVBAsMMEZQUyBQb2xpY3kgYW5kIFN1cHBvcnQgLSBCT1NBIChOVFJCRS0wNjcx
+NTE2NjQ3KTEZMBcGA1UEAwwQQmVsZ2l1bSBSb290IENBNjAeFw0yMDA2MDMxNzAy
+MjBaFw0zMjA2MDMxNzAyMjBaMIHtMQswCQYDVQQGEwJCRTERMA8GA1UEBwwIQnJ1
+c3NlbHMxMDAuBgNVBAoMJ0tpbmdkb20gb2YgQmVsZ2l1bSAtIEZlZGVyYWwgR292
+ZXJubWVudDE2MDQGA1UECwwtRlBTIEhvbWUgQWZmYWlycyAtIEJJSy1HQ0kgKE5U
+UkJFLTAzNjI0NzU1MzgpMTkwNwYDVQQLDDBGUFMgUG9saWN5IGFuZCBTdXBwb3J0
+IC0gQk9TQSAoTlRSQkUtMDY3MTUxNjY0NykxDzANBgNVBAUTBjIwMjAwMTEVMBMG
+A1UEAwwMRm9yZWlnbmVyIENBMHYwEAYHKoZIzj0CAQYFK4EEACIDYgAEBaTG/+k8
+RT2gEmk+iDpP3X9Xg+CbwriQe/QY5niwS5rOmyniY57VwhXnqb5dqZH0ilqAoteV
+qn57uY6KBsPxLBnYHaQEbkinKpkPNITjN+N0bgDHmx5G48r5vH04bIdbo4IBjDCC
+AYgwEgYDVR0TAQH/BAgwBgEB/wIBADAfBgNVHSMEGDAWgBQuoIiwCw1iiewdP9Sf
+zJJEjkhpRjB7BggrBgEFBQcBAQRvMG0wNgYIKwYBBQUHMAKGKmh0dHA6Ly9jcnQu
+ZWlkcGtpLmJlbGdpdW0uYmUvZWlkL2JyY2E2LmNydDAzBggrBgEFBQcwAYYnaHR0
+cDovL29jc3AuZWlkcGtpLmJlbGdpdW0uYmUvZWlkL2JyY2E2MEkGA1UdIARCMEAw
+PgYEVR0gADA2MDQGCCsGAQUFBwIBFihodHRwczovL3JlcG9zaXRvcnkuZWlkcGtp
+LmJlbGdpdW0uYmUvZWlkMB0GA1UdJQQWMBQGCCsGAQUFBwMCBggrBgEFBQcDBDA7
+BgNVHR8ENDAyMDCgLqAshipodHRwOi8vY3JsLmVpZHBraS5iZWxnaXVtLmJlL2Vp
+ZC9icmNhNi5jcmwwHQYDVR0OBBYEFBLZ4BaK1CNRXGWnabejUGtffs79MA4GA1Ud
+DwEB/wQEAwIBBjAKBggqhkjOPQQDAwNoADBlAjB4tSBFr+ION0g5DXliWS13o/d4
+Glkv6H5zFdxeTiJpESjbIJJQuvUOMOGSos0cOBQCMQColrsRje7ObUm/kO1JAMWL
+XI8LB6f3xXnbBKcSyxbIwzMxaVnQPfuMYD2T2XTTMJs=
+-----END CERTIFICATE-----
diff --git a/doc/sdk/documentation/Applet 1.8 eID Cards/Certificate_samples/README.txt b/doc/sdk/documentation/Applet 1.8 eID Cards/Certificate_samples/README.txt
new file mode 100644
index 000000000..33a112c1f
--- /dev/null
+++ b/doc/sdk/documentation/Applet 1.8 eID Cards/Certificate_samples/README.txt
@@ -0,0 +1,2 @@
+This folder contains the new belgium rootCA (BRCA6) and 2 subCA's.
+They are placed here as samples as they are not yet available on the official repository.
\ No newline at end of file
diff --git a/doc/sdk/documentation/Applet 1.8 eID Cards/ID_ADRESSE_File_applet1_8_v1.pdf b/doc/sdk/documentation/Applet 1.8 eID Cards/ID_ADRESSE_File_applet1_8_v1.pdf
new file mode 100644
index 000000000..3433033cc
Binary files /dev/null and b/doc/sdk/documentation/Applet 1.8 eID Cards/ID_ADRESSE_File_applet1_8_v1.pdf differ
diff --git a/doc/sdk/documentation/Applet 1.8 eID Cards/Public_Belpic_Applet_v1 8_Ref_Manual_v1 .pdf b/doc/sdk/documentation/Applet 1.8 eID Cards/Public_Belpic_Applet_v1 8_Ref_Manual_v1 .pdf
new file mode 100644
index 000000000..6423cf62b
Binary files /dev/null and b/doc/sdk/documentation/Applet 1.8 eID Cards/Public_Belpic_Applet_v1 8_Ref_Manual_v1 .pdf differ
diff --git a/doc/sdk/documentation/beidsdk_card_data.odt b/doc/sdk/documentation/beidsdk_card_data.odt
index 03e1623b9..5c07e32f3 100644
Binary files a/doc/sdk/documentation/beidsdk_card_data.odt and b/doc/sdk/documentation/beidsdk_card_data.odt differ
diff --git a/doc/sdk/documentation/beidsdk_card_data.pdf b/doc/sdk/documentation/beidsdk_card_data.pdf
index ceaa9ed75..991d96ef9 100644
Binary files a/doc/sdk/documentation/beidsdk_card_data.pdf and b/doc/sdk/documentation/beidsdk_card_data.pdf differ
diff --git a/installers/quickinstaller/NSIS_Plugins/VS_2019/beidplugins.sln b/installers/quickinstaller/NSIS_Plugins/VS_2019/beidplugins.sln
new file mode 100644
index 000000000..546c52b98
--- /dev/null
+++ b/installers/quickinstaller/NSIS_Plugins/VS_2019/beidplugins.sln
@@ -0,0 +1,31 @@
+
+Microsoft Visual Studio Solution File, Format Version 12.00
+# Visual Studio 15
+VisualStudioVersion = 15.0.28307.1022
+MinimumVisualStudioVersion = 10.0.40219.1
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "beid", "..\beidread\VS_2019\beid.vcxproj", "{4B2710AE-D5BF-4C35-A70E-1ECB05205FC6}"
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "beidread_test", "..\beidread_test\VS_2019\beidread_test.vcxproj", "{AD1249FE-22CA-471E-8706-8E0A4FE9F098}"
+EndProject
+Global
+ GlobalSection(SolutionConfigurationPlatforms) = preSolution
+ Debug|x86 = Debug|x86
+ Release|x86 = Release|x86
+ EndGlobalSection
+ GlobalSection(ProjectConfigurationPlatforms) = postSolution
+ {4B2710AE-D5BF-4C35-A70E-1ECB05205FC6}.Debug|x86.ActiveCfg = Debug|Win32
+ {4B2710AE-D5BF-4C35-A70E-1ECB05205FC6}.Debug|x86.Build.0 = Debug|Win32
+ {4B2710AE-D5BF-4C35-A70E-1ECB05205FC6}.Release|x86.ActiveCfg = Release|Win32
+ {4B2710AE-D5BF-4C35-A70E-1ECB05205FC6}.Release|x86.Build.0 = Release|Win32
+ {AD1249FE-22CA-471E-8706-8E0A4FE9F098}.Debug|x86.ActiveCfg = Debug|Win32
+ {AD1249FE-22CA-471E-8706-8E0A4FE9F098}.Debug|x86.Build.0 = Debug|Win32
+ {AD1249FE-22CA-471E-8706-8E0A4FE9F098}.Release|x86.ActiveCfg = Release|Win32
+ {AD1249FE-22CA-471E-8706-8E0A4FE9F098}.Release|x86.Build.0 = Release|Win32
+ EndGlobalSection
+ GlobalSection(SolutionProperties) = preSolution
+ HideSolutionNode = FALSE
+ EndGlobalSection
+ GlobalSection(ExtensibilityGlobals) = postSolution
+ SolutionGuid = {95CEB61D-32B6-4BB4-8D31-D6E95F8C70EB}
+ EndGlobalSection
+EndGlobal
diff --git a/installers/quickinstaller/NSIS_Plugins/beidread/VS_2019/beid.vcxproj b/installers/quickinstaller/NSIS_Plugins/beidread/VS_2019/beid.vcxproj
new file mode 100644
index 000000000..b8e826fda
--- /dev/null
+++ b/installers/quickinstaller/NSIS_Plugins/beidread/VS_2019/beid.vcxproj
@@ -0,0 +1,171 @@
+
+
+
+
+ Debug
+ Win32
+
+
+ Release
+ Win32
+
+
+
+ beid
+ {4B2710AE-D5BF-4C35-A70E-1ECB05205FC6}
+ exdll
+ 10.0
+
+
+
+ DynamicLibrary
+ false
+ MultiByte
+ v142
+
+
+ DynamicLibrary
+ false
+ MultiByte
+ v142
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ <_ProjectFileVersion>10.0.30319.1
+ ..\$(Configuration)\
+ ..\$(Configuration)\
+ false
+ ..\$(Configuration)\
+ ..\$(Configuration)\
+ true
+
+
+
+ NDEBUG;%(PreprocessorDefinitions)
+ true
+ true
+ Win32
+ .\Release/exdll.tlb
+
+
+
+
+ MinSpace
+ Default
+ ..\..\nsis;.;..\..\..\..\..\\doc\sdk\include\rsaref220;%(AdditionalIncludeDirectories)
+ NDEBUG;WIN32;_WINDOWS;_USRDLL;EXDLL_EXPORTS;NSISCALL=__stdcall;%(PreprocessorDefinitions)
+ true
+ MultiThreadedDLL
+ false
+ true
+ .\Release\beid.pch
+ .\Release/
+ .\Release/
+ .\Release/
+ Level3
+ true
+ CompileAsC
+
+
+ NDEBUG;%(PreprocessorDefinitions)
+ 0x0409
+
+
+ ucrt.lib;odbc32.lib;odbccp32.lib;..\..\nsis\pluginapi.lib;%(AdditionalDependencies)
+ $(OutDir)$(TargetName)$(TargetExt)
+ true
+ false
+ LIBC.lib;%(IgnoreSpecificDefaultLibraries)
+ .\Release\beid.pdb
+ DllMain
+ false
+
+
+ .\Release\beid.lib
+ MachineX86
+
+
+
+ true
+ .\Release/beid.bsc
+
+
+
+
+ _DEBUG;%(PreprocessorDefinitions)
+ true
+ true
+ Win32
+ .\Debug/exdll.tlb
+
+
+
+
+ Disabled
+ ..\..\nsis;.;..\..\..\..\..\\doc\sdk\include\rsaref220;%(AdditionalIncludeDirectories)
+ _DEBUG;WIN32;_WINDOWS;_USRDLL;EXDLL_EXPORTS;NSISCALL=__stdcall;%(PreprocessorDefinitions)
+ true
+ Default
+ MultiThreadedDebugDLL
+ false
+ .\Debug\beid.pch
+ .\Debug/
+ .\Debug/
+ .\Debug/
+ Level3
+ true
+ EditAndContinue
+
+
+ _DEBUG;%(PreprocessorDefinitions)
+ 0x0409
+
+
+ ucrt.lib;odbc32.lib;odbccp32.lib;..\..\nsis\pluginapi.lib;%(AdditionalDependencies)
+ $(OutDir)$(TargetName)$(TargetExt)
+ true
+ false
+ LIBC.lib
+ true
+ .\Debug\beid.pdb
+ DllMain
+ false
+
+
+ .\Debug\beid.lib
+ MachineX86
+
+
+
+ true
+ .\Debug\beid.bsc
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/installers/quickinstaller/NSIS_Plugins/beidread_test/VS_2019/beidread_test.vcxproj b/installers/quickinstaller/NSIS_Plugins/beidread_test/VS_2019/beidread_test.vcxproj
new file mode 100644
index 000000000..199fcb02a
--- /dev/null
+++ b/installers/quickinstaller/NSIS_Plugins/beidread_test/VS_2019/beidread_test.vcxproj
@@ -0,0 +1,106 @@
+
+
+
+
+ Debug
+ Win32
+
+
+ Release
+ Win32
+
+
+
+ {AD1249FE-22CA-471E-8706-8E0A4FE9F098}
+ Win32Proj
+ beidread_test
+ 10.0
+
+
+
+ Application
+ true
+ MultiByte
+ v142
+
+
+ Application
+ false
+ true
+ Unicode
+ v142
+
+
+
+
+
+
+
+
+
+
+
+
+ true
+ ..\$(Configuration)\
+ ..\$(Configuration)\
+
+
+ false
+ ..\$(Configuration)\
+ ..\$(Configuration)\
+
+
+
+ NotUsing
+ Level3
+ Disabled
+ WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)
+ ..\..\beidread;../;..\..\..\..\..\doc\sdk\include\rsaref220
+ SyncCThrow
+ CompileAsC
+
+
+ Console
+ true
+
+
+
+
+ Level3
+ NotUsing
+ MaxSpeed
+ true
+ true
+ WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)
+ CompileAsC
+ ..\..\beidread;../;..\..\..\..\..\doc\sdk\include\rsaref220
+
+
+ Console
+ true
+ true
+ true
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/plugins_tools/eid-viewer/Windows/VS_2019/README.txt b/plugins_tools/eid-viewer/Windows/VS_2019/README.txt
new file mode 100644
index 000000000..0a6eeaebf
--- /dev/null
+++ b/plugins_tools/eid-viewer/Windows/VS_2019/README.txt
@@ -0,0 +1,3 @@
+The eID Viewer project is currently not added to the solution file yet,
+if you want to build the eIDViewer, just add the eID Viewer project from
+plugins_tools\eid-viewer\Windows\eIDViewer
\ No newline at end of file
diff --git a/plugins_tools/eid-viewer/Windows/VS_2019/eIDViewer.sln b/plugins_tools/eid-viewer/Windows/VS_2019/eIDViewer.sln
new file mode 100644
index 000000000..d0eea177c
--- /dev/null
+++ b/plugins_tools/eid-viewer/Windows/VS_2019/eIDViewer.sln
@@ -0,0 +1,31 @@
+
+Microsoft Visual Studio Solution File, Format Version 12.00
+# Visual Studio Version 16
+VisualStudioVersion = 16.0.30204.135
+MinimumVisualStudioVersion = 10.0.40219.1
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "eIDViewerBackend", "..\eIDViewerBackend\VS_2019\eIDViewerBackend.vcxproj", "{754CDA28-B21E-4919-94A2-2DC6BA77F578}"
+EndProject
+Global
+ GlobalSection(SolutionConfigurationPlatforms) = preSolution
+ Debug|x64 = Debug|x64
+ Debug|x86 = Debug|x86
+ Release|x64 = Release|x64
+ Release|x86 = Release|x86
+ EndGlobalSection
+ GlobalSection(ProjectConfigurationPlatforms) = postSolution
+ {754CDA28-B21E-4919-94A2-2DC6BA77F578}.Debug|x64.ActiveCfg = Debug|x64
+ {754CDA28-B21E-4919-94A2-2DC6BA77F578}.Debug|x64.Build.0 = Debug|x64
+ {754CDA28-B21E-4919-94A2-2DC6BA77F578}.Debug|x86.ActiveCfg = Debug|Win32
+ {754CDA28-B21E-4919-94A2-2DC6BA77F578}.Debug|x86.Build.0 = Debug|Win32
+ {754CDA28-B21E-4919-94A2-2DC6BA77F578}.Release|x64.ActiveCfg = Release|x64
+ {754CDA28-B21E-4919-94A2-2DC6BA77F578}.Release|x64.Build.0 = Release|x64
+ {754CDA28-B21E-4919-94A2-2DC6BA77F578}.Release|x86.ActiveCfg = Release|Win32
+ {754CDA28-B21E-4919-94A2-2DC6BA77F578}.Release|x86.Build.0 = Release|Win32
+ EndGlobalSection
+ GlobalSection(SolutionProperties) = preSolution
+ HideSolutionNode = FALSE
+ EndGlobalSection
+ GlobalSection(ExtensibilityGlobals) = postSolution
+ SolutionGuid = {5E1EA9A0-5078-45DB-8599-55C0A4B9A8BF}
+ EndGlobalSection
+EndGlobal
diff --git a/plugins_tools/eid-viewer/Windows/eIDViewer/Resources/Certs/readme.txt b/plugins_tools/eid-viewer/Windows/eIDViewer/Resources/Certs/readme.txt
index 902a2cb61..2f69b299c 100644
--- a/plugins_tools/eid-viewer/Windows/eIDViewer/Resources/Certs/readme.txt
+++ b/plugins_tools/eid-viewer/Windows/eIDViewer/Resources/Certs/readme.txt
@@ -1 +1 @@
-In this directory, the trusted certificates (.pem) from \plugins_tools\eid-viewer\certs will be copied.
\ No newline at end of file
+In this directory, the trusted certificates (.pem) from \plugins_tools\eid-viewer\certs will be copied by the eIDViewer Visual Studio project.
\ No newline at end of file
diff --git a/plugins_tools/eid-viewer/Windows/eIDViewer/Sources/About.cs b/plugins_tools/eid-viewer/Windows/eIDViewer/Sources/About.cs
index 886baf140..db1ae9f7d 100644
--- a/plugins_tools/eid-viewer/Windows/eIDViewer/Sources/About.cs
+++ b/plugins_tools/eid-viewer/Windows/eIDViewer/Sources/About.cs
@@ -7,7 +7,7 @@ public static class About
{
public static string AboutMessage()
{
- string message = @"eID Viewer 5.0.4
+ string message = @"eID Viewer 5.0.6
eID Middleware Project
Copyright(C) 2020 Bosa
diff --git a/plugins_tools/eid-viewer/Windows/eIDViewer/Sources/BackendDataViewModel.cs b/plugins_tools/eid-viewer/Windows/eIDViewer/Sources/BackendDataViewModel.cs
index dcce872ba..542fec204 100644
--- a/plugins_tools/eid-viewer/Windows/eIDViewer/Sources/BackendDataViewModel.cs
+++ b/plugins_tools/eid-viewer/Windows/eIDViewer/Sources/BackendDataViewModel.cs
@@ -372,7 +372,8 @@ public bool VerifyRootCA(ref X509Certificate2 rootCertOnCard, ref CertViewModel
bool foundEmbeddedRootCA = false;
string[] embeddedRootCAs = { "eIDViewer.Resources.Certs.belgiumrca2.pem",
"eIDViewer.Resources.Certs.belgiumrca3.pem",
- "eIDViewer.Resources.Certs.belgiumrca4.pem"};
+ "eIDViewer.Resources.Certs.belgiumrca4.pem",
+ "eIDViewer.Resources.Certs.belgiumrca6.pem"};
if( (rootCertOnCard == null) || (rootViewModel == null) )
{
diff --git a/plugins_tools/eid-viewer/Windows/eIDViewer/eIDViewer.csproj b/plugins_tools/eid-viewer/Windows/eIDViewer/eIDViewer.csproj
index 306548267..dade6fb59 100644
--- a/plugins_tools/eid-viewer/Windows/eIDViewer/eIDViewer.csproj
+++ b/plugins_tools/eid-viewer/Windows/eIDViewer/eIDViewer.csproj
@@ -182,6 +182,7 @@
+
diff --git a/plugins_tools/eid-viewer/Windows/eIDViewerBackend/VS_2019/eIDViewerBackend.vcxproj b/plugins_tools/eid-viewer/Windows/eIDViewerBackend/VS_2019/eIDViewerBackend.vcxproj
new file mode 100644
index 000000000..0616ec0ec
--- /dev/null
+++ b/plugins_tools/eid-viewer/Windows/eIDViewerBackend/VS_2019/eIDViewerBackend.vcxproj
@@ -0,0 +1,237 @@
+
+
+
+
+ Debug
+ Win32
+
+
+ Debug
+ x64
+
+
+ Release
+ Win32
+
+
+ Release
+ x64
+
+
+
+ {754CDA28-B21E-4919-94A2-2DC6BA77F578}
+ Win32Proj
+ eIDViewerBackend
+ 10.0
+
+
+
+ DynamicLibrary
+ true
+ v142
+ Unicode
+
+
+ DynamicLibrary
+ true
+ v142
+ Unicode
+
+
+ DynamicLibrary
+ false
+ v142
+ true
+ Unicode
+
+
+ DynamicLibrary
+ false
+ v142
+ true
+ Unicode
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Binaries\$(Platform)_$(Configuration)\
+ false
+ $(Platform)_$(Configuration)\
+
+
+ false
+ Binaries\$(Platform)_$(Configuration)\
+ $(Platform)_$(Configuration)\
+
+
+ Binaries\$(Platform)_$(Configuration)\
+ $(Platform)_$(Configuration)\
+
+
+ Binaries\$(Platform)_$(Configuration)\
+ $(Platform)_$(Configuration)\
+
+
+
+
+
+ Level3
+ Disabled
+ WIN32;_CRT_SECURE_NO_WARNINGS;_DEBUG;_LIB;%(PreprocessorDefinitions)
+ true
+ ..\..\..\..\..\doc\sdk\include\rsaref220;..\..\..\;..\..\..\..\..\tests\unit;..\..\..\..\util;..\..\..\include
+ Default
+
+
+ Windows
+ true
+ beid_ff_pkcs11D.lib;Xmllite.lib;Shlwapi.lib;%(AdditionalDependencies)
+ ..\..\..\..\..\cardcomm\pkcs11\VS_2017\Binaries\Win32_PKCS11_FF_DEBUG\
+ $(SolutionDir)\..\eIDViewer\bin\Debug\$(TargetName)$(TargetExt)
+
+
+
+
+
+
+ Level3
+ Disabled
+ WIN32;_CRT_SECURE_NO_WARNINGS;_DEBUG;_LIB;%(PreprocessorDefinitions)
+ true
+ ..\..\..\..\..\doc\sdk\include\rsaref220;..\..\..\;..\..\..\..\..\tests\unit;..\..\..\..\util;..\..\..\include
+ Default
+
+
+ Windows
+ true
+ beid_ff_pkcs11D.lib;Xmllite.lib;Shlwapi.lib;%(AdditionalDependencies)
+ ..\..\..\..\..\cardcomm\pkcs11\VS_2017\Binaries\x64_PKCS11_FF_DEBUG\
+ $(SolutionDir)\..\eIDViewer\bin\Debug\$(TargetName)$(TargetExt)
+
+
+
+
+ Level3
+
+
+ MaxSpeed
+ true
+ true
+ WIN32;_CRT_SECURE_NO_WARNINGS;NDEBUG;_LIB;%(PreprocessorDefinitions)
+ true
+ ..\..\..\..\..\doc\sdk\include\rsaref220;..\..\..\;..\..\..\..\..\tests\unit;..\..\..\..\util;..\..\..\include
+
+
+ Windows
+ true
+ true
+ true
+ beid_ff_pkcs11.lib;Xmllite.lib;Shlwapi.lib;%(AdditionalDependencies)
+ ..\..\..\..\..\cardcomm\pkcs11\VS_2017\Binaries\Win32_PKCS11_FF_Release\
+
+
+ beidpkcs11.lib
+ ..\..\..\..\..\cardcomm\pkcs11\VS_2017\Binaries\Win32_release
+
+
+
+
+ Level3
+
+
+ MaxSpeed
+ true
+ true
+ WIN32;_CRT_SECURE_NO_WARNINGS;NDEBUG;_LIB;%(PreprocessorDefinitions)
+ true
+ ..\..\..\..\..\doc\sdk\include\rsaref220;..\..\..\;..\..\..\..\..\tests\unit;..\..\..\..\util;..\..\..\include
+
+
+ Windows
+ true
+ true
+ true
+ beid_ff_pkcs11.lib;Xmllite.lib;Shlwapi.lib;%(AdditionalDependencies)
+ ..\..\..\..\..\cardcomm\pkcs11\VS_2017\Binaries\x64_PKCS11_FF_Release\
+
+
+ beidpkcs11.lib
+ ..\..\..\..\..\cardcomm\pkcs11\VS_2017\Binaries\Win32_release
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/plugins_tools/eid-viewer/certs/667fef03.0 b/plugins_tools/eid-viewer/certs/667fef03.0
new file mode 120000
index 000000000..a79f94d29
--- /dev/null
+++ b/plugins_tools/eid-viewer/certs/667fef03.0
@@ -0,0 +1 @@
+belgiumrca6.pem
\ No newline at end of file
diff --git a/plugins_tools/eid-viewer/certs/README.md b/plugins_tools/eid-viewer/certs/README.md
new file mode 100644
index 000000000..b45011ada
--- /dev/null
+++ b/plugins_tools/eid-viewer/certs/README.md
@@ -0,0 +1,7 @@
+The files in this directory are the currently active root certificates
+for the Belgian eID PKI.
+
+The .0 and .1 files are symlinks to the hashed versions of these
+certificates, as required by OpenSSL for the
+[`X509_LOOKUP_add_dir()`](https://www.openssl.org/docs/manmaster/man3/X509_LOOKUP_add_dir.html)
+call.
diff --git a/plugins_tools/eid-viewer/certs/a094a3c4.0 b/plugins_tools/eid-viewer/certs/a094a3c4.0
new file mode 120000
index 000000000..a79f94d29
--- /dev/null
+++ b/plugins_tools/eid-viewer/certs/a094a3c4.0
@@ -0,0 +1 @@
+belgiumrca6.pem
\ No newline at end of file
diff --git a/plugins_tools/eid-viewer/certs/belgiumrca6.pem b/plugins_tools/eid-viewer/certs/belgiumrca6.pem
new file mode 100644
index 000000000..238846241
--- /dev/null
+++ b/plugins_tools/eid-viewer/certs/belgiumrca6.pem
@@ -0,0 +1,21 @@
+-----BEGIN CERTIFICATE-----
+MIIDaDCCAu2gAwIBAgIUcYtX/2tpPlocI17Yh6PvUfQBDyYwCgYIKoZIzj0EAwMw
+geAxCzAJBgNVBAYTAkJFMREwDwYDVQQHDAhCcnVzc2VsczEwMC4GA1UECgwnS2lu
+Z2RvbSBvZiBCZWxnaXVtIC0gRmVkZXJhbCBHb3Zlcm5tZW50MTYwNAYDVQQLDC1G
+UFMgSG9tZSBBZmZhaXJzIC0gQklLLUdDSSAoTlRSQkUtMDM2MjQ3NTUzOCkxOTA3
+BgNVBAsMMEZQUyBQb2xpY3kgYW5kIFN1cHBvcnQgLSBCT1NBIChOVFJCRS0wNjcx
+NTE2NjQ3KTEZMBcGA1UEAwwQQmVsZ2l1bSBSb290IENBNjAeFw0yMDA2MDMxMDAx
+MzFaFw00MDA2MDMxMDAxMzFaMIHgMQswCQYDVQQGEwJCRTERMA8GA1UEBwwIQnJ1
+c3NlbHMxMDAuBgNVBAoMJ0tpbmdkb20gb2YgQmVsZ2l1bSAtIEZlZGVyYWwgR292
+ZXJubWVudDE2MDQGA1UECwwtRlBTIEhvbWUgQWZmYWlycyAtIEJJSy1HQ0kgKE5U
+UkJFLTAzNjI0NzU1MzgpMTkwNwYDVQQLDDBGUFMgUG9saWN5IGFuZCBTdXBwb3J0
+IC0gQk9TQSAoTlRSQkUtMDY3MTUxNjY0NykxGTAXBgNVBAMMEEJlbGdpdW0gUm9v
+dCBDQTYwdjAQBgcqhkjOPQIBBgUrgQQAIgNiAAR532ARaLVsPSf5Pz9+b5ExaxpC
+e8iGGkDgkbUlGM0ulbr0YqbKva7EoOAY+YL5ZJs8S0KIsuQNc0f2vgI8xcyPQHge
+CaLcw0OzvmfCHf/OMOIozEKgKaAK6pHvaBXP0tijZjBkMBIGA1UdEwEB/wQIMAYB
+Af8CAQEwHwYDVR0jBBgwFoAULqCIsAsNYonsHT/Un8ySRI5IaUYwHQYDVR0OBBYE
+FC6giLALDWKJ7B0/1J/MkkSOSGlGMA4GA1UdDwEB/wQEAwIBBjAKBggqhkjOPQQD
+AwNpADBmAjEAt2e2vVG4/aMjIokbQQuCnvI8so8rZl/IbKupMCJitfFi7oVlHllY
+FDdYMDTKWLZgAjEAsa2wuz3Ew6/68XXtIT+51snqkl2KLlaVgKXYlpTh2zqQBIBd
+KO1nMO/rQRfuZ701
+-----END CERTIFICATE-----
diff --git a/scripts/windows/set_eidmw_version.cmd b/scripts/windows/set_eidmw_version.cmd
index ba32aba25..355965279 100644
--- a/scripts/windows/set_eidmw_version.cmd
+++ b/scripts/windows/set_eidmw_version.cmd
@@ -4,7 +4,7 @@
@SET BASE_VERSION1=5
@SET BASE_VERSION2=0
-@SET BASE_VERSION3=4
+@SET BASE_VERSION3=6
@SET YEAR=2020