Difference with Windows (maybe a bug)

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Difference with Windows (maybe a bug)

Abraham Macias Paredes

Hi PCSC lite Project people,

I’m developing a software that must work in Windows and Linux. And I found a difference between Windows PCSC API and “pcsc-lite” that may be a bug.

 

The software has several threads. In a thread a “SCardGetStatusChange” is performed and it locks until there is a change in the status.

When another thread performs a “SCardConnect”, in Windows the “SCardGetStatusChange” call returns with the “SCARD_STATE_INUSE”  flag activated. But in Linux the thread continues locked at “SCardGetStatusChange”.

 

Windows trace:

 

Thread 1: SmartCard SCardGetStatusChange(context: CD00000100000000, timeout: ffffffff)

Thread 1:  atr = 3b 7f ffffff96 0 0 0 6a 46 4e 4d 54 3 4 11 43 4 30 3 ffffff90 0

Thread 1:  [0]   Dell Smart Card Reader Keyboard 0

Thread 1:         user: null, state: 0xb0420, event: 0xb0422

Thread 2: SmartCard SCardConnect(context: CD00000100000001, share: 2, proto: 3, reader: 'Dell Smart Card Reader Keyboard 0')

Thread 1:  -> [0]  Dell Smart Card Reader Keyboard 0

Thread 1:  ->       user: null, state: 0xb0420, event: 0xb0122

 

 

Thread 2: SmartCard Connect successful: 1 hCard: EA00000100000000

 

Linux trace:

 

Thread 1: SmartCard SCardGetStatusChange(context: CD00000100000000, timeout: ffffffff)

Thread 1:  atr = 3b 7f ffffff96 0 0 0 6a 46 4e 4d 54 3 4 11 43 4 30 3 ffffff90 0

Thread 1:  [0]   Dell Smart Card Reader Keyboard 0

Thread 1:         user: null, state: 0x20, event: 0x22

Thread 2:  SmartCard SCardConnect(context: CD00000100000001, share: 2, proto: 3, reader: 'Dell Smart Card Reader Keyboard 0')

Thread 2:  SmartCard Connect successful: 1 hCard: EA00000100000000

 

If I use another thread to perform another “SCardGetStatusChange”, the status shows the “SCARD_STATE_INUSE” flag activated, but the first thread is still locked.

 

Thanks and best regards!

 

Abraham Macías Paredes

Analista / Programador

Departamento de Desarrollo y Soluciones

[hidden email]

 

Ir a la Web de
                  Solutia

Solutia Innovaworld Technologies S.L.
Parque empresarial Los Llanos
C/ Extremadura, 108 - 41909 - Salteras (Sevilla)
T: +34 955 11 11 55
F: +34 954 37 11 42
www.solutia-it.es

Ver
                  Certificaciones de Calidad de Solutia

Sus datos personales contenidos en esta comunicación han sido recogidos de los contactos mantenidos por Vd. o por personas de su entorno, con personal de SOLUTIA INNOVAWORLD TECHNOLOGIES, S.L. y han sido incorporados al fichero de GESTIÓN COMERCIAL con la finalidad de realizar la gestión, seguimiento y mantenimiento de nuestra relación comercial, o a otro fichero correspondiente al tipo de relación que mantiene con nosotros, de lo que Vd. fue convenientemente informado al recibir bien el documento contractual entregado al inicio de los contactos bien en una comunicación inmediatamente posterior en que se daba cumplimiento al derecho de información y se le solicitaba consentimiento para tratar sus datos personales, tratamiento que se efectuará de acuerdo a las finalidades allí expresadas.

En el caso en que ésta sea la primera comunicación que recibe por nuestra parte, le solicitamos su consentimiento para proceder al tratamiento de sus datos de acuerdo a las condiciones detalladas al inicio. Entenderemos que nos presta su consentimiento si en el plazo de un mes a contar desde la recepción de esta comunicación no nos expresa su voluntad en contra. Le informamos que puede revocar en cualquier momento su consentimiento respondiendo a este mail indicando que no desea recibir más información acerca de nuestra empresa, supuesto en el que será automáticamente dado de baja de nuestra lista de correo.

Podrá ejercer sus derechos de acceso, rectificación, cancelación y oposición ante el Responsable del fichero, SOLUTIA INNOVAWORLD TECHNOLOGIES, S.L. en la dirección C/ Extremadura, 108 Parque empresarial Los Llanos; 41909 Salteras, SEVILLA, indicando en la comunicación la referencia "LOPD"

 

 

 


_______________________________________________
Pcsclite-muscle mailing list
[hidden email]
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pcsclite-muscle
Reply | Threaded
Open this post in threaded view
|

Re: Difference with Windows (maybe a bug)

Ludovic Rousseau
2016-09-23 11:03 GMT+02:00 Abraham Macias Paredes <[hidden email]>:

Hi PCSC lite Project people,


Hello,
 

I’m developing a software that must work in Windows and Linux. And I found a difference between Windows PCSC API and “pcsc-lite” that may be a bug.

 

The software has several threads. In a thread a “SCardGetStatusChange” is performed and it locks until there is a change in the status.

When another thread performs a “SCardConnect”, in Windows the “SCardGetStatusChange” call returns with the “SCARD_STATE_INUSE”  flag activated. But in Linux the thread continues locked at “SCardGetStatusChange”.

 

Windows trace:

 

Thread 1: SmartCard SCardGetStatusChange(context: CD00000100000000, timeout: ffffffff)

Thread 1:  atr = 3b 7f ffffff96 0 0 0 6a 46 4e 4d 54 3 4 11 43 4 30 3 ffffff90 0

Thread 1:  [0]   Dell Smart Card Reader Keyboard 0

Thread 1:         user: null, state: 0xb0420, event: 0xb0422

Thread 2: SmartCard SCardConnect(context: CD00000100000001, share: 2, proto: 3, reader: 'Dell Smart Card Reader Keyboard 0')

Thread 1:  -> [0]  Dell Smart Card Reader Keyboard 0

Thread 1:  ->       user: null, state: 0xb0420, event: 0xb0122

 

 

Thread 2: SmartCard Connect successful: 1 hCard: EA00000100000000

 

Linux trace:

 

Thread 1: SmartCard SCardGetStatusChange(context: CD00000100000000, timeout: ffffffff)

Thread 1:  atr = 3b 7f ffffff96 0 0 0 6a 46 4e 4d 54 3 4 11 43 4 30 3 ffffff90 0

Thread 1:  [0]   Dell Smart Card Reader Keyboard 0

Thread 1:         user: null, state: 0x20, event: 0x22

Thread 2:  SmartCard SCardConnect(context: CD00000100000001, share: 2, proto: 3, reader: 'Dell Smart Card Reader Keyboard 0')

Thread 2:  SmartCard Connect successful: 1 hCard: EA00000100000000

 

If I use another thread to perform another “SCardGetStatusChange”, the status shows the “SCARD_STATE_INUSE” flag activated, but the first thread is still locked.


Can you share your sample code with us?

Thanks

--
 Dr. Ludovic Rousseau

_______________________________________________
Pcsclite-muscle mailing list
[hidden email]
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pcsclite-muscle
Reply | Threaded
Open this post in threaded view
|

Re: Difference with Windows (maybe a bug)

Abraham Macias Paredes

Sorry but there is no sample code. It’s a RDP client that connects to a Windows server (with Smart card redirection enabled). In the RDP session I use the Internet Explorer to Access to HTTPS page with user authentication.

 

 

De: Pcsclite-muscle [mailto:pcsclite-muscle-bounces+amacias=[hidden email]] En nombre de Ludovic Rousseau
Enviado el: viernes, 23 de septiembre de 2016 11:23
Para: Talks about MUSCLE <[hidden email]>
Asunto: Re: [Pcsclite-muscle] Difference with Windows (maybe a bug)

 

2016-09-23 11:03 GMT+02:00 Abraham Macias Paredes <[hidden email]>:

Hi PCSC lite Project people,

 

Hello,
 

I’m developing a software that must work in Windows and Linux. And I found a difference between Windows PCSC API and “pcsc-lite” that may be a bug.

 

The software has several threads. In a thread a “SCardGetStatusChange” is performed and it locks until there is a change in the status.

When another thread performs a “SCardConnect”, in Windows the “SCardGetStatusChange” call returns with the “SCARD_STATE_INUSE”  flag activated. But in Linux the thread continues locked at “SCardGetStatusChange”.

 

Windows trace:

 

Thread 1: SmartCard SCardGetStatusChange(context: CD00000100000000, timeout: ffffffff)

Thread 1:  atr = 3b 7f ffffff96 0 0 0 6a 46 4e 4d 54 3 4 11 43 4 30 3 ffffff90 0

Thread 1:  [0]   Dell Smart Card Reader Keyboard 0

Thread 1:         user: null, state: 0xb0420, event: 0xb0422

Thread 2: SmartCard SCardConnect(context: CD00000100000001, share: 2, proto: 3, reader: 'Dell Smart Card Reader Keyboard 0')

Thread 1:  -> [0]  Dell Smart Card Reader Keyboard 0

Thread 1:  ->       user: null, state: 0xb0420, event: 0xb0122

 

 

Thread 2: SmartCard Connect successful: 1 hCard: EA00000100000000

 

Linux trace:

 

Thread 1: SmartCard SCardGetStatusChange(context: CD00000100000000, timeout: ffffffff)

Thread 1:  atr = 3b 7f ffffff96 0 0 0 6a 46 4e 4d 54 3 4 11 43 4 30 3 ffffff90 0

Thread 1:  [0]   Dell Smart Card Reader Keyboard 0

Thread 1:         user: null, state: 0x20, event: 0x22

Thread 2:  SmartCard SCardConnect(context: CD00000100000001, share: 2, proto: 3, reader: 'Dell Smart Card Reader Keyboard 0')

Thread 2:  SmartCard Connect successful: 1 hCard: EA00000100000000

 

If I use another thread to perform another “SCardGetStatusChange”, the status shows the “SCARD_STATE_INUSE” flag activated, but the first thread is still locked.

 

Can you share your sample code with us?

Thanks


--

 Dr. Ludovic Rousseau


_______________________________________________
Pcsclite-muscle mailing list
[hidden email]
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pcsclite-muscle
Reply | Threaded
Open this post in threaded view
|

Re: Difference with Windows (maybe a bug)

Ludovic Rousseau
In reply to this post by Abraham Macias Paredes


2016-09-23 11:03 GMT+02:00 Abraham Macias Paredes <[hidden email]>:

Hi PCSC lite Project people,

I’m developing a software that must work in Windows and Linux. And I found a difference between Windows PCSC API and “pcsc-lite” that may be a bug.

 

The software has several threads. In a thread a “SCardGetStatusChange” is performed and it locks until there is a change in the status.

When another thread performs a “SCardConnect”, in Windows the “SCardGetStatusChange” call returns with the “SCARD_STATE_INUSE”  flag activated. But in Linux the thread continues locked at “SCardGetStatusChange”.


This is a known difference between pcsc-lite and PC/SC on Windows.

It is not a bug. It is a feature. :-)

Bye

--
 Dr. Ludovic Rousseau

_______________________________________________
Pcsclite-muscle mailing list
[hidden email]
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pcsclite-muscle