[Pcsclite-cvs-commit] r6175 - in /trunk/PCSC/src/spy: Makefile.am README.txt pcsc-spy.1

rousseau at users.alioth.debian.org rousseau at users.alioth.debian.org
Sun Jan 15 17:12:02 UTC 2012


Author: rousseau
Date: Sun Jan 15 17:12:02 2012
New Revision: 6175

URL: http://svn.debian.org/wsvn/pcsclite/?sc=1&rev=6175
Log:
Convert README.txt into pcsc-spy.1

Since we now provide the pcsc-spy binary we must also provide a manpage
for the command.

Added:
    trunk/PCSC/src/spy/pcsc-spy.1
Removed:
    trunk/PCSC/src/spy/README.txt
Modified:
    trunk/PCSC/src/spy/Makefile.am

Modified: trunk/PCSC/src/spy/Makefile.am
URL: http://svn.debian.org/wsvn/pcsclite/trunk/PCSC/src/spy/Makefile.am?rev=6175&op=diff
==============================================================================
--- trunk/PCSC/src/spy/Makefile.am (original)
+++ trunk/PCSC/src/spy/Makefile.am Sun Jan 15 17:12:02 2012
@@ -7,4 +7,6 @@
 	pcsc-spy.c
 libpcscspy_la_LIBADD = -ldl
 
-EXTRA_DIST = pcsc-spy.py install_spy.sh uninstall_spy.sh README.txt
+man_MANS = pcsc-spy.1
+
+EXTRA_DIST = pcsc-spy.py install_spy.sh uninstall_spy.sh

Added: trunk/PCSC/src/spy/pcsc-spy.1
URL: http://svn.debian.org/wsvn/pcsclite/trunk/PCSC/src/spy/pcsc-spy.1?rev=6175&op=file
==============================================================================
--- trunk/PCSC/src/spy/pcsc-spy.1 (added)
+++ trunk/PCSC/src/spy/pcsc-spy.1 Sun Jan 15 17:12:02 2012
@@ -1,0 +1,81 @@
+.TH pcsc-spy 1 "January 2012" Muscle "PC/SC Lite"
+.SH NAME
+pcsc-spy \- A PC/SC command spy
+.
+.SH SYNTAX
+.B pcsc-spy
+.
+.SH DESCRIPTION
+.B pcsc-spy
+displays PC/SC calls of an application. It must be used with the
+libpcscspy.so library.
+.PP
+To be able to spy the PC/SC layer, the application flow must be modified
+so that all PC/SC calls are redirected. Two options are available:
+.RS
+- the application is linked with
+.I libpcsclite.so.1
+.RE
+.RS
+- the application loads the
+.I libpcsclite.so.1
+library using
+.IR dlopen (3)
+.SS
+Applications linked with libpcsclite.so.1
+.RE
+We will use the standard LD_PRELOAD loader option to load our spying
+library.
+
+Example:
+
+LD_PRELOAD=/usr/lib/libpcscspy.so opensc-tool -a
+.SS
+Application loading libpcsclite.so.1
+.RE
+This is the case for the PC/SC wrappers like pyscard (for Python) and
+pcsc-perl (for Perl). The LD_PRELOAD mechanism can't be used. Instead we
+replace the
+.I libpcsclite.so.1
+library by the spying one.
+
+Use
+.I install_spy.sh
+and
+.I uninstall_spy.sh
+to install and uninstall the spying library.
+
+Using the spying library without
+.I pcsc-spy
+is not a problem but has side effects:
+.RS
+- a line "libpcsclite_nospy.so.1: cannot open shared object file: No
+such file or directory" will be displayed
+.RE
+.RS
+- some CPU time will be lost because of the PC/SC calls redirection
+.RE
+.SS
+Starting the spy tool
+.RE
+$
+.I pcsc-spy
+
+If a command argument is passed we use it instead of the default
+.I ~/pcsc-spy
+FIFO file. It is then possible to record an execution log and use
+.I pcsc-spy
+multiple times on the same log.
+
+To create the log file just do:
+
+$ mkfifo ~/pcsc-spy
+
+$ cat ~/pcsc-spy > logfile
+
+and run your PC/SC application
+.SH AUTHOR
+This manual page was written by Ludovic Rousseau <rousseau at free.fr>
+.
+.SH "SEE ALSO"
+.BR pcscd (8)




More information about the Pcsclite-cvs-commit mailing list