[jdev] question about class.jabber.php with SASL TLS
Matthew Terenzio
matt at jobsforge.com
Thu Jan 19 19:12:08 CST 2006
On Jan 19, 2006, at 7:55 PM, Steve Ramage wrote:
> I may be mistaken but I think Google Talk also uses legacy 5223 SSL to
> connect. In which case, in theory all you would need to do is to look
> for the fsockopen() call and prefix the $host var, with ssl://
>
> So like
>
> fsockopen("ssl://" . $host, $port, ...);
I haven't successfully used the class but I was on my way. I had to use
tls:// for some reason. Theoretically it shouldn't make a diff, but I
think it did.
here is my connector:
I modified the class CJP_StandardConnector OpenSocket function.
function OpenSocket($server, $port)
{
if ($this->active_socket =
stream_socket_client('tls://'.$server.":".$port))//fsockopen('tls://
'.$server, $port))
{
stream_set_blocking($this->active_socket, 0);
//socket_set_timeout($this->active_socket, 31536000);
return TRUE;
}
else
{
return FALSE;
}
}
there were other problems though. I could connect but not Authenticate,
which had to be using _sendauth_plaintext()
I doubt this helps much, But if you are going to hack it this might get
you under way. As I said, I was unsuccessful and haven't looked at in
a while.
>
> Thats just what someone here said earlier, and I haven't played with
> it yet.
>
>
> peilicui wrote:
>
>> Hello,
>>
>> I’m trying to get classJabberPHP to work with the Google Talk
>> protocol. But
>> I have no clear idea about how to integrate TLS and SASL to this
>> class? Can
>> somebody share your code sample or how-tos ?
>>
>> thanks
>> cpl
>>
>>
>>
>>
>>
>>
>>
>>
>
>
Matt Terenzio
Two-way, shared, public RSS feeds by SkinnyFarm
http://skinnyfarm.com
More information about the JDev
mailing list