This project creates a wrapper library for intercepting all calls to the Portuguese PKCS#11 token Cartao de Cidadao.
The wrapper uses an original library that is referred by the C constant DEFAULT_LIB_PATH, but it can be dynamically changed with an environment variable named PTEIDPKCS11_WRAPPER.
The default interceptors are generated automatically and just print the function name before calling the original function. These interceptors can be adapted to perform other operations. The wrapping functions, once created, are not overwritten by the Makefile execution, unless upon an update of the wrapped library. Therefore, modified wrappers should be stored in a different file to avoid loosing work.
Manager: André Zúquete