File: QUICKSTART

package info (click to toggle)
openct 0.6.4-2
  • links: PTS
  • area: main
  • in suites: sarge
  • size: 2,788 kB
  • ctags: 1,694
  • sloc: ansic: 15,729; sh: 8,596; xml: 651; makefile: 193
file content (123 lines) | stat: -rw-r--r-- 4,011 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
A quick installation guide to openct
====================================

To install openct, please do as user,
$ wget http://www.opensc.org/files/openct-0.6.2.tar.gz
$ tar xfvz openct-0.6.2.tar.gz
$ cd openct-0.6.2.tar.gz

$ ./configure --prefix=/usr --sysconfdir=/etc

This will install openct in /usr, but put the config file
into /etc. The configure out put is quite long, with many
tests for software, versions and so on. At the end a summary
is printed, it should look like this:

OpenCT has been configured with the following options

User binaries:       ${exec_prefix}/bin
Configuration files: /etc

Host:                i686-pc-linux-gnu
Compiler:            gcc
Compiler flags:      -Wall -g -O2 
Preprocessor flags:  -I${top_builddir}/src/include -I${top_srcdir}/src/include 
Linker flags:        
Libraries:           -lpthread 

PC/SC support:       yes
Libusb used:         yes


To use usb tokens and readers, libusb support is highly recommended.
PC/SC support is only useful, if you want to use openct drivers with
applications other than opensc, using the pcsc-lite middleware.
This author does only use openct with opensc and thus would not need
PC/SC support.

$ make
$ su root

and as root
# make install

will install all the files. In addition openct will need a directory
of it's own, where it can save internal files and sockets. To create
this directory, please do:

# mkdir /var/run/openct

At system boot, openct needs to create a status file and
start a process for every permanent connected reader.
For this you need to install the init script into /etc/init.d/
and create startup and shutdown symlinks.


# cp etc/init-script /etc/init.d/openct
# ln -s ../init.d/openct /etc/rc0.d/K50openct
# ln -s ../init.d/openct /etc/rc1.d/S50openct
# ln -s ../init.d/openct /etc/rc2.d/S50openct
# ln -s ../init.d/openct /etc/rc3.d/S50openct
# ln -s ../init.d/openct /etc/rc4.d/S50openct
# ln -s ../init.d/openct /etc/rc5.d/S50openct
# ln -s ../init.d/openct /etc/rc6.d/K20openct

Openct also supports hotplugging. This however requires your linux
kernel to support hot plugging too (CONFIG_HOTPLUG) and to have
the linux hotplug utils installed. Both should be normal on any
recent linux distributions. You need to install a "usermap" file,
so the hotplug systems knows of all the readers openct supports.
And you need to install a script, the hotplug system will execute
this script, whenever a reader listed in the usermap is added
or removed.

# cp etc/hotplug.openct /etc/hotplug/usb/openct
# cp etc/openct.usermap /etc/hotplug/usb/openct.usermap

Finaly, openct needs a config file to work correctly.

# cp etc/openct.conf /etc/openct.conf

if you have serial readers (or anything else, not hotplugged),
edit /etc/openct.conf and configure your reader. Here is an
example for a Towitoko reader connected to the first serial
port:

	reader towitoko {
	       driver = towitoko;
	       device = serial:/dev/ttyS0;
	};

Now attach all those serial readers and start openct. Hotplug readers
already attached will be found as well, but you can as well attach them
later.

# /etc/init.d/openct start

now you can test it as user:
$ openct-tool list
  0 Towitoko Chipdrive Micro
  1 Schlumberger E-Gate

As you can see I have a normal, serial reader (Towitoko Chipdrive Micro)
and one usb token. If I remove the usb token, it will no longer be listed.
If I add a new token, the new one will show up:

$ openct-tool list
  0 Towitoko Chipdrive Micro
  1 Aladdin eToken PRO

I tested this on systems with several usb ports, too. But this "screen shot"
is from a system with only one usb port, my old laptop.

If you have a card in the reader, you can get the answer to reset ("ATR"),
which is a byte string containing some parameters, but can be used very
well to identify a card. Default is reader 0, add "-r 1" to use reader 1.

$ openct-tool -r 1 atr
Detected Aladdin eToken PRO
Card present, status changed
ATR: 3b e2 00 ff c1 10 31 fe 55 c8 02 9c

and similar commands. openct is ready.