fix warnings
add missing error handling
rename module to ipapkcs11