new functions to add certificates and retrieve private and public keys