Given the warning you show on the (working) Windows version and that you don't get the warning on the non-working Linux version I guess that you are using a very old version of IO::Socket::SSL on Windows which by default does not check any certificates while your Linux version is newer and does check certificates. The warning you see in Windows was removed about 4 years ago when the switch was made to checking certificates by default.
This leaves you with the following options to deal with the problem: The best way is to add the proper trust settings by specifying the issuer certificate with the SSL_ca_file option or use SSL_fingerprint option in newer versions of IO::Socket::SSL to just trust a specific certificate. The bad way is to ignore any security and simply disable certificate checking by setting SSL_verify_mode to 0 (SSL_VERIFY_NONE).