Ver Mensaje Individual
  #8 (permalink)  
Antiguo 22/08/2009, 09:45
Avatar de abimaelrc
abimaelrc
Colaborador
 
Fecha de Ingreso: mayo-2009
Ubicación: En el planeta de Puerto Rico
Mensajes: 14.734
Antigüedad: 15 años
Puntos: 1517
Respuesta: Descargando un fichero con CURL lo guarda vacío

Estaba buscando información en internet sobre esas dos variables y mira lo que encontre. Esta en ingles pero te da la información que estas buscando sobre que hacen esas dos

http://www.sitepoint.com/forums/show...70&postcount=7
Cita:
Normally, when you connect with a secure server to browse a secured site, the server presents you with a certificate, signed by a CA, that says I am https://www.paypal.com. Now with CURLOPT_SSL_VERIFYHOST enabled, libcurl verifies whether the certificate that server presented does actually indicate that it belongs to https://www.paypal.com. If certificate doesn’t certify that the server’s identity to be https://www.paypal.com, the connection fails.

So far so good, but what if certificate itself is fake? CURLOPT_SSL_VERIFYPEER comes in handy. It verifies the authenticity of the certificate itself, against a set of CA certificates that libcurl holds. Some CA certificates come by default bundled with libcurl and some do not. When CURLOPT_SSL_VERIFYPEER is enabled and the server presents the libcurl with a certificate that it doesn’t recognize, connection fails.

Now how do u get around this. Either stop being paranoid and be content just with CURLOPT_SSL_VERIFYHOST . Else install additional certificates in your system and specify those certificates in a curl session with CURLOPT_CAINFO or CURLOPT_CAPATH.

In a nutshell, CURLOPT_SSL_VERIFYPEER authenticates the certificates and CURLOPT_SSL_VERIFYHOST authenticates the host. May be this helps.
__________________
Verifica antes de preguntar.
Los verdaderos amigos se hieren con la verdad, para no perderlos con la mentira. - Eugenio Maria de Hostos

Última edición por abimaelrc; 15/03/2011 a las 11:48