refine ca.pem