| 1 | Requirements |
|---|
| 2 | ------------ |
|---|
| 3 | - PPC based Mac OS X 10.4 (With latest updates, currently 10.4.7) |
|---|
| 4 | - Install Xcode 2.4 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/membership/details.html |
|---|
| 7 | |
|---|
| 8 | - Install Fink (http://fink.sourceforge.net/download/) |
|---|
| 9 | |
|---|
| 10 | - In a Terminal |
|---|
| 11 | sudo fink update-all |
|---|
| 12 | sudo fink install automake1.9 |
|---|
| 13 | sudo fink install libtool14 |
|---|
| 14 | sudo fink install wget |
|---|
| 15 | sudo fink install pkgconfig |
|---|
| 16 | |
|---|
| 17 | - Install subversion |
|---|
| 18 | You have two choices here. The first (and historical) one is to compile it |
|---|
| 19 | yourself through fink by issuing this in a Terminal: |
|---|
| 20 | sudo fink install svn-client-ssl |
|---|
| 21 | OR install the subversion client package from: |
|---|
| 22 | http://metissian.com/projects/macosx/subversion/ |
|---|
| 23 | |
|---|
| 24 | Building the package for PPC only |
|---|
| 25 | --------------------------------- |
|---|
| 26 | - Check out the sca project to your Documents folder |
|---|
| 27 | svn co http://www.opensc-project.org/svn/sca/trunk opensc |
|---|
| 28 | |
|---|
| 29 | In the newly created directory "opensc": |
|---|
| 30 | !Edit the makefile! |
|---|
| 31 | !Edit xxxx-pack/Info.plist for version number! |
|---|
| 32 | |
|---|
| 33 | make fetch |
|---|
| 34 | make build |
|---|
| 35 | sudo make install |
|---|
| 36 | make package |
|---|
| 37 | make dist |
|---|
| 38 | |
|---|
| 39 | The resulting file sca-X.X.dmg can be distributed. |
|---|
| 40 | |
|---|
| 41 | Building the Universal package |
|---|
| 42 | ------------------------------ |
|---|
| 43 | - You need first create the i386 part on a MacIntel system. |
|---|
| 44 | The MacIntel need to have the Developer Xcode installed which is available |
|---|
| 45 | on the Installation DVD or on Apple's developer site. Fink doesn't need |
|---|
| 46 | to be installed. |
|---|
| 47 | Transfer the Makefile_i386 and libusb-runloop.patch |
|---|
| 48 | and then do: |
|---|
| 49 | make -f Makefile_i386 all ; make -f Makefile_i386 transfer |
|---|
| 50 | The compiled-i386.tgz obtained need to be transfered back to your PPC system, |
|---|
| 51 | in Documents/opensc. |
|---|
| 52 | There do tar xzf compiled-i386.tgz |
|---|
| 53 | |
|---|
| 54 | - Check out the sca project to your Documents folder |
|---|
| 55 | svn co http://www.opensc-project.org/svn/sca/trunk opensc |
|---|
| 56 | |
|---|
| 57 | In the newly created directory "opensc": |
|---|
| 58 | !Edit the makefile! |
|---|
| 59 | !Edit xxxx-pack/Info.plist for version number! |
|---|
| 60 | |
|---|
| 61 | make fetch |
|---|
| 62 | make build |
|---|
| 63 | make lipo |
|---|
| 64 | sudo make install |
|---|
| 65 | make package |
|---|
| 66 | make dist |
|---|
| 67 | |
|---|
| 68 | The resulting file sca-X.X.dmg can be distributed. |
|---|
| 69 | |
|---|
| 70 | Building the Universal Light package |
|---|
| 71 | ------------------------------------ |
|---|
| 72 | - You need first create the i386 part on a MacIntel system. |
|---|
| 73 | The MacIntel need to have the Developer Xcode installed which is available |
|---|
| 74 | on the Installation DVD or on Apple's developer site. |
|---|
| 75 | Transfer the Makefile_light_i386 and libusb-runloop.patch |
|---|
| 76 | and then do: |
|---|
| 77 | make -f Makefile_light_i386 all ; make -f Makefile_light_i386 transfer |
|---|
| 78 | The compiled-i386.tgz obtained need to be transfered back to your your PPC system, |
|---|
| 79 | in Documents/opensc. |
|---|
| 80 | There do tar xzf compiled-i386.tgz |
|---|
| 81 | |
|---|
| 82 | - Check out the sca project to your Documents folder |
|---|
| 83 | svn co http://www.opensc-project.org/svn/sca/trunk opensc |
|---|
| 84 | |
|---|
| 85 | In the newly created directory "opensc": |
|---|
| 86 | !Edit the makefile! |
|---|
| 87 | !Edit xxxx-pack/Info.plist for version number! |
|---|
| 88 | |
|---|
| 89 | make -f Makefile_light fetch |
|---|
| 90 | make -f Makefile_light build |
|---|
| 91 | make -f Makefile_light lipo |
|---|
| 92 | sudo make -f Makefile_light install |
|---|
| 93 | make -f Makefile_light package |
|---|
| 94 | |
|---|
| 95 | The resulting file sca_light-X.X.dmg and sca_reader-X.X.dmg can be distributed. |
|---|
| 96 | |
|---|
| 97 | |
|---|
| 98 | Before building the file for distribution, check: |
|---|
| 99 | ------------------------------------------------- |
|---|
| 100 | |
|---|
| 101 | 1. libltdl library |
|---|
| 102 | |
|---|
| 103 | This library is installed by XCode 2.3, but is sometimes overwriten by |
|---|
| 104 | other software installer. |
|---|
| 105 | If it is not the right one, you need to reinstall XCode 2.3 |
|---|
| 106 | ls -l /usr/lib/libltdl*dylib |
|---|
| 107 | lrwxr-xr-x 1 root wheel 15 Nov 15 13:04 /usr/lib/libltdl.3.1.0.dylib -> libltdl.3.dylib |
|---|
| 108 | -rwxr-xr-x 1 root wheel 74684 Nov 3 00:50 /usr/lib/libltdl.3.dylib |
|---|
| 109 | lrwxr-xr-x 1 root wheel 15 Nov 15 13:04 /usr/lib/libltdl.dylib -> libltdl.3.dylib |
|---|
| 110 | |
|---|
| 111 | 2. libreadline library |
|---|
| 112 | |
|---|
| 113 | ls -l /usr/lib/libreadline*dylib |
|---|
| 114 | lrwxr-xr-x 1 root wheel 13 Nov 6 09:38 /usr/lib/libreadline.dylib -> libedit.dylib |
|---|
| 115 | |
|---|
| 116 | 3. opensc.tokend |
|---|
| 117 | |
|---|
| 118 | You need to prepare a Darwin Build Directory, according to the points 1 |
|---|
| 119 | to 5 of http://www.opensc-project.org/sca/wiki/OpenscTokend. |
|---|
| 120 | |
|---|
| 121 | Be sure pcscd is running |
|---|
| 122 | ------------------------ |
|---|
| 123 | With your card reader installed, check ' ps ax | grep pcscd | grep -v "grep pcscd" ' |
|---|
| 124 | If it is not running, re-run SCA installer, go to 'Personalize' |
|---|
| 125 | and select 'Smartcard reader autostart fix'. |
|---|
| 126 | If pcscd is running, insert a smartcard, and try 'pcsctest' |
|---|
| 127 | |
|---|
| 128 | To test engine_pkcs11 |
|---|
| 129 | --------------------- |
|---|
| 130 | /Library/OpenSC/bin/openssl |
|---|
| 131 | 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 |
|---|
| 132 | |
|---|
| 133 | |
|---|
| 134 | To use SmartCard enabled OpenSSH |
|---|
| 135 | -------------------------------- |
|---|
| 136 | NB: all executables are prepended with a 'sc' (ssh -> scssh), so there |
|---|
| 137 | is no conflict with the native executables installed with MacOSX. |
|---|
| 138 | |
|---|
| 139 | You can also add /Library/OpenSC/bin to your $PATH without conflict. |
|---|
| 140 | - read your smartcard content with /Library/OpenSC/bin/scssh-keygen -D0 |
|---|
| 141 | - append the long line beginning with ssh-rsa from the previous command |
|---|
| 142 | to ~/.ssh/authorized_keys2 on the server where you want to connect |
|---|
| 143 | - to connect to remote host: /Library/OpenSC/bin/scssh -I0 login@host.domain.com |
|---|
| 144 | |
|---|
| 145 | In case you want to use the agent: |
|---|
| 146 | - eval `/Library/OpenSC/bin/scssh-agent -s` (you can put this in your |
|---|
| 147 | ~/.bash_profile) |
|---|
| 148 | |
|---|
| 149 | - you need to register your private keys reference in scssh-agent with |
|---|
| 150 | /Library/OpenSC/bin/scssh-add -s0 |
|---|
| 151 | you need to put your PIN code |
|---|
| 152 | - to verify the agent content: /Library/OpenSC/bin/scssh-add -l |
|---|