Dynamic trace v1

Dynamic tracing implementation for the design v.3.

Steps to test it:
1. yum install automake libtool flex byacc expect trousers-devel tpm-tools tpm-tools-pkcs11 openssl-devel openssl098 openldap
2. groupadd pkcs11
3. gpasswd -a root pkcs11
4. ./bootstrap.sh
5. ./configure --enable-debug --enable-testcases
6. make
7. make install
8. pkill pkcsslotd; pkcsslotd
9. pkcsconf -t
10 pkcsconf -I -c 3
     (default SO pin is 87654321)
11 pkcsconf -u -c 3
     (testcases want 01234567 for user pin)
12 export OPENCRYPTOKI_TRACE_LEVEL=3
13 export PKCS11_USER_PIN=01234567
14 ./testcases/crypto/aes_tests

After that you can check the trace in $PWD/opencryptoki_aes_tests_<pid>.trace
You can also see messages in syslog
cat /var/log/messages | tail -n 20

I called TRACE_ERROR(), TRACE_WARNING(), TRACE_INFO(), TRACE_DEBUG(), TRACE_DEVEL() and OCK_SYSLOG() in C_Initialize() and ST_Initialize(). That is only for testing purpose. This way we can already see something written in the trace file.

Any feedback is welcome.

Thanks
Claudio