forked from mr-c/bioapi-linux
-
Notifications
You must be signed in to change notification settings - Fork 0
/
README
538 lines (411 loc) · 19.7 KB
/
README
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
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
/*---------------------------------------------------------------------------*/
*
* NIST Linux/Unix BioAPI Reference Implementation
* Version: 1.1 (NIST Linux/Unix Evaluation Release)
*
* File Created: 08/27/02 File Updated: 11/07/02
* This README describes the implementation and installation details for the
* BioAPI Reference Implementation for Unix/Linux based systems.
*
/*---------------------------------------------------------------------------*/
===============================================================================
= Contents: =
===============================================================================
1. Overview
2. Contact
3. System Requirements
4. Distribution
5. Build Instructions
6. Installation Instructions
7. Sample/Test App Instructions
8. Uninstalling and Package Removal
9. Distribution Summary
10. Disclaimer
11. Credits
12. Quick-Start Guide
===============================================================================
1. Overview
-----------
This package contains the BioAPI reference implementation for Unix-based
platforms (in particular Linux and Solaris). The Unix-based reference
implementation was developed by the Convergent Information Division (CISD),
Information Technology Laboratory (ITL) of the National Institute of Standards
and Technology (NIST). The Unix-based reference implementation is based
directly on the BioAPI Consortium's Windows reference implementation and the
Common Data Security Architecture (CDSA) reference implementation. The
Unix-based reference implementation includes the Sample application and the
MdsEdit utility from code provided by the International Biometric Group
(IBG). Although this distribution has only been tested on Linux and Solaris, it
is anticipated that porting it to other Unix-based platforms should be fairly
straight-forward.
See the HTML files in this distribution for details of the BioAPI reference
implementation.
2. Contact
----------
Robert Snelick
National Institute of Standards and Technology (NIST)
(301) 975-5924
rsnelick@nist.gov
3. System Requirements
----------------------
This release of the BioAPI has been built with the following software for
an x86 platform (little-endian):
Red Hat Linux Version 7.3 2.96-112, Kernal 2.4.18-10
gcc Version 2.96
GNU Make Version 3.79.1
Qt GUI Toolkit Version 3.0.3
The release has been tested on the following systems:
* Red Hat Linux Version 7.3 2.96-112, Kernal 2.4.18-10
* Red Hat Linux Version 7.2 2.96-108.7.2, Kernal 2.4.9-34
AND
This release of the BioAPI has been built with the following software for
the sparc platform (big-endian):
Solaris 8 (SunOS 5.8) Generic_108528-15 sparc SUNW,Ultra-60
Qt GUI Toolkit Version 3.0.3
Note: You must have QT version 3.0 or higher for the GUI related code.
It is included with Red Hat Versions 7.3 and higher. The lastest version
of QT can be downloaded at http://www.trolltech.com. QT does not come with
Solaris distributions.
Note: If you wish to install the implementation without any GUI based
code, see sections 5.4 for more information.
Note to Solaris Users
---------------------
The makefile system as distributed here assumes that the Qt libraries
were compiled using the native Sun C/C++ compiler. This is why all code
which relies on Qt is compiled with the Sun C/C++ compiler, and not GCC/G++
like the rest of the code (Because there are known problems linking
GCC/G++and Sun C/C++ compiled code). If your local SunOS systems has an
installation of Qt that was compiled with GCC/G++ instead, you will need
to adjust some of our makefiles to use GCC/G++ instead. Here are the
locations of the makefiles: apps/CMDS, apps/MdsEdit, apps/QSample, and
addins/qtpwbsp.
4. Distribution
---------------
The distribution comes as a compressed tar file (bioapi_unix_1.1.tar.gz).
The follows commands can be used to extract the source code distribution.
A. Un-compress the distribution "gz" file (bioapi_unix_1.1.tar.gz) by
typing at the command line:
% gunzip bioapi_unix_1.1.tar.gz
B. Un-archive the distribution "tar" file (bioapi_unix_1.1.tar) by typing
at the command line:
% tar -xvf bioapi_unix_1.1.tar
This creates a subdirectory called 'bioapi' in the current directory that
contains all the files in the distribution. The full path of the 'bioapi'
directory is referred to as 'BIOAPI_PATH' in this document.
Follow the detailed instructions below for installation or jump to the
Quick-Start Guide in section 12.
5. Build Instructions
---------------------
The BioAPI reference implementation installs as two main components:
binaries and data files. The binaries consist of dynamic shared libraries
and executable programs. The data files consist of the Module Directory
Service (MDS) database and registry. By default, both the binaries and
the data files are installed into system directories (/usr/local and
/var respectively). However, a configuration script has been provided
which allows these locations to be altered.
Note that installing this software using the default locations will
require that the installation be performed by someone with root
priviledges. Also, once installed into the default system directories,
only users with root priviledges will be able to run the software.
Below we describe the steps for configuring and building this package.
5.1 Set environment variable QTDIR to point to the installtion directory
where Qt version 3.0 or higher is installed, and cd (change dir)
to the top-level BIOAPI_PATH directory. For example,
% cd BIOAPI_PATH
% setenv QTDIR /usr/lib/qt3
Note: QT is a GUI Toolkit that is used in the Sample application and
the Mds Edit uitility.
Note: Some Linux (e.g., Red Hat) distributions come with QT pre-install
and set this variable automatically. If you don't have QT install on
your system you can download the lastest version at
http://www.trolltech.com.
5.2 Configure the software
Configuration involves choosing which directories the software will use
for installation and operation. Choosing a suitable configuration will
depend upon the local environment and needs of the users.
A configuration script has been provided which must be used to configure
the software. The script has two main command-line options for choosing
the installation/operation directories. They are:
--prefix=[BINARY_INSTALL_PATH] Sets path for the shared libs, includes
and executables:
(Default: /usr/local)
BINARY_INSTALL_PATH/bioapi - includes (.h files) and executables
(test/example apps)
BINARY_INSTALL_PATH/lib - shared libraries (.so files)
--with-mds=[MDS_INSTALL_PATH] Sets path for the MDS database and
registry files:
(Default: /var)
MDS_INSTALL_PATH/bioapi_mds - contains MDS database & registry base dir
[**Note, hereafter BINARY_INSTALL_PATH and MDS_INSTALL_PATH will be used
to refer to the actual directories that were configured]
There are several alternatives possible for configuring the software as
outlined below:
First Configuration Alternative
-------------------------------
In the first alternative, the software may be configured to accept the
default installation paths, which are in system directories. (The
defaults are BINARY_INSTALL_PATH=/usr/local and MDS_INSTALL_PATH=/var)
In this scenario only the system administrator (root) will be able to
install the software and run the example/test programs which come with
the package.
% ./configure
NOTE: The default location for the libraries is /usr/local/lib. This
directory may not be in the search path of the runtime link loader.
Therefore, before execution of the applications, the
LD_LIBRARY_PATH should be set to include /usr/local/lib or
/etc/ld.so.conf should include /usr/local/lib.
If you want the *standard* library path, that is, /usr/lib you can set
this with:
% ./configure --prefix=/usr
This will place the libraries in /usr/lib and the MDS data path in
/var/bioapi_mds. With this the runtime linker will discover the libraries
automatically.
Second Configuration Alternative
--------------------------------
In the second alternative, the software can be configured to install
itself into non-system directories. This option enables the software
to be installed and run by ordinary (non-priveldged) users. (Note
however that using this configuration only the user who installs the
software will have access to it)
% ./configure --prefix=/home/rob/local --with-mds=/home/rob/local
Note: --prefix=/home/rob/local sets "LIB_INSTPATH"
Note: Since (as in this example) you have chosen to install the shared
libraries (i.e., the .so files) to a *non-standard* location that is
not automatically searched by the runtime link loader you'll need to set
your LD_LIBRARY_PATH environment variable to include "LIB_INSTPATH"
prior to running any of the executables.
For csh type shells do:
% setenv LD_LIBRARY_PATH LIB_INSTPATH
or
% setenv LD_LIBRARY_PATH "${LD_LIBRARY_PATH}:LIB_INSTPATH"
For example:
% setenv LD_LIBRARY_PATH /home/rob/local/lib
For sh type shells do:
% export LD_LIBRARY_PATH="${LD_LIBRARY_PATH}:LIB_INSTPATH"
5.3 Build the BioAPI Libraries and Executables
% make
This command will build and create all the libraries and executables for
the BioAPI software development kit. The files are placed into the
./build/devkit directory. There are five sub-directories under devkit
(bin, include, install, lib, and testbin).
After sucessful compilation the contents of these directories for this
distribution should look like:
bin:
MdsEdit
QSample
include:
bioapi_api.h
bioapi_err.h
bioapi.h
bioapi_schema.h
bioapi_spi.h
bioapi_typecast.h
bioapi_type.h
bioapi_util.h
bioapi_uuid.h
biospi.h
biospi_type.h
bio.tmp
bsp_schema.h
device_schema.h
installdefs.h
mds.h
port/bioapi_lock.h
port/bioapi_port.h
install:
install.sh
mds_install
mod_install
uninstall.sh
lib:
libbioapi100.so
libbioapi_dummy100.so
libbioapi_mds300.so
libbioapi_util.a
libCMDS.a
libinstall.a
libmds_util.a
libmds_util_api.a
libport.a
libpwbsp.so
testbin:
BioAPITest
5.4 Non-GUI Installation Option
If you want to build the system with out the GUI based code add the
--without-gui flag to the configuration. This option can be added with any
of the configuration options described above. The result of this flag is
that the GUI Password BSP, MdsEdit, and Sample application will not be
built. Instead a non-GUI version of the Password BSP and Sample application
are built. This is a quick and easy way to test the implementation without
relying on the QT GUI Toolkit.
% ./configure --without-gui
6. Installation Instructions
----------------------------
Depending upon the configuration options chosen in step 5.2, root
priviledges may be required to install the software. In any case simply
type:
% make install
If you do not have the correct priviledges to install the software for the
configuration chosen in step 5.2, you will get an error message to the
effect:
"Under the present configuration only root can install bioapi". In that
case simpy re-login as root (su root) and run "make install" again.
Otherwise, the software installs all of the files in ./build/devkit" to
BINARY_INSTALL_PATH/bioapi and the shared libraries from ./build/devkit/lib
into BINARY_INSTALL_PATH/lib. It also installs the Module Directory
Service (MDS), the BioAPI framework, and the sample Biometric Service
Providers (BSPs) to MDS_INSTALL_PATH/bioapi_mds.
If installation succeeds, you will see a series of messages similar to the
following:
mkdir /usr/local/bioapi
installing bioapi files to /usr/local/bioapi
cp -fR /home/rob/bioapi/build/devkit/* /usr/local/bioapi
cd /usr/local/bioapi/install; ./install.sh all
Installing BIOAPI ...
Module Directory Services (MDS) ...
MDS installed successfully.
BioAPI Framework ...
Module installed successfully.
BioAPI Dummy Addin ...
Module installed successfully.
BioAPI Password BSP Module ...
Module installed successfully.
Done.
Installing Test Modules ...
No test modules to install ... OK
Done.
7. Sample/Test App Instructions
--------------------------------
The BioAPI reference implementation comes with a simple test program called
BioAPITest and a sample GUI-based application called QSample.
** Note: System administrator (root) priviledges (i.e., write permission
to the installation files) may be required to run these programs
depending up how the software was configured and where the MDS DB and
registry was installed. See section 5 and 6 above for configuration
and installation instructions.
To run the test program type:
% cd BINARY_INSTALL_PATH/bioapi/testbin
% ./BioAPITest
The output from the test program should be self-explanatory. This is a
simple Non-GUI test application that simply interacts with the BioAPI and
prints out information about the loaded BSPs.
To run the sample application type:
% cd BINARY_INSTALL_PATH/bioapi/bin
% ./QSample
A window will appear with a menu to select a biometric technology. Select
the Password BSP. Then type in a user name and select the Enroll button.
Type a password on the edit box. Then select the Verify button. Type in
a password. If the password matches the enrolled password for the user,
an information dialog will appear indicating a match. Otherwise, the
information dialog will indicate a non-match.
The template Dummy BSP have stub APIs and will report an error for any
operation attempted. The Password BSP will enroll and verify a user.
Note there is a Sample Application and Password BSP that is not GUI-Based.
The use of this version is simular, but is a one time pass-through and is
by default set to the Password BSP.
To run the MDS Edit Utility type:
% cd BINARY_INSTALL_PATH/bioapi/bin
% ./MdsEdit
A window will appear that has a tree structure that allows you to browse
the software modules that have been installed.
8. Uninstalling and Package Removal
-----------------------------------
Below is a list of commands the can be used to uninstall the BioAPI
reference implementation.
A. % make clean
Removes all the files (objects, libraries, executables) created in the
build process. This command can be executed at any level in the directory
hirearchy (it will clean from that point down).
B. % make distclean
Same as "make clean", but also removes the build/devkit/(bin, include,
install, lib, and test) directories and the configure files (e.g., the
makefiles). This command only applies to the top level BIOAPI_PATH
directory. WARNING: make "distclean" will remove the makefiles and
hence the capibilites for "make install/uninstall" and "make remove".
C. % make uninstall
This uninstalls the framework, MDS, and BSPs. You may need 'root' priviledge
to run this command depending up on the software was installed (see
sections 5 and 6 above). You must run this before running the "make remove"
command. This command only applies to the top level BIOAPI_PATH directory.
D. % make remove
This removes the software development kit. This command only applies to the
top level BIOAPI_PATH directory.
E. The sequence (in this order) to completely remove the distribution is:
% make uninstall
% make remove
% make distclean
Again, these commands must be executed relative to the BIOAPI_PATH
directory and may require root priveledge for the "make uninstall"
and "make remove".
9. Distribution Summary
-----------------------
Below is a list of targets and the location of where they are built
relative to the BIOAPI_PATH directory:
Target Type Location
---- ---- --------
BioAPITest Application apps/Test
QSample Application apps/Sample
Sample Application apps/NonGUI_Sample
MdsEdit* Application apps/MdsEdit
libCMDS.a* Library apps/Cmds
libport.a# Library framework/port
libbioapi_util.a Library framework/bioapi_util
libmds_util.a Library framework/mds_util
libmds_util_api.a Library framework/mds_util_api
libinstall.a Library framework/h_layer/install
libbioapi100.so Shared Library framework/h_layer
libbioapi_mds300.so Shared Library addins/dl/mds
libbioapi_dummy100.so Shared Library addins/bioapi_dummy_addin
libpwbsp.so Shared Library addins/pwbsp
libpwbsp.so Shared Library addins/qtpwbsp (GUI-version)
mds_install Utility addins/dl/mds/mds_install
mod_install Utility apps/mod_install
* Integrated from the International Biometric Group (IBG) code.
# Port library taken from CDSA. Included in the NIST Linux/Unix version
as source code so that the location of the registery could be dynamic.
[Note: The locations of BINARY_INSTALL_PATH and MDS_INSTALL_PATH
are set by the configure script (see section 5 above for details)]
Location of BioAPI software development kit files
-------------------------------------------------
BINARY_INSTALL_PATH/bioapi/bin
BINARY_INSTALL_PATH/bioapi/include
BINARY_INSTALL_PATH/bioapi/install
BINARY_INSTALL_PATH/bioapi/lib
BINARY_INSTALL_PATH/bioapi/testbin
Location of Shared Libraries
----------------------------
BINARY_INSTALL_PATH/lib
Location of MDS Database and Registry
-------------------------------------
MDS Database: MDS_INSTALL_PATH/bioapi_mds/BioAPIFFDB
Registry : MDS_INSTALL_PATH/bioapi_mds/registry
10. Disclaimer
--------------
See the disclaimer notice in this directory.
11. Credits
-----------
Windows Implementation: See the contributers file in this directory.
NIST BioAPI Implementation Linux port: Robert Snelick, NIST
Configuration system: Mike Indovina, NIST
MDS Editor Utility for Unix: International Biometric Group (IBG)
12. Quick-Start Guide
---------------------
If root:
% cd BIOAPI_PATH
% ./configure --prefix=/usr
% make
% make install
% /usr/bioapi/testbin/BioAPITest
% /usr/bioapi/bin/QSample
% /usr/bioapi/bin/MdsEdit
If not root and install in /home/rob/local:
% cd BIOAPI_PATH
% ./configure --prefix=/home/rob/local --with-mds=/home/rob/local
% setenv LD_LIBRARY_PATH /home/rob/local/lib
% make
% make install
% /home/rob/local/bioapi/testbin/BioAPITest
% /home/rob/local/bioapi/bin/QSample
% /home/rob/local/bioapi/bin/MdsEdit
For a non-GUI version, replace the configure statement with:
% ./configure --prefix=/home/rob/local --with-mds=/home/rob/local --without-gui