/usr/bin/pkcs15-tool -c failed ..

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

/usr/bin/pkcs15-tool -c failed ..

Mhayk Whandson
Hi all, I'm from Brazil and I am trying to read a certificate from smart card but I have not had success.

# pkcs15-tool -c
[pkcs15-tool] reader-pcsc.c:906:pcsc_detect_readers: SCardEstablishContext failed: 0x8010001d
[pkcs15-tool] reader-pcsc.c:1015:pcsc_detect_readers: returning with: No readers found
Using reader with a card: CCID Compatible
[pkcs15-tool] apdu.c:528:sc_transmit_apdu: unable to acquire lock
[pkcs15-tool] pkcs15.c:532:sc_pkcs15_bind_internal: unable to enumerate apps: Incorrect parameters in APDU
[pkcs15-tool] pkcs15.c:799:sc_pkcs15_bind: returning with: Unsupported card
PKCS#15 initialization failed: Unsupported card

Can anyone help me ? What am I need to do ?

# cat /etc/*release
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=10.04
DISTRIB_CODENAME=lucid
DISTRIB_DESCRIPTION="Ubuntu 10.04 LTS"

# dpkg -l | grep opensc
ii  opensc                               0.11.12-1ubuntu3.2                              Smart card utilities with support for PKCS#1
ii  libopensc2                           0.11.12-1ubuntu3.2                              Smart card library with support for PKCS#15


best regards,

--
Mhayk Whandson
Phone: +55 92 3234 2883
Mobile: +55 92 9198 1416
Mobile: +55 95 8126 0728
E-mail: [hidden email]
Skype: mhaykwhandson
Gtalk: [hidden email]
MSN: [hidden email]
Company: M2Smart Solutions - www.m2smart.com

_______________________________________________
opensc-user mailing list
[hidden email]
http://www.opensc-project.org/mailman/listinfo/opensc-user
Reply | Threaded
Open this post in threaded view
|

Re: /usr/bin/pkcs15-tool -c failed ..

Andre Zepezauer
On Mon, 2011-02-07 at 23:43 -0400, Mhayk Whandson wrote:

> Hi all, I'm from Brazil and I am trying to read a certificate from
> smart card but I have not had success.
>
> # pkcs15-tool -c
> [pkcs15-tool] reader-pcsc.c:906:pcsc_detect_readers:
> SCardEstablishContext failed: 0x8010001d
> [pkcs15-tool] reader-pcsc.c:1015:pcsc_detect_readers: returning with:
> No readers found
> Using reader with a card: CCID Compatible
> [pkcs15-tool] apdu.c:528:sc_transmit_apdu: unable to acquire lock
> [pkcs15-tool] pkcs15.c:532:sc_pkcs15_bind_internal: unable to
> enumerate apps: Incorrect parameters in APDU
> [pkcs15-tool] pkcs15.c:799:sc_pkcs15_bind: returning with: Unsupported
> card
> PKCS#15 initialization failed: Unsupported card
>
> Can anyone help me ? What am I need to do ?

Execute the following command and post the file opensc.log:

(OPENSC_DEBUG=9; pkcs15-tool -D &> opensc.log)

_______________________________________________
opensc-user mailing list
[hidden email]
http://www.opensc-project.org/mailman/listinfo/opensc-user
Reply | Threaded
Open this post in threaded view
|

Re: /usr/bin/pkcs15-tool -c failed ..

Mhayk Whandson
Hello Andre, thanks for help,

What do you think about the informations in opensc.log ?

best regards,

On Mon, Feb 7, 2011 at 11:57 PM, Andre Zepezauer <[hidden email]> wrote:
On Mon, 2011-02-07 at 23:43 -0400, Mhayk Whandson wrote:
> Hi all, I'm from Brazil and I am trying to read a certificate from
> smart card but I have not had success.
>
> # pkcs15-tool -c
> [pkcs15-tool] reader-pcsc.c:906:pcsc_detect_readers:
> SCardEstablishContext failed: 0x8010001d
> [pkcs15-tool] reader-pcsc.c:1015:pcsc_detect_readers: returning with:
> No readers found
> Using reader with a card: CCID Compatible
> [pkcs15-tool] apdu.c:528:sc_transmit_apdu: unable to acquire lock
> [pkcs15-tool] pkcs15.c:532:sc_pkcs15_bind_internal: unable to
> enumerate apps: Incorrect parameters in APDU
> [pkcs15-tool] pkcs15.c:799:sc_pkcs15_bind: returning with: Unsupported
> card
> PKCS#15 initialization failed: Unsupported card
>
> Can anyone help me ? What am I need to do ?

Execute the following command and post the file opensc.log:

(OPENSC_DEBUG=9; pkcs15-tool -D &> opensc.log)




--
Mhayk Whandson
Phone: +55 92 3234 2883
Mobile: +55 92 9198 1416
Mobile: +55 95 8126 0728
E-mail: [hidden email]
Skype: mhaykwhandson
Gtalk: [hidden email]
MSN: [hidden email]
Company: M2Smart Solutions - www.m2smart.com

_______________________________________________
opensc-user mailing list
[hidden email]
http://www.opensc-project.org/mailman/listinfo/opensc-user

opensc.log (622 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: /usr/bin/pkcs15-tool -c failed ..

Andre Zepezauer
On Tue, 2011-02-08 at 00:06 -0400, Mhayk Whandson wrote:
> Hello Andre, thanks for help,
>
> What do you think about the informations in opensc.log ?

Hmmm, seems to be not complete.

That's one single command (brackets included):

(OPENSC_DEBUG=9; pkcs15-tool -D &> opensc.log; gzip opensc.log)

_______________________________________________
opensc-user mailing list
[hidden email]
http://www.opensc-project.org/mailman/listinfo/opensc-user
Reply | Threaded
Open this post in threaded view
|

Re: /usr/bin/pkcs15-tool -c failed ..

Mhayk Whandson


On Tue, Feb 8, 2011 at 12:29 AM, Andre Zepezauer <[hidden email]> wrote:
On Tue, 2011-02-08 at 00:06 -0400, Mhayk Whandson wrote:
> Hello Andre, thanks for help,
>
> What do you think about the informations in opensc.log ?

Hmmm, seems to be not complete.

That's one single command (brackets included):

(OPENSC_DEBUG=9; pkcs15-tool -D &> opensc.log; gzip opensc.log)




--
Mhayk Whandson
Phone: +55 92 3234 2883
Mobile: +55 92 9198 1416
Mobile: +55 95 8126 0728
E-mail: [hidden email]
Skype: mhaykwhandson
Gtalk: [hidden email]
MSN: [hidden email]
Company: M2Smart Solutions - www.m2smart.com

_______________________________________________
opensc-user mailing list
[hidden email]
http://www.opensc-project.org/mailman/listinfo/opensc-user

opensc.log.gz (426 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: /usr/bin/pkcs15-tool -c failed ..

Andre Zepezauer
FYI: mine is around 100 KB

grep debug_file /etc/opensc.conf

_______________________________________________
opensc-user mailing list
[hidden email]
http://www.opensc-project.org/mailman/listinfo/opensc-user
Reply | Threaded
Open this post in threaded view
|

Re: /usr/bin/pkcs15-tool -c failed ..

Mhayk Whandson
$ grep debug_file /etc/opensc/opensc.conf
    # debug_file = /tmp/opensc-debug.log;
    # debug_file = "C:\Documents and Settings\All Users\Documents\opensc-debug.log";

best regards,

On Tue, Feb 8, 2011 at 12:44 AM, Andre Zepezauer <[hidden email]> wrote:
FYI: mine is around 100 KB

grep debug_file /etc/opensc.conf




--
Mhayk Whandson
Phone: +55 92 3234 2883
Mobile: +55 92 9198 1416
Mobile: +55 95 8126 0728
E-mail: [hidden email]
Skype: mhaykwhandson
Gtalk: [hidden email]
MSN: [hidden email]
Company: M2Smart Solutions - www.m2smart.com

_______________________________________________
opensc-user mailing list
[hidden email]
http://www.opensc-project.org/mailman/listinfo/opensc-user
Reply | Threaded
Open this post in threaded view
|

Re: /usr/bin/pkcs15-tool -c failed ..

Mhayk Whandson
I change debug = 0 to 9 in the  /etc/opensc/opensc.conf, now the log is more verbose.

best regards,


On Tue, Feb 8, 2011 at 12:46 AM, Mhayk Whandson <[hidden email]> wrote:
$ grep debug_file /etc/opensc/opensc.conf
    # debug_file = /tmp/opensc-debug.log;
    # debug_file = "C:\Documents and Settings\All Users\Documents\opensc-debug.log";

best regards,


On Tue, Feb 8, 2011 at 12:44 AM, Andre Zepezauer <[hidden email]> wrote:
FYI: mine is around 100 KB

grep debug_file /etc/opensc.conf




--
Mhayk Whandson
Phone: +55 92 3234 2883
Mobile: +55 92 9198 1416
Mobile: +55 95 8126 0728
E-mail: [hidden email]
Skype: mhaykwhandson
Gtalk: [hidden email]
MSN: [hidden email]
Company: M2Smart Solutions - www.m2smart.com



--
Mhayk Whandson
Phone: +55 92 3234 2883
Mobile: +55 92 9198 1416
Mobile: +55 95 8126 0728
E-mail: [hidden email]
Skype: mhaykwhandson
Gtalk: [hidden email]
MSN: [hidden email]
Company: M2Smart Solutions - www.m2smart.com

_______________________________________________
opensc-user mailing list
[hidden email]
http://www.opensc-project.org/mailman/listinfo/opensc-user

opensc.log.gz (4K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: /usr/bin/pkcs15-tool -c failed ..

Andre Zepezauer
On Tue, 2011-02-08 at 00:49 -0400, Mhayk Whandson wrote:
> I change debug = 0 to 9 in the  /etc/opensc/opensc.conf, now the log
> is more verbose.

Seems that your card isn't supported. At least it's not recognised by
your version of OpenSC. That is 0.11.12 I think.

What's the output of:

opensc-tool -s 00:B0:00:00:00

_______________________________________________
opensc-user mailing list
[hidden email]
http://www.opensc-project.org/mailman/listinfo/opensc-user
Reply | Threaded
Open this post in threaded view
|

Re: /usr/bin/pkcs15-tool -c failed ..

Mhayk Whandson


On Tue, Feb 8, 2011 at 1:08 AM, Mhayk Whandson <[hidden email]> wrote:


On Tue, Feb 8, 2011 at 1:05 AM, Andre Zepezauer <[hidden email]> wrote:
On Tue, 2011-02-08 at 00:49 -0400, Mhayk Whandson wrote:
> I change debug = 0 to 9 in the  /etc/opensc/opensc.conf, now the log
> is more verbose.

Seems that your card isn't supported. At least it's not recognised by
your version of OpenSC. That is 0.11.12 I think.

What's the output of:

opensc-tool -s 00:B0:00:00:00




--
Mhayk Whandson
Phone: +55 92 3234 2883
Mobile: +55 92 9198 1416
Mobile: +55 95 8126 0728
E-mail: [hidden email]
Skype: mhaykwhandson
Gtalk: [hidden email]
MSN: [hidden email]
Company: M2Smart Solutions - www.m2smart.com



--
Mhayk Whandson
Phone: +55 92 3234 2883
Mobile: +55 92 9198 1416
Mobile: +55 95 8126 0728
E-mail: [hidden email]
Skype: mhaykwhandson
Gtalk: [hidden email]
MSN: [hidden email]
Company: M2Smart Solutions - www.m2smart.com

_______________________________________________
opensc-user mailing list
[hidden email]
http://www.opensc-project.org/mailman/listinfo/opensc-user

opensc-tool.log.gz (3K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: /usr/bin/pkcs15-tool -c failed ..

Andre Zepezauer
Let's try to squeeze out some information:

opensc-tool -s 00:A4:04:00:00

opensc-tool -s 00:CB:2F:00:02:5C:00:00

_______________________________________________
opensc-user mailing list
[hidden email]
http://www.opensc-project.org/mailman/listinfo/opensc-user
Reply | Threaded
Open this post in threaded view
|

Re: /usr/bin/pkcs15-tool -c failed ..

Mhayk Whandson


On Tue, Feb 8, 2011 at 1:22 AM, Andre Zepezauer <[hidden email]> wrote:
Let's try to squeeze out some information:

opensc-tool -s 00:A4:04:00:00

opensc-tool -s 00:CB:2F:00:02:5C:00:00




--
Mhayk Whandson
Phone: +55 92 3234 2883
Mobile: +55 92 9198 1416
Mobile: +55 95 8126 0728
E-mail: [hidden email]
Skype: mhaykwhandson
Gtalk: [hidden email]
MSN: [hidden email]
Company: M2Smart Solutions - www.m2smart.com

_______________________________________________
opensc-user mailing list
[hidden email]
http://www.opensc-project.org/mailman/listinfo/opensc-user

opensc-tool-00-A4-04-00-00.log.gz (4K) Download Attachment
opensc-tool-00-CB-2F-00-02-5C-00-00.log.gz (3K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: /usr/bin/pkcs15-tool -c failed ..

Andre Zepezauer
Slowly it becomes clear what you have there:

opensc-tool -c default -s 00:A4:04:00:00 -s 00:CB:2F:00:02:5C:00:00


_______________________________________________
opensc-user mailing list
[hidden email]
http://www.opensc-project.org/mailman/listinfo/opensc-user
Reply | Threaded
Open this post in threaded view
|

Re: /usr/bin/pkcs15-tool -c failed ..

Mhayk Whandson


On Tue, Feb 8, 2011 at 1:33 AM, Andre Zepezauer <[hidden email]> wrote:
Slowly it becomes clear what you have there:

opensc-tool -c default -s 00:A4:04:00:00 -s 00:CB:2F:00:02:5C:00:00





--
Mhayk Whandson
Phone: +55 92 3234 2883
Mobile: +55 92 9198 1416
Mobile: +55 95 8126 0728
E-mail: [hidden email]
Skype: mhaykwhandson
Gtalk: [hidden email]
MSN: [hidden email]
Company: M2Smart Solutions - www.m2smart.com

_______________________________________________
opensc-user mailing list
[hidden email]
http://www.opensc-project.org/mailman/listinfo/opensc-user

opensc-tool-00-A4-04-00-00.log.gz (878 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: /usr/bin/pkcs15-tool -c failed ..

Andre Zepezauer
Something has changed. The smart card reader was now unable to exchange
data with your card. What's different now?

_______________________________________________
opensc-user mailing list
[hidden email]
http://www.opensc-project.org/mailman/listinfo/opensc-user
Reply | Threaded
Open this post in threaded view
|

Re: /usr/bin/pkcs15-tool -c failed ..

Ludovic Rousseau
2011/2/8 Andre Zepezauer <[hidden email]>:
> Something has changed. The smart card reader was now unable to exchange
> data with your card. What's different now?

Mhayk, do you know why you are using OpenCT instead of pcsc-lite?

What smart card reader are your using?

Bye

--
 Dr. Ludovic Rousseau
_______________________________________________
opensc-user mailing list
[hidden email]
http://www.opensc-project.org/mailman/listinfo/opensc-user
Reply | Threaded
Open this post in threaded view
|

Re: /usr/bin/pkcs15-tool -c failed ..

Mhayk Whandson
In reply to this post by Andre Zepezauer
I'm sorry Andre, I had changed the opensc version, I already revert...

best regards.

On Tue, Feb 8, 2011 at 1:33 AM, Andre Zepezauer <[hidden email]> wrote:
Slowly it becomes clear what you have there:

opensc-tool -c default -s 00:A4:04:00:00 -s 00:CB:2F:00:02:5C:00:00





--
Mhayk Whandson
Phone: +55 92 3234 2883
Mobile: +55 92 9198 1416
Mobile: +55 95 8126 0728
E-mail: [hidden email]
Skype: mhaykwhandson
Gtalk: [hidden email]
MSN: [hidden email]
Company: M2Smart Solutions - www.m2smart.com

_______________________________________________
opensc-user mailing list
[hidden email]
http://www.opensc-project.org/mailman/listinfo/opensc-user

opensc-tool.log.gz (1K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: /usr/bin/pkcs15-tool -c failed ..

Mhayk Whandson
Hi Andre, can we continue with the analyse ?

best regards,

On Tue, Feb 8, 2011 at 2:59 PM, Mhayk Whandson <[hidden email]> wrote:
I'm sorry Andre, I had changed the opensc version, I already revert...

best regards.


On Tue, Feb 8, 2011 at 1:33 AM, Andre Zepezauer <[hidden email]> wrote:
Slowly it becomes clear what you have there:

opensc-tool -c default -s 00:A4:04:00:00 -s 00:CB:2F:00:02:5C:00:00





--
Mhayk Whandson
Phone: +55 92 3234 2883
Mobile: +55 92 9198 1416
Mobile: +55 95 8126 0728
E-mail: [hidden email]
Skype: mhaykwhandson
Gtalk: [hidden email]
MSN: [hidden email]
Company: M2Smart Solutions - www.m2smart.com



--
Mhayk Whandson
Phone: +55 92 3234 2883
Mobile: +55 92 9198 1416
Mobile: +55 95 8126 0728
E-mail: [hidden email]
Skype: mhaykwhandson
Gtalk: [hidden email]
MSN: [hidden email]
Company: M2Smart Solutions - www.m2smart.com

_______________________________________________
opensc-user mailing list
[hidden email]
http://www.opensc-project.org/mailman/listinfo/opensc-user
Reply | Threaded
Open this post in threaded view
|

Re: /usr/bin/pkcs15-tool -c failed ..

Mhayk Whandson
In reply to this post by Ludovic Rousseau
Hi dr. Ludovic, what I need to configure to use pcsc-lite instead of OpenCT ?

best regards,

On Tue, Feb 8, 2011 at 4:25 AM, Ludovic Rousseau <[hidden email]> wrote:
2011/2/8 Andre Zepezauer <[hidden email]>:
> Something has changed. The smart card reader was now unable to exchange
> data with your card. What's different now?

Mhayk, do you know why you are using OpenCT instead of pcsc-lite?

What smart card reader are your using?

Bye

--
 Dr. Ludovic Rousseau



--
Mhayk Whandson
Phone: +55 92 3234 2883
Mobile: +55 92 9198 1416
Mobile: +55 95 8126 0728
E-mail: [hidden email]
Skype: mhaykwhandson
Gtalk: [hidden email]
MSN: [hidden email]
Company: M2Smart Solutions - www.m2smart.com

_______________________________________________
opensc-user mailing list
[hidden email]
http://www.opensc-project.org/mailman/listinfo/opensc-user
Reply | Threaded
Open this post in threaded view
|

Re: /usr/bin/pkcs15-tool -c failed ..

Ludovic Rousseau
2011/2/10 Mhayk Whandson <[hidden email]>:
> Hi dr. Ludovic, what I need to configure to use pcsc-lite instead of OpenCT
> ?

Please first answer my second question:

>> What smart card reader are your using?

Bye

--
 Dr. Ludovic Rousseau
_______________________________________________
opensc-user mailing list
[hidden email]
http://www.opensc-project.org/mailman/listinfo/opensc-user
12