Security: replace certificate with public key.