If you are getting the error or the OpenSSL extension is missing on Windows while installing Composer, then read this tutorial as I am going to share how to enable OpenSSL extension on your Windows machine.
Follow the below steps to enable the OpenSSL extension in your window machine:
Step 1) Copy php.ini-development to php.ini.
Step 2) Uncomment the extension=php_openssl.dll line as described.
Step 3) Uncomment this line: extension_dir = “ext”.
Step 4) Make sure you find php_openssl.dll within that extension directory of course.