You've patched this at the transport level; while that will work, it's
architecturally incorrect.
STARTTLS is a protocol level thing, so you code would be better suited
as a wrapper.
You can implement wrappers in user-space
(http://www.php.net/manual/en/function.stream-register-wrapper.php),
so you don't need to patch the C code.
In fact, you don't even need a wrapper for this functionality:
<?php
$s = fsockopen($host, $port);
// do capability negiotiation here
// ...
// now turn on crypto
stream_socket_enable_crypto($s, true,
STREAM_CRYPTO_METHOD_TLS_CLIENT);
?>
--Wez.
On 12/19/05, Anish Mistry <mistry.7@osu.edu> wrote: