I have a web app that utilizes PayPal's IPN. On October 15th PayPal made some modifications because of the Poodle security flaw: Venture Beat: paypal-says-its-poodle-security-flaw-fix-may-break-the-service-for-some-users-merchants
At this point my calls to https://www.paypal.com/cgi-bin/webscr started returning SSL3_READ_BYTES:sslv3 alert handshake failure
There seems to be fixes out there for php: PHP Fix
I am looking for a solution to fix this for Indy. My code below:
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));
I have tried replacing the SSLOptions.Method with:
SSLOptions.Method := sslvTLSv1;
But this still does not work.