 <p><a href="http://www.stunnel.org/" rel="nofollow">Stunnel</a> does almost exactly what you ask if the following conditions are met.</p> <ul> <li>One stunnel instance must be running for each service (either from inetd or in standalone daemon-like mode).</li> <li>The system running cURL must manually resolve the hostname of the target service to the IP address of the host running stunnel (e.g. <code>/etc/hosts</code>) in order to use it.</li> </ul> <p>I used stunnel in a similar way for connecting to IRC servers using SSL with SSL-capable clients. It works like a charm, one important thing to be careful about is the incompatibilities between the 3.x and newer versions. If you're planning for a new system, you should probably use the new ones.</p>