convert X.509 certificate into PEM-formatted file with SpongyCastle