generate cert and private key