The object IdHTTP1: TIdHTTP
IOHandler=IdSSLIOHandlerSocketOpenSSL1
AllowCookies=True
HandleRedirects=True
ProxyParams. BasicAuthentication=False
ProxyParams. ProxyPort=0
Request. ContentLength=1
Request. Accept='text/HTML, */*
Request. BasicAuthentication=False
Request. UserAgent='Mozilla/3.0 (compatible; Indy Library) '
HTTPOptions=[hoForceEncodeParams]
Left=40
Top=32
End
The object IdSSLIOHandlerSocketOpenSSL1: TIdSSLIOHandlerSocketOpenSSL
MaxLineAction=maException
Port=0
DefaultPort=0
SSLOptions. RootCertFile='D: \ cert. Pem'
SSLOptions. CertFile='D: \ cert. Pem'
SSLOptions. Method=sslvSSLv3
SSLOptions. Mode=sslmUnassigned
SSLOptions. VerifyMode=[]
SSLOptions. VerifyDepth=0
Left=40
Top=80
End
//form code
Memo1. Text:=idhttp1. Get (' https://www.themoviedb.org/');
There is an error code
Error: 14094412: SSL routines: SSL3_READ_BYTES: sslv3 alert bad certificate '.
The Process Project2. Exe
Don't know how this is the mistake? Have been also didn't found the solution to the problem, please help to take a look at this how to solve is better,
Do or who can parse https://www.themoviedb.org/web page, can also use other ways to parse https://www.themoviedb.org/this web data, or interface can also have the site, would like to get good grades or Money to return, thanks a lot!!!!!!
CodePudding user response:
Alert bad certificateCertification document is wrong,
CodePudding user response:
USES theUrlmon, ActiveX;
function URLDownloadToString (Const sURL: String; Var sBuf: AnsiString) : Boolean;
Var
PpStream: cost;
Statstg: TStatStg;
DwRead: Integer;
The begin
Result:=False;
SBuf:=';
If (URLOpenBlockingStream (nil, PChar (sURL), ppStream, 0, nil) & lt;> S_OK) then the exit;
Try
If (ppStream. Stat (statstg STATFLAG_NONAME)=S_OK) and (statstg. CbSize> 0) then the begin
SetLength (sBuf, statstg. CbSize);
Try
Result:=(ppStream. Read (Pointer (sBuf), statstg. CbSize, @ dwRead)=S_OK);
The finally
end;
end;
The finally
PpStream:=nil;
end;
end;
Procedure TForm1. Button2Click (Sender: TObject);
Var
SBuf: AnsiString;
The begin
URLDownloadToString (' https://www.themoviedb.org/', sBuf);
Memo1. Text:=sBuf;
end;
CodePudding user response:
KiboismeYour way, I tested, the data returned is empty,
CodePudding user response:
The problems faced by the elder brothers, and I the same, don't know if you solved?CodePudding user response:
Server requires SSL version is higher, the CURL grab your code version is too low,USES the high version a try,
CodePudding user response:
The building Lord solved?CodePudding user response:
Your problem solved?CodePudding user response:
Seek solutionsCodePudding user response:
CodePudding user response:
Certificate file is wrong, or the certificate has a problemCodePudding user response:
Dig out solve...