I am assuming that you have already installed latest version of WAMP in your system.

  1. Download OpenSSL:

Download OpenSSL for windows and install it from here https://slproweb.com/products/Win32OpenSSL.html
Use all default options for installation. Download the Full version of OpenSSL rather than light version.

2. Create Keys and certificate:

Go to your OpenSSL installation. For me its cd c:/program files/openssl-win64/bin/
Next we will generate key. For passphrase, enter anything you want but remember it for next step.

openssl genrsa -aes256 -out private.key 2048
openssl rsa -in private.key -out private.key

Next, its time to create certificate. While creating the certificate, for Common Name (e.g. server FQDN or YOUR name) enter localhost

openssl req -new -x509 -nodes -sha1 -key private.key -out certificate.crt -days 36500

3. Moving keys:

Create folder “key” at C:\wamp64\bin\apache\apache2.4.51\conf
Go to C:\Program Files\OpenSSL-Win64\bin and copy “certificate.crt” and “private.key” and move to folder created above.

4. Edit httpd.conf:

Go to C:\wamp64\bin\apache\apache2.4.51\conf and edit file “httpd.conf
Locate LoadModule ssl_module modules/mod_ssl.so line and remove # from the beginning if there is one.
Do the same for these two line as well
Include conf/extra/httpd-ssl.conf
LoadModule socache_shmcb_module modules/mod_socache_shmcb.so

5. Edit httpd-ssl.conf:

Go to C:\wamp64\bin\apache\apache2.4.51\conf\extra and open “httpd-ssl.conf” for editing.
Find lines in details below and edit as appropriate
DocumentRoot "c:/wamp64/www"
ServerName localhost:443
ServerAdmin admin@example.com
ErrorLog "${SRVROOT}/logs/error.log"
TransferLog "${SRVROOT}/logs/access.log"
SSLSessionCache "shmcb:${SRVROOT}/logs/ssl_scache(512000)"
SSLCertificateFile "${SRVROOT}/conf/key/certificate.crt"
SSLCertificateKeyFile "${SRVROOT}/conf/key/private.key"
CustomLog "${SRVROOT}/logs/ssl_request.log"

6. Restart wamp:

If everything went as expected, you will see green wamp icon. If there is error, orange wamp icon will appear.
To check for errors go to C:\wamp64\bin\apache\apache2.4.51\bin and open command prompt here. Next run httpd -t to check for any syntax error.

7. Check:

Go to https://localhost/
Note that even if you have added certificates, browser will still show not secured. You will need to add exception.