Enabling tls negotiation in a socket

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

I have a question about opening a normal socket, then negotiating a TLS
layer in PHP (through another protocol, which is XMPP in my case, in plain
text at the beginning). I am currently using a socket created by
"socket_create ()". But there seems not to be any way of switching to TLS
negotiation with this, is there?

Then I see the stream_socket_client () which can then switch to TLS with
stream_socket_enable_crypto (). But this is only above PHP 5.1.0. Can anyone
confirm me this is the right solution, and also only solution? (I mean
"already made" one, I am not going to implement TLS myself! :p)

How would you do such a thing otherwise? And is it possible to use
stream_socket_enable_crypto () on the socket created by socket_create?
Thanks all.

Jehan

[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux