| 1 | Requirements |
|---|
| 2 | ------------ |
|---|
| 3 | - Mac OS X 10.6 (With latest updates) |
|---|
| 4 | - Install Xcode from SnowLeopard DVD or from Apple on their developer site |
|---|
| 5 | (http://developer.apple.com/tools/xcode/index.html) for the ADC member. |
|---|
| 6 | For ADC registration at no cost: http://developer.apple.com/products/membership.html |
|---|
| 7 | |
|---|
| 8 | - Check out the sca project to your Documents folder |
|---|
| 9 | svn co http://www.opensc-project.org/svn/sca/trunk opensc |
|---|
| 10 | |
|---|
| 11 | In the newly created directory "opensc": |
|---|
| 12 | !Edit the makefile! |
|---|
| 13 | !Edit xxxx-pack/Info.plist for version number! |
|---|
| 14 | |
|---|
| 15 | make fetch |
|---|
| 16 | make build |
|---|
| 17 | make install |
|---|
| 18 | sudo chown -R root:wheel compiled*/* |
|---|
| 19 | sudo chmod -R g+w compiled*/* |
|---|
| 20 | make package |
|---|
| 21 | make dist |
|---|
| 22 | |
|---|
| 23 | The resulting file sca-X.X.dmg can be distributed. |
|---|
| 24 | |
|---|
| 25 | |
|---|
| 26 | Be sure pcscd is running |
|---|
| 27 | ------------------------ |
|---|
| 28 | With your card reader installed, check ' ps ax | grep pcscd | grep -v "grep pcscd" ' |
|---|
| 29 | If it is not running, check your SmartCard reader documentation |
|---|
| 30 | If pcscd is running, insert a smartcard, and try 'pcsctest' |
|---|
| 31 | |
|---|
| 32 | To test engine_pkcs11 |
|---|
| 33 | --------------------- |
|---|
| 34 | openssl |
|---|
| 35 | engine -t dynamic -pre SO_PATH:/Library/OpenSC/lib/engines/engine_pkcs11.so -pre ID:pkcs11 -pre LIST_ADD:1 -pre LOAD -pre MODULE_PATH:/Library/OpenSC/lib/opensc-pkcs11.so |
|---|
| 36 | |
|---|
| 37 | To use SmartCard enabled OpenSSH |
|---|
| 38 | -------------------------------- |
|---|
| 39 | NB: all executables are prepended with a 'sc' (ssh -> scssh), so there |
|---|
| 40 | is no conflict with the native executables installed with MacOSX. |
|---|
| 41 | |
|---|
| 42 | You can also add /Library/OpenSC/bin to your $PATH without conflict. |
|---|
| 43 | - read your smartcard content with /Library/OpenSC/bin/scssh-keygen -D0 |
|---|
| 44 | - append the long line beginning with ssh-rsa from the previous command |
|---|
| 45 | to ~/.ssh/authorized_keys2 on the server where you want to connect |
|---|
| 46 | - to connect to remote host: /Library/OpenSC/bin/scssh -I0 login@host.domain.com |
|---|
| 47 | |
|---|
| 48 | In case you want to use the agent: |
|---|
| 49 | - eval `/Library/OpenSC/bin/scssh-agent -s` (you can put this in your |
|---|
| 50 | ~/.bash_profile) |
|---|
| 51 | |
|---|
| 52 | - you need to register your private keys reference in scssh-agent with |
|---|
| 53 | /Library/OpenSC/bin/scssh-add -s0 |
|---|
| 54 | you need to put your PIN code |
|---|
| 55 | - to verify the agent content: /Library/OpenSC/bin/scssh-add -l |
|---|