It occurred to me that llHTTPRequest() may not support SNI http://en.wikipedia.org/wiki/Server_Name_Indication
In which case it may be receiving a certificate for the wrong domain and rejecting it because of the domain mismatch despite setting HTTP_VERIFY_CERT to FALSE.
The questions are:
Does llHTTPRequest() support SNI?
If not, can it?
Does HTTP_VERIFY_CERT only disable verifying the Certificate Authority?
If so, should it also disable domain checks, expiry or should there be another setting to disable that?
Can the 499 status be divided into different numbers to clarify what the failure was or there be a way of getting more error information? (maybe in the body)
Can the documentation be clarified to address whatever the situation may be?
Here is a piece of failing code:
string URL = "https://buysensations.com/name2key.php";
string avname = "Amethyst Rosencrans";
key requestkey;
default
{
state_entry()
{
requestkey = llHTTPRequest(URL,[HTTP_VERIFY_CERT,FALSE,HTTP_METHOD,"POST"],"s=people&q=" + llEscapeURL(avname));
}
http_response(key request_id, integer status, list metadata, string body)
{
if(requestkey == request_id)
{
llOwnerSay("Status " + (string)status + " Body: " + body);
}
}
}
Thanks,
Jessica
_______________________________________________
Click here to unsubscribe or manage your list subscription:
https://lists.secondlife.com/cgi-bin/mailman/listinfo/secondlifescripters
CURLOPT_SSL_VERIFYPEEROf note it does not modify the CURLOPT_SSL_VERIFYHOST option:This option determines whether curl verifies the authenticity of the peer's certificate. A value of 1 means curl verifies; 0 (zero) means it doesn't.
When negotiating a SSL connection, the server sends a certificate indicating its identity. Curl verifies whether the certificate is authentic, i.e. that you can trust that the server is who the certificate says it is. This trust is based on a chain of digital signatures, rooted in certification authority (CA) certificates you supply. curl uses a default bundle of CA certificates (the path for that is determined at build time) and you can specify alternate certificates with the CURLOPT_CAINFO option or the CURLOPT_CAPATH option.
When CURLOPT_SSL_VERIFYPEER is nonzero, and the verification fails to prove that the certificate is authentic, the connection fails. When the option is zero, the peer certificate verification succeeds regardless.
Authenticating the certificate is not by itself very useful. You typically want to ensure that the server, as authentically identified by its certificate, is the server you mean to be talking to. Use CURLOPT_SSL_VERIFYHOST to control that. The check that the host name in the certificate is valid for the host name you're connecting to is done independently of the CURLOPT_SSL_VERIFYPEER option.
CURLOPT_SSL_VERIFYHOSTHope this helps. The above was from: http://curl.haxx.se/libcurl/c/curl_easy_setopt.htmlThis option determines whether libcurl verifies that the server cert is for the server it is known as.
When negotiating a SSL connection, the server sends a certificate indicating its identity.
When CURLOPT_SSL_VERIFYHOST is 2, that certificate must indicate that the server is the server to which you meant to connect, or the connection fails.
Curl considers the server the intended one when the Common Name field or a Subject Alternate Name field in the certificate matches the host name in the URL to which you told Curl to connect.
When the value is 1, the certificate must contain a Common Name field, but it doesn't matter what name it says. (This is not ordinarily a useful setting).
When the value is 0, the connection succeeds regardless of the names in the certificate.
The default value for this option is 2.