Wow, a big real life question that has little to do with Perl. Almost all the ssl stuff is done with libssl2(latest whatever it is) at the bottom. IO::Socket::SSL is a general purpose generator of ssl socket connections, at the lowest level. It can be any port. When you say http or https, you are talking to web servers, which is a special type of socket with a fairly weak 128 bit key encryption.
If it's important that you get this setup right, hire someone to do it; or read alot of setup docs and tutorials, so it's done right. Google for "libssh tutorials"