【发布时间】:2014-12-28 19:42:40
【问题描述】:
我有一个使用 PayPal 的 IPN 的网络应用程序。 10 月 15 日,由于 Poodle 安全漏洞,PayPal 进行了一些修改: Venture Beat: paypal-says-its-poodle-security-flaw-fix-may-break-the-service-for-some-users-merchants
此时我对https://www.paypal.com/cgi-bin/webscr 的调用开始返回SSL3_READ_BYTES:sslv3 警报握手失败
似乎有针对 php 的修复:PHP Fix
我正在为 Indy 寻找解决此问题的解决方案。我的代码如下:
IdSSLIOHandlerSocket1 := TIdSSLIOHandlerSocketOpenSSL.create(nil);
try
with IdSSLIOHandlerSocket1 do begin
SSLOptions.Method := sslvSSLv3;
SSLOptions.Mode := sslmUnassigned;
SSLOptions.VerifyMode := [];
SSLOptions.VerifyDepth := 2;
end;
IdHTTP1 := TIdHTTP.create(nil);
with IdHTTP1 do begin
IOHandler := IdSSLIOHandlerSocket1;
ReadTimeout := 0;
AllowCookies := True;
ProxyParams.BasicAuthentication := False;
ProxyParams.ProxyPort := 0;
Request.ContentLength := -1;
Request.ContentRangeEnd := 0;
Request.ContentRangeStart := 0;
Request.ContentType := 'text/html';
Request.Accept := 'text/html, */*';
Request.BasicAuthentication := False;
Request.UserAgent := 'Mozilla/3.0 (compatible; Indy Library)';
HTTPOptions := [hoForceEncodeParams];
end;
ss := TStringList.Create;
ss.Add('cmd=_notify-validate');
for i:= 0 to ARequestInfo.Params.count -1 do begin
ss.Add(ARequestInfo.Params[i]);
end;
mPayPalServer := 'https://www.paypal.com/cgi-bin/webscr';
mResult := HTTPDecode(IdHTTP1.Post(mPayPalServer, ss));
我尝试将 SSLOptions.Method 替换为:
SSLOptions.Method := sslvTLSv1;
但这仍然不起作用。
【问题讨论】: