<o> Client connects to nexus.passport.com, port 443 (Passport Nexus)
>>> GET /rdr/pprdr.asp HTTP/1.0\r\n
\r\n
<<< HTTP/1.1 200 OK\r\n
<<< Server: Microsoft-IIS/5.0\r\n
<<< Date: Mon, 02 Jun 2003 11:57:47 GMT\r\n
<<< Connection: close\r\n
<<< PassportURLs: DARealm=Passport.Net,DALogin=login.passport.com/login2.srf,DAReg=http://register.passport.net/uixpwiz.srf,Properties=https://register.passport.net/editprof.srf,Privacy=http://www.passport.com/consumer/privacypolicy.asp,GeneralRedir=http://nexusrdr.passport.com/redir.asp,Help=http://memberservices.passport.net/memberservice.srf,ConfigVersion=11\r\n
<<< Content-Length: 0\r\n
<<< Content-Type: text/html\r\n
<<< Cache-control: private\r\n
<<< \r\n
<o> nexus.passport.com closes connection
IdHTTP + IdConnectionInterceptOpenSSL - посылка GET запроса
Цитата:
Connecting to the Nexus involves sending an HTTPS GET request for the URL "https://nexus.passport.com/rdr/pprdr.asp". The server should always reply with a 200 OK message with an empty body. The important information is contained in the "PassportURLs" header, which contains a comma-separated list. The "DALogin" field of this header contains the address of the login server. This value isn't technically a valid URL, so your HTTPS library might require you to add "https://" to the start of it.
Если смотреть по запросам то вид такой:
Код:
Я это пытаюсь реализовать с использованием компонентов в названии темы. Соединил оба, Intercept у idHTTP выставил в true. Остальные свойства по умолчанию. Собственно запрос:
Код:
mStatus->Lines->Add(
idHttp->Get("https://nexus.passport.com/rdr/pprdr.asp"));
idHttp->Get("https://nexus.passport.com/rdr/pprdr.asp"));
Код:
bool __fastcall TfMain::IdConnectionInterceptOpenSSL1VerifyPeer(
TIdX509 *Certificate)
{
ShowMessage(DateTimeToStr(Certificate->notBefore));
ShowMessage(Certificate->Issuer->OneLine);
ShowMessage(Certificate->Subject->OneLine);
return true;
}
TIdX509 *Certificate)
{
ShowMessage(DateTimeToStr(Certificate->notBefore));
ShowMessage(Certificate->Issuer->OneLine);
ShowMessage(Certificate->Subject->OneLine);
return true;
}
Вот, что у меня выводиться в TMemo в процессе работы:
Цитата:
---------------=Status=----------------
Resolving hostname nexus.passport.com.
---------------=Status=----------------
Connecting to 65.54.179.228.
--------------------------------------
SSL: Connecting...
---------------=SSL:Status=----------------
SSL status: "before/connect initialization"
---------------=SSL:Status=----------------
SSL status: "before/connect initialization"
---------------=SSL:Status=----------------
SSL status: "SSLv2/v3 write client hello A"
---------------=SSL:Status=----------------
SSL status: "SSLv3 read server hello A"
---------------=SSL:Status=----------------
SSL status: "SSLv3 read server certificate A"
---------------=SSL:Status=----------------
SSL status: "SSLv3 read server done A"
---------------=SSL:Status=----------------
SSL status: "SSLv3 write client key exchange A"
---------------=SSL:Status=----------------
SSL status: "SSLv3 write change cipher spec A"
---------------=SSL:Status=----------------
SSL status: "SSLv3 write finished A"
---------------=SSL:Status=----------------
SSL status: "SSLv3 flush data"
---------------=SSL:Status=----------------
SSL status: "SSLv3 read finished A"
---------------=SSL:Status=----------------
SSL status: "SSL negotiation finished successfully"
---------------=SSL:Status=----------------
SSL status: "SSL negotiation finished successfully"
---------------=Status=----------------
Connected.
--------------------------------------
SSL: Connected
Resolving hostname nexus.passport.com.
---------------=Status=----------------
Connecting to 65.54.179.228.
--------------------------------------
SSL: Connecting...
---------------=SSL:Status=----------------
SSL status: "before/connect initialization"
---------------=SSL:Status=----------------
SSL status: "before/connect initialization"
---------------=SSL:Status=----------------
SSL status: "SSLv2/v3 write client hello A"
---------------=SSL:Status=----------------
SSL status: "SSLv3 read server hello A"
---------------=SSL:Status=----------------
SSL status: "SSLv3 read server certificate A"
---------------=SSL:Status=----------------
SSL status: "SSLv3 read server done A"
---------------=SSL:Status=----------------
SSL status: "SSLv3 write client key exchange A"
---------------=SSL:Status=----------------
SSL status: "SSLv3 write change cipher spec A"
---------------=SSL:Status=----------------
SSL status: "SSLv3 write finished A"
---------------=SSL:Status=----------------
SSL status: "SSLv3 flush data"
---------------=SSL:Status=----------------
SSL status: "SSLv3 read finished A"
---------------=SSL:Status=----------------
SSL status: "SSL negotiation finished successfully"
---------------=SSL:Status=----------------
SSL status: "SSL negotiation finished successfully"
---------------=Status=----------------
Connected.
--------------------------------------
SSL: Connected
После этого вылетает сообщение:
Цитата:
Socket error 10054. Connection reset by peer
В чем проблема ?? Я предполагаю, что нужно как-то получать сертификат и записывать его в свойства IdConnectionInterceptOpenSSL, только как - не знаю...Помогите !