You can generate a self-signed certificate online here:
http://www.selfsignedcertificate.com/
This will generate a two files – a certificate and a key.
If you are using IIS server you need to convert these to .pfx. For this you can use the SSL Converter here:
https://www.sslshopper.com/ssl-converter.html