RFI over SSL? Get the certificate and store it alongside the injected file locally

Not implemented:
The pem file is not transferred via hpfeeds. I could probably figure out how to, if I get some pointers =) 
What if this fails/throws an exception?