Error Connecting With Ssl Indy Delphi
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.ClassNa
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 http://stackoverflow.com/questions/1422586/delphi-6-and-indy-ssl-connection-not-working each other. Join them; it only takes a minute: Sign up Delphi Indy verify server certificate SSL up vote 5 down vote favorite 3 I have scoured the internet and haven't found a solution or method on how to verify the certificate when connecting over HTTPS using TIdHTTP. I have hooked up a IdSSLIOHandlerSocketOpenSSL component as the IOHandler, http://stackoverflow.com/questions/13577706/delphi-indy-verify-server-certificate-ssl set the SSLModes, etc. but when I browse to https://s3.amazonaws.com it cannot verify the certificate. OpenSSL (Indy) gives "Error connecting with SSL. SSL3_GET_SERVER_CERTIFICATE: Certificate verify failed" The OpenSSL libraries have successfully loaded (checked with WhichFailedToLoad). The OnStatusInfo event writes the following: SSL status: "before/connect initialization" SSL status: "before/connect initialization" SSL status: "SSLv2/v3 write client hello A" SSL status: "SSLv3 read server hello A" SSL status: "SSLv3 read server certificate B" SSL status: "SSLv3 read server certificate B" SSL status: "SSLv3 read server certificate B" And OnVerifyPeer, AOk = False. How can I get it to verify correctly. What's going on? Thanks for reading, Adrian delphi ssl indy share|improve this question asked Nov 27 '12 at 5:05 Adrian 102215 add a comment| 2 Answers 2 active oldest votes up vote 6 down vote accepted You have to implement a event handler for the OnVerifyPeer event of your TIdSSLIOHandlerSocketOpenSSL component. From IdSSLOpenSSL.pas: Note that you really should always implement OnVerifyPeer, otherwise the certificate of the peer you are connecting to is NOT che
for Help Receive Real-Time Help Create a Freelance Project Hire for a Full Time Job Ways to Get Help Ask a Question Ask for Help Receive Real-Time Help Create a Freelance Project Hire for a Full Time Job Ways to Get Help Expand Search Submit Close Search Login Join https://www.experts-exchange.com/questions/23268455/Error-connecting-with-SSL-Indy-9.html Today Products BackProducts Gigs Live Careers Vendor Services Groups Website Testing Store Headlines Experts Exchange > http://www.activedelphi.com.br/forum/viewtopic.php?t=48971&sid=1693c9c73c30935d193aa2e7b5a3689a Questions > Error connecting with SSL (Indy 9) Want to Advertise Here? Solved Error connecting with SSL (Indy 9) Posted on 2008-03-25 Delphi 1 Verified Solution 5 Comments 6,645 Views Last Modified: 2008-07-23 Hi everyone, I'm a delphi 5 programmer and I'm using indy 9 to send a SOAP file, this is pretty new to me but I was able to create a error connecting idhtttp object and connect to the right url but when I post the file, I'm getting this error: error connecting with SSL I have tried downloading libeay32.dll and ssleay32.dll but still, this error shows up, these are made for indy 9 but I can't really know if they are the right version exactly. Any suggestions on what I should do? 0 Question by:Buropro-Citation Facebook Twitter LinkedIn Google LVL 28 Best Solution byciuly I know they are not sending soap. error connecting with what they are sending is irrelevant. http is the same for everybody. you send something. you get something. the idea is that you look at thos eprojects to see how Go to Solution 5 Comments LVL 28 Overall: Level 28 Delphi 25 Message Expert Comment by:ciuly2008-03-25 what is the exact error? did you set up ssl correctly? make sure the ssl version is set up correctly as well. you can take a peek at some of my ssl indy examples here: http://www.ciuly.com/delphi/indy/ 0 Message Active 5 days ago Author Comment by:Buropro-Citation2008-03-25 The error is a EidOSSLconnectError exception, the exact error message is 'error connecting with SSL', not much detail in there unfortunatly. I haven't set up the SSL tough, I have installed indy 9 and then copied the 2 dll mentioned earlier in my project directory, can you show me how to set it up? On the internet I was able to find indy_openssl096.zip which was supposed to work with indy 9 (I have installed indy indy9.0.18_d5) I'm not sure if this was ok... 0 LVL 28 Overall: Level 28 Delphi 25 Message Expert Comment by:ciuly2008-03-25 >> can you show me how to set it up? I gave you link to some projects. the best explanation there is: an example. 3 of them actually when I say setup I don't mean install in the system. I mean setup the components correctly (connect s
Exibir próxima mensagem Autor Mensagem WDRochaNovatoRegistrado: Sexta-Feira, 25 de Julho de 2008Mensagens: 95Localização: Manaus - Am Enviada: Ter Jul 07, 2009 11:37 am Assunto: Error Connecting With SSL Bom dia pessoal, estou desenvolvendo uma aplicação e nela uma funcionalidade para enviar emails. eu usei como base este tuto.. http://www.devmedia.com.br/articles/viewcomp.asp?comp=9107 mas ele só envia se eu estiver usando a conta do gmail.. mas tbm queria enviar usando a conta do yahoo.. Usando a conta do gmail ele envia normalmente, mas se mudar para a conta do yahoo...acontece o seguinte erro Error Connecting With SSL já baixei várias versões openSSL e o erro continua.. alguém já passou por isso. obrigado._________________Williame Rocha Voltar ao Topo rogerbettiColaboradorRegistrado: Quarta-Feira, 2 de Fevereiro de 2005Mensagens: 1366Localização: São Paulo/SP Enviada: Ter Jul 07, 2009 2:18 pm Assunto: usa o componente IdSSLHandler da paleta indy, e tem que setar as propriedades de acordo com o ssl do yahoo Voltar ao Topo WDRochaNovatoRegistrado: Sexta-Feira, 25 de Julho de 2008Mensagens: 95Localização: Manaus - Am Enviada: Ter Jul 07, 2009 2:34 pm Assunto: obrigado pela resposta.... eu estou usando sim...já está ligado ao IdSMTP. Eu já tentei pela porta 587, 465 e 25, com e sem autenticação... vc teria algum exemplo q funcionasse para o yahoo???_________________Williame Rocha Voltar ao Topo flexsystemsAprendizRegistrado: Segunda-Feira, 2 de Abril de 2007Mensagens: 234Localização: Caxias do Sul Enviada: Ter Ago 04, 2009 2:26 am Assunto: Olá a todos, estou utilizando Indy 10.2.3 + BDS2007 e estou tendo os mesmos problemas... alguem achou alguma solução???_________________Edvilson V. G. Chaves - Pesquise bem antes de postar. - Qdo postar pense muito bem onde seria o melhor resultado. e-mail: suporte@flexvendasweb.com.br Site: www.flexvendasweb.com.br Voltar ao Topo WDRochaNovatoRegistrado: Sexta-Feira, 25 de Julho de 2008Mensagens: 95Localização: Manaus - Am Enviada: Seg Ago 10, 2009 2:21 pm Assunto: Boa tarde, resolvi meus problemas utilizando o componente Overbyte que é mt superior ao Indy. Com ele consegui enviar emails utilizando as contas do hotmail, yahoo, gmail, bol, Telefônica, ig e etc. A