EldoS | Feel safer!

Software components for data protection, secure storage and transfer

Error 75784 With TElSMTPClient and GMAIL

Also by EldoS: CallbackRegistry
A component to monitor and control Windows registry access and create virtual registry keys.
#30883
Posted: 10/05/2014 18:20:08
by Stephan Mercier (Standard support level)
Joined: 11/27/2011
Posts: 14

This as been working fine with V9.1 but fail with version 11.
Here is a snippet of the code:

ElSMTPClient:=TElSMTPClient.Create(nil);
ELSmtpClient.Address:=smtp.gmail.com
ELSmtpClient.Port:=465;
ELSmtpClient.Username:='user';
ELSmtpClient.Password:='password';
ELSmtpClient.UseSSL:=true;
ELSmtpClient.SSLMode:=smImplicit;
ELSmtpClient.OnCertificateValidate:=oSMTPCert.CertificateValidate;
ElSmtpClient.Open;
ElSmtpClient.Login('domain.com');
ELSmtpClient.Send(SmtpMsg);

In CertificateValidate, we set Validate to true
#30886
Posted: 10/06/2014 01:31:20
by Alexander Ionov (EldoS Corp.)

Thank you for contacting us.

Please add the following line before calling the Open method:
Code
ELSmtpClient.Versions := [sbSSL3, sbTLS1];


--
Best regards,
Alexander Ionov
#30888
Posted: 10/06/2014 07:16:12
by Stephan Mercier (Standard support level)
Joined: 11/27/2011
Posts: 14

I added the line as suggested and still get the same error code (75784).
#30889
Posted: 10/06/2014 07:54:21
by Vsevolod Ievgiienko (EldoS Corp.)

Hello.

Please set TElX509CertificateValidator.IgnoreCABasicConstraints to 'true' before certificate validation. This will solve the problem with Gmail.
#30890
Posted: 10/06/2014 08:27:38
by Stephan Mercier (Standard support level)
Joined: 11/27/2011
Posts: 14

It's my understanding that setting IgnoreCABasicConstraints to true would help us validate the GMAIL certificate. In this case, we are setting Validate to true in the OnCertificateValidate so we are not validating the certificate per say. Does this still apply?
#30896
Posted: 10/07/2014 01:44:56
by Vsevolod Ievgiienko (EldoS Corp.)

Quote
Does this still apply?

No it applies only if validator is used. Sorry, I've missed that you are setting Validate to 'true'.

Please handle TElSMTPClient.OnError event and post call stack that leads to this handler when error happens.
#30897
Posted: 10/07/2014 07:09:00
by Stephan Mercier (Standard support level)
Joined: 11/27/2011
Posts: 14

We are using a older version of Delphi the does not provide access to the call stack. Here is the only info that we get in OnError:
object=TElSMTPClient errorCode=75784 Fatal=1 Remote=0
Connection failed due to error (75784)
Maybe you can quickly try the code snipprt above and get more details.
Thanks
#30898
Posted: 10/07/2014 07:14:34
by Vsevolod Ievgiienko (EldoS Corp.)

Its possible to view call stack in all versions of Delphi at least I've did it since version 5. Please check this topic: http://stackoverflow.com/questions/86...7-debugger
#30899
Posted: 10/07/2014 07:42:23
by Stephan Mercier (Standard support level)
Joined: 11/27/2011
Posts: 14

This was originally inside a windows service but I extracted it and ran in debug. The first error I get is "Abstract error" in SBSimpleSSL in the Open procedure at FClient.Open. Here is the callstack for this error:

TElSSLClient.TLS1ParseCertificate($1F76FC8,3087)
TElSSLClient.TLS1ParseOnHandshakeLayer($1F5C00C,3091)
TElSSLClient.TLS1ParseOnRecordLayer($1F5C00C,3091,ctHandshake,0,0)
TElSSLClient.AnalyzeBuffer
TElSSLClient.DataAvailable
TElCustomSimpleSSLClient.DataAvailable
TElCustomSimpleSSLClient.IntMessageLoop(???)
TElCustomSimpleSSLClient.DoMessageLoop(???)
TElCustomSimpleSSLClient.Open
TElSMTPClient.Open
SendEMail('test','test')
TForm1.Button1Click(???)


And this leads through the error 75784 and here is the call stack for this:
TElCustomSimpleSSLClient.Open
TElSMTPClient.Open
SendEMail('test','test')
TForm1.Button1Click(???)
#30900
Posted: 10/07/2014 07:52:24
by Vsevolod Ievgiienko (EldoS Corp.)

What exact build of version 11 is used? If its not the last one please upgrade. Also please check the latest 12th build - I've just checked it works with Gmail without any problems.
Also by EldoS: Rethync
The cross-platform framework that simplifies synchronizing data between mobile and desktop applications and servers and cloud storages

Reply

Statistics

Topic viewed 2632 times

Number of guests: 1, registered members: 0, in total hidden: 0




|

Back to top

As of July 15, 2016 EldoS Corporation will operate as a division of /n software inc. For more information, please read the announcement.

Got it!