I have two machines that I use to submit data to a secure HTTPS website using a C# program. One of them has no trouble, but the other one fails handshake. I've noticed that the working machine sends a Client Hello with a 20 Cipher Suites, while the one that doesn't work only sends 4. Using IISCrypto, I've been able to ensure that both machines have exactly the same ciphers enabled.
Does anyone have any recommendations of how to troubleshoot this issue?
Code used to connect:
try {
var myRequest = (HttpWebRequest)WebRequest.Create(url);
var response = (HttpWebResponse)myRequest.GetResponse();
if (response.StatusCode == HttpStatusCode.OK) {
Console.Write(string.Format("{0} Available", url));
} else {
Console.Write(string.Format("{0} Returned, but with status: {1}", url, response.StatusDescription));
}
} catch (Exception ex) {
Console.Write(string.Format("{0} unavailable: {1}", url, ex.Message));
}
答案 0 :(得分:3)
To troubleshot SSL problems I am using a network sniffer like Wireshark and look for SSL ALERT messages. The message will tell you why remote endpoint closed the connection.
See: SSL Alert protocol on Wikipedia page.