HAS TO BE COMPLETED
For creating certificates (priv + pub key) the website of CAcert can handle cetificate requests (pub key). Those have to be created in advance and can be recombined and/or converted to needed file formats afterwards for the target use.
OpenSSL
s.a. OpenSSLHowTo
GnuTLS