Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Smart Card Reader - HOW TO USE PCSC FRAMEWORK.



Hi Tomasz,

I'm responding to the mailing list so all can benefit.

On May 6, 2006, at 2:40 AM, Tomasz K. Kaczmarek wrote:

Hi Garth !

Thank You very much for the help ! I have my Cardman 2020 running properly. The solution was very simple, probably I missed something while reading the documentation. Sometimes the simplest things are the most harder to find.

I'm glad you got the reader working on Panther. Unfortunately I downloaded and installed the same driver you did on a PowerPC-based system running Mac OS X 10.4.6. pcsctest worked the very first time but after that pcscd crashed every time I plugged in the CardMan 2020. I'm going to file a bug report on this.

 I develop an application which will be used for digital signing. The application will be distributed over my home country - Poland. If You don't mind I'll ask You a few questions.

Normally you'd post these questions to the mailing list or submit a technical support incident to Apple Developer Tech Support (please visit the URL in my email signature for more info).


1) I'm using the OS X Panther. Before using the Cardman 2020 reader I've downloaded the driver from the manufacturers site [1]. Do I have the installer to copy the Cardman 2020 driver when installing my application on machine with OS X Tiger onboard ?

The 2020 driver is not included with Mac OS X, so your users will need to install that driver first. You'd have to contact the owner of that driver to get permission to bundle it with your application.

Is the "ccidDriver.bundle" driver on machine with Tiger capable of handling the Cardman 2020 reader ?

No. The 2020 is not a CCID class-compliant reader. Other OmniKey readers are CCID compliant. For example, I have a CardMan 3121 that works fine with Apple's CCID class driver.

Is there any differences between "ccidDriver.bundle" implementation on Panther and "ccidDriver.bundle"  implementation on Tiger ? 

The Panther version only supports some SCM readers. The Tiger version is supposed to work with any CCID compliant reader.

Maybe I unnecessary installed the Cardman 2020 driver (ifdok_cm2020_macos-1.0.0.5.bundle) on my Mac ?


No, the 2020 requires its driver to be installed for it to work. The 2020 is a vendor specific device.


2) You wrote "With the CardMan 2020 pcscd isn't running". Is that means that my application must run the "pcscd" demon every time it starts ? Is this situation takes place with OS X Tiger also ?

On Panther, you need a startup item to launch pcscd at boot time. Once started, pcscd will continue running until the system is rebooted.

On Tiger, pcscd starts automatically when a smart card reader is plugged in that has a PC/SC driver installed, and stops automatically after the reader is unplugged.


3) Where I could find some documentation or tutorials how to use my application and Cardman 2020 reader to sign e-mails in Apple Mail app ?

On Tiger, this info is included in the help for Mail. I don't remember if Panther supported signed email, but if it did it wouldn't work with smart cards. On Panther you'd have to use something like Netscape for email.

Your application isn't needed to sign or encrypt email on Tiger: Mail gets the necessary keys and certs from keychains, and smart cards appear as keychains on Tiger. (This assumes your card has a tokend written for it.)


Once again I'd like to thank You for help. I know that You got more important things to do and many other people who asking for help. But here in my country Poland we got lack of Mac platform developers, so almost there is nobody to ask. 

You're welcome.

If you want my advice, it would be best if you supported Tiger instead of Panther. The smart card support on Tiger is much more evolved.



----------
Best regards,
Tomasz Kaczmarek.


Best regards,
--gc


On May 5, 2006, at 6:48 PM, Garth Cummings wrote:
Hi Tomasz,
On May 5, 2006, at 6:28 AM, Tomasz K. Kaczmarek wrote:
I'm having troubles with Cardman 2020 USB (smart card reader) on my Mac. I've downloaded the proper driver from http://www.linuxnet.com/macdrivers.html. Installer put the driver bundle into "/usr/libexec/SmartCardServices/drivers/".

My troubles occur when I try to communicate with connected reader using PCSC framework. Even when I'm using very simple functions nothing happens. It's looks like the system can't communicate with the hardware.

During the driver installation process I've been informed that all I need to run my hardware is that driver and PCSC framework supplied by Apple or PCSC Lite (command line app) supplied by their company. I decided to use PCSC framework because since OS X Jaguar Apple supplies their OS with proper framework to facilitate interaction with smart card devices.
Yes, please don't overwrite the version of PC/SC that comes with Mac OS X if at all possible. You can read more about this in Technical Q&A 1359 "Installing smart card reader drivers" < http://developerapple.com/qa/qa2004/qa1359.html>.

Also, the Apple folks who work with smart cards hang out on the apple-cdsa mailing list <http://lists.apple.com/apple-cdsa>.

The first thing I try when installing a new reader or reader driver is to run /usr/bin/pcsctest. This will check that Mac OS X is able to find and communicate with the reader and smart card. A successful test will look like this:

$ pcsctest

MUSCLE PC/SC Lite Test Program

Testing SCardEstablishContext    : Command successful.
Testing SCardGetStatusChange 
Please insert a working reader   : Command successful.
Testing SCardListReaders         : Command successful.
Reader 01: MyReader 0 0
Enter the reader number        : 01

Waiting for card insertion         
                      : Command successful.
Testing SCardConnect             : Command successful.
Testing SCardStatus : Command successful.
Current Reader Name            : MyReader 0 0
Current Reader State             : 34
Current Reader Protocol        : 1
Current Reader ATR Size          : 11
Current Reader ATR Value         : 3B D6 18 00 81 B1 80 7D 1F 03 80 51 00 61 10 30 8F
Testing SCardDisconnect          : Command successful.
Testing SCardReleaseContext      : Command successful.

PC/SC Test Completed Successfully !

When I try a CardMan 2020 reader on Mac OS X 10.4.6 I get:

$ pcsctest

MUSCLE PC/SC Lite Test Program

Testing SCardEstablishContext    : Command successful.
Testing SCardGetStatusChange

and no further.

The next thing is to be sure that pcscd is running. Here's a successful test:

$ ps auxw | grep pcscd
root       718  0.0  0.1    29688   1112  ??  S     9:38AM   0:00.19 /usr/sbin/pcscd -f

With the CardMan 2020 pcscd isn't running. So the next thing is to run pcscd in debug mode to see what errors turn up:

$ sudo pcscd -d stdout
Password:

I'd run this test yourself then file a bug report with any errors at <http://developer.apple.com/bugreporter>.

I'd also try to find a CCID class compliant reader. Mac OS X Tiger ships with a CCID class driver and it should work with any compliant reader.

Good luck!
--gc
____________________________________________________________________
Garth Cummings                                               email@hidden
Sr. Software Engineer
Apple Developer Technical Support


____________________________________________________________________

Garth Cummings email@hidden

Sr. Software Engineer

Apple Developer Technical Support




 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Apple-cdsa mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/apple-cdsa/email@hidden

This email sent to email@hidden



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.