It's rather annoying to have those popups warning me about untrusted SSL certificates when downloading mail securely using IMAPS.
So here's how to add X509 certificates to a Nokia S60 certificate store.
If you don't have the certificate at hand, download it - e.g. like that for IMAPS (Port 993):
openssl s_client -connect mail.myhost.de:993 > imap.pem
Then convert that to DER format:
openssl x509 -in imap.pem -out imap.der -outform der
The last step is changing the extension to *.crt for the phone to recognize the MIME type correctly:
mv imap.der imap.crt
Now transfer to the phone, for instance via MiniSD card, OBEX or PC Suite, and simply open imap.crt in S60 file manager...
A slightly simpler case is adding CACert's root certificate, the free SSL certificate provider for my website - just open the respective URI, rename appropriately and transfer to the phone as before:
mv class3.der class3.crt