Composer install squizlabs/php_codesniffer PHP 7.4 on Windows 10 is failed to install

I have the following error installing squizlabs/php_codesniffer with Composer v. 1.10.20 on Windows 10 with PHP 7.4.4:


[ComposerExceptionNoSslException]
  The openssl extension is required for SSL/TLS protection but is not available. If you can not enable the openssl ex
  tension, you can disable this error, at your own risk, by setting the 'disable-tls' option to true.

How can I fix it? How can I install openssl extension on Windows 10?

I have tried to install squizlabs/php_codesniffer=* composer library using command: composer.bat global require "squizlabs/php_codesniffer=*" and it is failed with error posted above.
I’m expecting to fix the error by installing and enabling missing libraries or packages.