> Googling around I couldn't find how do that. Any suggestions? As far as i can tell, you can't. To quote the edoc for public_key:pem_to_der: Currently supported entry types are certificates, certificate requests, rsa private keys and dsa private keys.