First unzip OpenSSL from https://code.google.com/p/openssl-for-windows/downloads/list and put it anywhere you want e.g. c:\openssl
.
Right click on c:\openssl\bin\openssl.exe
and "run as administrator"
.
Enter the following command where c:\openssl
is the location you unzipped into:
> req -newkey rsa:2048 -new -nodes -x509 -days 3650 -keyout key.pem -out cert.pem -config "C:\OpenSSL\openssl.cnf"
Country name or any of the other information isnt required so you can keep pressing enter. You should now have two files in the bin folder key.pem and cert.pem.