Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot read eID Carddate when user logins in on his PC using a AZURE Domein account (again) #180

Open
SGE66 opened this issue Sep 21, 2022 · 36 comments

Comments

@SGE66
Copy link

SGE66 commented Sep 21, 2022

Hi,

I refer to #100

We have this issue if Windows Hello is used connecting to an Azure account ('local' logon with PIN code is no problem).

We can pinpoint the problem to following code (code used from sdk40 (example data.c file):

retVal = (pFunctions->C_GetSlotList) (CK_TRUE, 0, &slot_count);

Appareantly (card) reader cannot be accessed, no 'slots' are found.

Anyone experiencing the same problem and any idea to solve this ?

Tested with latest middleware version 5.0.17 (but alo 4.4.4 gave same error).

`
CK_ULONG beidsdk_GetData()
{
void *pkcs11Handle; //handle to the pkcs11 library
CK_FUNCTION_LIST_PTR pFunctions; //list of the pkcs11 function pointers
CK_C_GetFunctionList pC_GetFunctionList;
CK_RV retVal = CKR_OK;
DWORD err;

//Open the pkcs11 library
pkcs11Handle = dlopen(PKCS11_LIB, RTLD_LAZY); // RTLD_NOW is slower
if (pkcs11Handle != NULL) 
{
	// Get function pointer to C_GetFunctionList
	pC_GetFunctionList = (CK_C_GetFunctionList)dlsym(pkcs11Handle, "C_GetFunctionList");
	if (pC_GetFunctionList != NULL) 
	{
		// Invoke C_GetFunctionList to get the list of pkcs11 function pointers
		retVal = (*pC_GetFunctionList) (&pFunctions);
		if (retVal == CKR_OK) 
		{
			// initialize Cryptoki
			retVal = (pFunctions->C_Initialize) (NULL);
			if (retVal == CKR_OK)
			{		
				CK_ULONG slot_count = 0;
				// retrieve the number of slots (cardreaders) found
					//set first parameter to CK_FALSE if you also want to find the slots without a card inserted
					retVal = (pFunctions->C_GetSlotList) (CK_TRUE, 0, &slot_count);
					if ((retVal == CKR_OK) && (slot_count > 0) )
					{
						CK_SLOT_ID_PTR slotIds = (CK_SLOT_ID_PTR)malloc(slot_count * sizeof(CK_SLOT_INFO));
						if(slotIds != NULL)
					{

...`

@Frederikus
Copy link
Contributor

Frederikus commented Sep 29, 2022

Hello,

Could you provide me with a pkcs#11 log?

how to create one can be found here
https://eid.belgium.be/en/technical-documentation#7480

Thank you

@pieterjanvanneste
Copy link

Hi Frederikus, could you please send me your mailing address? In the log, there's a lot of private information :-D

@Frederikus
Copy link
Contributor

Frederikus commented Sep 30, 2022 via email

@pieterjanvanneste
Copy link

Incident INC0663711

@pieterjanvanneste
Copy link

@Frederikus Can you give me an update on this?

Regards
Pieterjan

@Frederikus
Copy link
Contributor

Hello PieterJan,

Thank you for the logs, it looks similar to the former issue.
Where the viewer gets a slot event and tries to handle it ,but in case of Hello For Business emulated card, during the handling errors are triggered which in turn seems to cause a new slot event.
And then the viewer gets looping.

Normally the pkcs#11 should skip trying to communicate with unknown cars (that's what fixed the issue before), so currently looking into why this case is different.

Wkr,
Frederik

@pieterjanvanneste
Copy link

pieterjanvanneste commented Oct 19, 2022 via email

@Frederikus
Copy link
Contributor

Frederikus commented Oct 20, 2022 via email

@pieterjanvanneste
Copy link

Hi Frederikus

Is there any update on this issue?
I think it is not fixed in the new release.

Regards

Pieterjan Vanneste
Team Lead IT Operations
T: +32 11 71 12 80
E: @.***

@Frederikus
Copy link
Contributor

Frederikus commented Jan 19, 2023 via email

@pieterjanvanneste
Copy link

Hi Frederikus

Is there any update on this issue?

Regards

Pieterjan Vanneste

@SachaPhilipsen
Copy link

Hi Frederikus

We're still awaiting feedback. Could you please provide us with the most recent status?

Kind regards

Sacha

@Frederikus
Copy link
Contributor

Frederikus commented Jan 18, 2024 via email

@SachaPhilipsen
Copy link

SachaPhilipsen commented Jan 22, 2024 via email

@Frederikus
Copy link
Contributor

Frederikus commented Jan 22, 2024 via email

@SachaPhilipsen
Copy link

SachaPhilipsen commented Jan 23, 2024 via email

@SGE66
Copy link
Author

SGE66 commented Jan 23, 2024 via email

@SachaPhilipsen
Copy link

SachaPhilipsen commented Feb 2, 2024 via email

@Frederikus
Copy link
Contributor

Frederikus commented Feb 2, 2024 via email

@SachaPhilipsen
Copy link

SachaPhilipsen commented Feb 2, 2024 via email

@Frederikus
Copy link
Contributor

Frederikus commented Feb 2, 2024 via email

@SachaPhilipsen
Copy link

SachaPhilipsen commented Feb 6, 2024 via email

@Frederikus
Copy link
Contributor

Frederikus commented Feb 8, 2024 via email

@SachaPhilipsen
Copy link

SachaPhilipsen commented Feb 8, 2024 via email

@Frederikus
Copy link
Contributor

Frederikus commented Feb 8, 2024 via email

@MatthiasValvekens
Copy link

with a new eidmw release soon

Point of curiosity as someone following this discussion from the outside: is the proposed fix in the new release supposed to address the general issue of "interference" from other smartcards present, or is it specific to WIndows Hello?

(Context: I ask because on my machine (macOS, totally different platform) the eID middleware typically fails to work when I have both my eID and YubiKey plugged in at the same time. If there's a chance that the root cause is the same and I potentially stand to benefit from this fix as well, I'm happy to try the new release and report back. If not, feel free to ignore this comment.)

@Frederikus
Copy link
Contributor

Frederikus commented Feb 12, 2024 via email

@SachaPhilipsen
Copy link

SachaPhilipsen commented Feb 12, 2024 via email

@Frederikus
Copy link
Contributor

Frederikus commented Feb 29, 2024 via email

@SachaPhilipsen
Copy link

SachaPhilipsen commented May 6, 2024 via email

@Frederikus
Copy link
Contributor

Frederikus commented May 11, 2024 via email

@Frederikus
Copy link
Contributor

Frederikus commented May 20, 2024 via email

@SachaPhilipsen
Copy link

SachaPhilipsen commented May 21, 2024 via email

@Frederikus
Copy link
Contributor

Frederikus commented May 23, 2024 via email

@SachaPhilipsen
Copy link

SachaPhilipsen commented May 24, 2024 via email

@Frederikus
Copy link
Contributor

Frederikus commented May 24, 2024 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants