Refactor to handle multiple cert and private key pairs