simplified the options to manage CA
extend CA to generate certificates with same subject but different
profile.
add version check
better logging, optimized SQL query