Re: [opensc-devel] SCardConnect(), dwPreferredProtocols and detecting Pinpad

2009-12-03 Thread Ludovic Rousseau
2009/12/3 Viktor TARASOV : > Hi, Hello, > for me, PinPad is not detected with dwPreferredProtocols=0 > in the preceding SCardConnect() call (src/libopensc/reader-pcsc.c +917). > > With dwPreferredProtocols=SCARD_PROTOCOL_ANY it's detected normally. > > Is it question of version of PCSC(1.4.3-16)

Re: [opensc-devel] Unblocking PIN via PKCS#11?

2009-12-03 Thread Viktor TARASOV
Aktiv Co. Aleksey Samsonov wrote: > Viktor TARASOV: >>> - in CKU_SO_PIN context -- set PIN after SOPIN authentication; >>> >> Sorry, it's not good idea -- there should be possibility to change >> SOPIN. > > Incidentally, this isn't work for current trunk. (change SOPIN by > C_SetPin) (see slot_d

Re: [opensc-devel] Unblocking PIN via PKCS#11?

2009-12-03 Thread Viktor TARASOV
Pierre Ossman wrote: > On Thu, 03 Dec 2009 14:57:34 +0100 > Viktor TARASOV wrote: > > >> Another possible, 'alternative to alternative' scheme is to use C_SetPin() >> in the specific context (after C_Login(CKU_SPECIFIC_CONTEXT)). >> >> So, in CKU_USER_PIN context C_SetPin() is used to change us

Re: [opensc-devel] Unblocking PIN via PKCS#11?

2009-12-03 Thread Viktor TARASOV
Pierre Ossman wrote: > On Thu, 03 Dec 2009 14:57:34 +0100 > Viktor TARASOV wrote: > > >> Another possible, 'alternative to alternative' scheme is to use C_SetPin() >> in the specific context (after C_Login(CKU_SPECIFIC_CONTEXT)). >> >> So, in CKU_USER_PIN context C_SetPin() is used to change us

Re: [opensc-devel] Unblocking PIN via PKCS#11?

2009-12-03 Thread Aktiv Co. Aleksey Samsonov
Viktor TARASOV: >> - in CKU_SO_PIN context -- set PIN after SOPIN authentication; >> > Sorry, it's not good idea -- there should be possibility to change SOPIN. Incidentally, this isn't work for current trunk. (change SOPIN by C_SetPin) (see slot_data_auth/slot_data_pin_info and http://www.open

Re: [opensc-devel] Unblocking PIN via PKCS#11?

2009-12-03 Thread Viktor TARASOV
Viktor TARASOV wrote: > Viktor TARASOV wrote: > >> Aktiv Co. Aleksey Samsonov wrote: >> >> >>> Pierre Ossman: >>> >>> >>> I think we might have a language barrier here as I'm not quite following what you're trying to say. >>> S

Re: [opensc-devel] Unblocking PIN via PKCS#11?

2009-12-03 Thread Aktiv Co. Aleksey Samsonov
Viktor TARASOV: > Another possible, 'alternative to alternative' scheme is to use C_SetPin() > in the specific context (after C_Login(CKU_SPECIFIC_CONTEXT)). > > So, in CKU_USER_PIN context C_SetPin() is used to change user PIN, > in CKU_CONTEXT_SPECIFIC it's used to unblock user PIN. > > Afais,

Re: [opensc-devel] Unblocking PIN via PKCS#11?

2009-12-03 Thread Pierre Ossman
On Thu, 03 Dec 2009 14:57:34 +0100 Viktor TARASOV wrote: > > Another possible, 'alternative to alternative' scheme is to use C_SetPin() > in the specific context (after C_Login(CKU_SPECIFIC_CONTEXT)). > > So, in CKU_USER_PIN context C_SetPin() is used to change user PIN, > in CKU_CONTEXT_SPECIF

Re: [opensc-devel] Unblocking PIN via PKCS#11?

2009-12-03 Thread Viktor TARASOV
Viktor TARASOV wrote: > Aktiv Co. Aleksey Samsonov wrote: > >> Pierre Ossman: >> >> >>> I think we might have a language barrier here as I'm not quite >>> following what you're trying to say. >>> >>> >> Sorry for inconvenience caused. >> >> >> >>> The basic problem is

Re: [opensc-devel] Unblocking PIN via PKCS#11?

2009-12-03 Thread Viktor TARASOV
Aktiv Co. Aleksey Samsonov wrote: > Pierre Ossman: > >> I think we might have a language barrier here as I'm not quite >> following what you're trying to say. >> > > Sorry for inconvenience caused. > > >> The basic problem is that none of my PKCS#15 cards have an object for >> the PUK (a

Re: [opensc-devel] Unblocking PIN via PKCS#11?

2009-12-03 Thread Pierre Ossman
On Thu, 3 Dec 2009 16:29:23 +0300 "Aktiv Co. Aleksey Samsonov" wrote: > > The basic problem is that none of my PKCS#15 cards have an object for > > the PUK (and from what I can tell the PKCS#15 standard doesn't require > > them to). This means that we cannot do a C_Login with the PUK > > beforeha

Re: [opensc-devel] Unblocking PIN via PKCS#11?

2009-12-03 Thread Aktiv Co. Aleksey Samsonov
Pierre Ossman: > I think we might have a language barrier here as I'm not quite > following what you're trying to say. Sorry for inconvenience caused. > The basic problem is that none of my PKCS#15 cards have an object for > the PUK (and from what I can tell the PKCS#15 standard doesn't require >

Re: [opensc-devel] Unblocking PIN via PKCS#11?

2009-12-03 Thread Pierre Ossman
On Thu, 3 Dec 2009 13:38:43 +0300 "Aktiv Co. Aleksey Samsonov" wrote: > > What are the cards support it? (sc_pkcs15_unblock_pin with "puk" is > CKU_SO and "newpin" is pPin) How many of them from the total number > working in OpenSC? > > Alternative sheme: > Reimplement "reset_retry_counter" o

Re: [opensc-devel] SCardConnect(), dwPreferredProtocols and detecting Pinpad

2009-12-03 Thread Viktor TARASOV
Martin Paljak wrote: > On 03.12.2009, at 11:57, Viktor TARASOV wrote: > > >> Hi, >> >> for me, PinPad is not detected with dwPreferredProtocols=0 >> in the preceding SCardConnect() call (src/libopensc/reader-pcsc.c +917). >> >> With dwPreferredProtocols=SCARD_PROTOCOL_ANY it's detected normally.

Re: [opensc-devel] Unblocking PIN via PKCS#11?

2009-12-03 Thread Aktiv Co. Aleksey Samsonov
Pierre Ossman: > On Wed, 2 Dec 2009 12:48:56 +0300 > "Aktiv Co. Aleksey Samsonov" wrote: >> Pierre Ossman: >>> I've had another look at this and implemented a somewhat ugly hack to >>> provide this functionality. Basically C_Login will return success for >>> CKU_SO if it can't find an auth object

Re: [opensc-devel] SCardConnect(), dwPreferredProtocols and detecting Pinpad

2009-12-03 Thread Martin Paljak
On 03.12.2009, at 11:57, Viktor TARASOV wrote: > Hi, > > for me, PinPad is not detected with dwPreferredProtocols=0 > in the preceding SCardConnect() call (src/libopensc/reader-pcsc.c +917). > > With dwPreferredProtocols=SCARD_PROTOCOL_ANY it's detected normally. > > Is it question of version o

[opensc-devel] SCardConnect(), dwPreferredProtocols and detecting Pinpad

2009-12-03 Thread Viktor TARASOV
Hi, for me, PinPad is not detected with dwPreferredProtocols=0 in the preceding SCardConnect() call (src/libopensc/reader-pcsc.c +917). With dwPreferredProtocols=SCARD_PROTOCOL_ANY it's detected normally. Is it question of version of PCSC(1.4.3-16) or CCID(1.3.0-15)? By the way, in pcsc_connect

Re: [opensc-devel] pam_pkcs11 & CFK_LOGIN_REQUIRED

2009-12-03 Thread Ludovic Rousseau
2009/12/2 Oleg Smirnov : > Hi! > >  pam_pkcs11 doesn't work with cards with no PIN installed. It tries to > C_Login() whenever PIN is really needed and fails with "C_Login() > failed: 0x0102". > >  I've made a patch which corrects this behavior: > >  * implements get_slot_login_required() funct