Error Connecting Ssl Indy 9
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of this site About Us Learn more about Stack Overflow the company Business Learn more about hiring developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow is a community of 4.7 million programmers, just like you, helping each other. Join them; it only takes a minute: Sign up Delphi 6 and Indy SSL connection not working up vote 1 down vote favorite 1 I need to consume a Web Service via SSL. In order to accomplish that I have built a web client in Delphi 6 that uses Indy to read the client certificates and write the soap request via https. The compilated version of the code is a DLL that runs in IIS 5.0. After tested the code in my local machine it works fine (I'm behind a proxy). But after the code is deployed to prod servers (not proxy) the SSL connection fails saying "Error connecting with SSL". Here is my code: var Response: TStringStream; IdHttp: TIdHTTP; IdCnxSLL: TIdConnectionInterceptOpenSSL; XmlSoapDoc: IXMLDocument; begin Response := TStringStream.Create(''); IdHttp := TIdHTTP.Create(nil); IdCnxSLL := TIdConnectionInterceptOpenSSL.Create(nil); XmlSoapDoc := TXMLDocument.Create(nil); with IdCnxSLL do begin IdCnxSLL.SSLOptions.Method := sslvSSLv23; IdCnxSLL.SSLOptions.RootCertFile := IniHttpConnectionData.Values['RootCertFile']; IdCnxSLL.SSLOptions.CertFile := IniHttpConnectionData.Values['CertFile']; IdCnxSLL.SSLOptions.KeyFile := IniHttpConnectionData.Values['KeyFile']; IdCnxSLL.OnGetPassword := IdConInterceptOpenSSLGetPassword; end; with IdHttp do begin if bUseProxy then begin Request.ProxyServer := IniHttpConnectionData.Values['ProxyServer']; Request.ProxyPort := StrToIntDef(IniHttpConnectionData.Values['ProxyPort'], 0); end else begin Host := IniHttpConnectionData.Values['HTTPHost']; Port := StrToIntDef(IniHttpConnectionData.Values['HTTPPort'], 443); end; Request.ContentType := 'text/xml'; Intercept := IdCnxSLL; InterceptEnabled := True; end; try IdHttp.Post(ServiceURL, SoapEnv, Response); except on E:EIdOSSLConnectError do LogError('SSL Connect Error: ' + E.Message); on E:Exception do LogError('Error' + E.ClassName + ' - ' + E.Message); end; I also try this code compiling into an exe program and it works. Is there something else I need to configure/add? Thanks. delphi ssl indy share|improve this question edited Sep 15 '09 at 7:10 asked Sep 14 '09 at 16:22 tecnotalk
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of this site About Us Learn more about Stack Overflow the company Business Learn more about hiring developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow is a community of 4.7 million programmers, just like you, helping each other. Join them; it only takes a minute: Sign up INDY 10.1.5 - Which SSL dlls work with Delphi 2006? up vote 15 down vote favorite 4 I'm trying to connect to http://stackoverflow.com/questions/1422586/delphi-6-and-indy-ssl-connection-not-working google documents (following Marco Cantu's excellent REST example) but I am getting the following SSL errors: 1) If I use the SSL dlls from openssl-0.9.8i-i386-win32.zip I get the error: "Could not load SSL library" 2) If I use the SSL dlls from indy_OpenSSL096m.zip I get the error: "Error connecting with SSL" 3) If I use the SSL dlls from openssl-0.9.8h-i386-win32-Indy-IntraWebEdition.zip I get the error: "Could not load SSl Library" Now I've researched this and there http://stackoverflow.com/questions/1874677/indy-10-1-5-which-ssl-dlls-work-with-delphi-2006 are a lot of recommendations with dead links to dlls about, including links on stack overflow. I suspect I need to find the SSL dlls that are compatible with the version of INDY I am using. My question is, does anyone know exactly which SSL dlls are compatible with Delphi 2006 & INDY 10.1.5? delphi ssl openssl indy delphi-2006 share|improve this question edited May 30 '12 at 14:47 Warren P 30.2k17113220 asked Dec 9 '09 at 15:31 Mattl 82721441 add a comment| 5 Answers 5 active oldest votes up vote 15 down vote accepted I had the same problem even after I upgrading to INDY 10.2.3 and I tryed every different version of the “libeay32.dll” and “ssleay32.dll” files I could find ... Like Matt I always got one of the two errors: "Could not load SSL library" or the "Error connecting with SSL" with something like "error:00000006:lib(0):func(0):EVP lib" ... I was very happy when I change the TidSSLioHandlerSocketOpenSSL.SSLOptions.Method to sslvSSLv23 and everything started working. A bit more research and I quickly understood anytime I got the error "Could not load SSL library" I was using the wrong version of the DLL files and anytime I got the "Error connecting with SSL" with something like "error:00000006:lib(0):func(0):EVP lib" I was using the wrong SSLOptions.Method value. Other Info: I'm using Delphi 2006, INDY 1
Join INTELLIGENT WORK FORUMSFOR COMPUTER PROFESSIONALS Log In Come Join Us! Are you aComputer / IT http://www.tek-tips.com/viewthread.cfm?qid=1577632 professional?Join Tek-Tips Forums! Talk With Other Members Be Notified Of ResponsesTo Your Posts Keyword Search One-Click Access To YourFavorite Forums Automated SignaturesOn Your Posts Best http://www.codenewsfast.com/cnf/thread/0/permalink.thr-ng1939q14886 Of All, It's Free! Join Us! *Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail. Posting Guidelines error connecting Promoting, selling, recruiting, coursework and thesis posting is forbidden.Tek-Tips Posting Policies Jobs Jobs from Indeed What: Where: jobs by Link To This Forum! Add Stickiness To Your Site By Linking To This Professionally Managed Technical Forum.Just copy and paste the BBCode HTML Markdown MediaWiki reStructuredText code below into your site. error connecting ssl Embarcadero: Delphi Forum at Tek-Tips HomeForumsProgrammersDevelopment ToolsEmbarcadero: Delphi Forum D7 Indy 9 SSL on TCP/IP connection issue thread102-1577632 Forum Search FAQs Links MVPs D7 Indy 9 SSL on TCP/IP connection issue D7 Indy 9 SSL on TCP/IP connection issue ehesling (Programmer) (OP) 5 Nov 09 07:00 Hi, the goal is: to get SSL working on a working combination of Delphi 7 TCP/IP client and server, using Indy 9 TCP/IP and SSL components. OpenSSL libraries: 0.9.6m.On server side: object IdTCPServer: TIdTCPServerBindings =
Hi, I have an Delphi 5 app which sends emails using idSMTP component from Indy 9. Now someone wants to use gmail to send mails so I'm trying to update the code to use IdSSLIOHandlerSocket... the problem is, that it seems to require specific version of OpenSSL dll-s which I don't have. 64 ... Remy Lebeau (TeamB) replied on 03-Sep-2011: "Ain Valtin" <✉when.you.really.need.it> wrote in message news:✉forums.embarcadero.com... (snip) Indy 9 did not use the official OpenSSL DLLs as-is. It used custom-built DLLs because we had to add some extra exports to access some data that OpenSSL did not natively expose yet. That was later addressed in Indy 10, 39 ... Ain Valtin replied on 03-Sep-2011: Remy Lebeau (TeamB) wrote: (snip) Thanks, with these DLLs I get bit further: Exception class: EIdOSSLConnectError Exception message: Error connecting with SSL. Exception address: 004FD788 65 ... Remy Lebeau (TeamB) replied on 04-Sep-2011: "Ain Valtin" <✉when.you.really.need.it> wrote in message news:✉forums.embarcadero.com... (snip)GMail port 587 requires the STARTTLS command, which Indy 9 does not natively support. If you continue using Indy 9, then you will have to set the TIdSSLIOHandlerSocket.PassThrough property to True to disable SSL initially, 88 ... Ain Valtin replied on 05-Sep-2011: Remy Lebeau (TeamB) wrote: (snip) It should be "HELO", not "EHLO", no? When using HELO I get following: SSL status: "before/connect initialization" SSL status: "before/connect initialization" SSL status: "SSLv3 write client hello A" 84 ... Ain Valtin replied on 05-Sep-2011: Remy Lebeau (TeamB) wrote: (snip) OK, upgraded to Indy 10 and now when posting the mail program just disappears... log shows SSL status: "before/connect initialization" SSL status: "before/connect initialization" 50 ... Remy Lebeau (TeamB) replied on 06-Sep-2011: "Ain Valtin" <✉when.you.really.need.it> wrote in message news:✉forums.embarcadero.com... (snip)No. EHLO is a newer command that replaces HELO when you need to discover server-side capabilities (like STARTTLS support). (snip)EHLO is required to discover if the server supports STARTTLS to begin with. 55 ... Remy Lebeau (TeamB) replied on 06-Sep-2011: "Ain Valtin" <✉when.you.really.need.it> wrote in message news:✉forums.embarcadero.com... (snip) Did you update your OpenSSL DLLs to ones that are compatible with Indy10? Have you put try/except blocks around your code t