Delphi visit https / SSL, OpenSSL

Visit Web sites, the simplest usage directly TIdHTTP controls:
例如: AA: = IdHTTP1.Get ( 'www.baidu.com.');
Visit https sites require SSL libraries.
In Windows, go https://indy.fulgan.com/SSL/ download the latest SSL libraries.
After the download, unzip, including two dll files:
ssleay32.dll 和 libeay32.dll;
EXE program compiled directly into the same folder under
More difficult to find in Delphi7, to a link:
 
TIdHTTP control is bound TIdSSLIOHandlerSocketOpenSSL control:
1. IOHandler this property, down, select IdSSLIOHandlerSocketOpenSSL1;
2. HandleRedirects property: to True; the default is False; page redirect, do not open the case if the page has a redirect, jump pages will complain http / 1.1 301 moved permanently
 
IdSSLIOHandlerSocketOpenSSL1 property settings: SSLOptions -> Method property set to: sslvTLSv1_1
例如:AA := IdHTTP1.Get('https://www.baidu.com');

Guess you like

Origin www.cnblogs.com/guorongtao/p/11976664.html