Adding certificate templates and decrypting encrypted private keys