You are not logged in.
Pages: 1
I have a function that sends email. When I compile the project for widows, the email is sent correctly. But when I compile for Linux, I come across the following error:
EOpenSslNetTls {LastError:1,OpenSsl:"1010117F",Message:"TOpenSslNetTls.AfterConnection connect: OpenSSL 1010117F error 1 [SSL_ERROR_SSL (error:1416F086:SSL routines:tls_process_serve r_certificate:certificate verify failed) (unable to get local issuer certificate #20)]"} [TAppRestHttpSrv8081v1THttpSrvRe] at 6ea87f 00000000129308CA EXC ENetSock {Message:"TCrtSocket.DoTlsAfter: TLS failed [EOpenSslNetTls TOpens 6c922f
In the email sending settings, I set TLS to 1. Am I missing something?
Offline
Does have the smtp server a valid X.509 certificate, known by the client host?
How I can verify this?
There are some other way to api server send email without this?
I i found this certificate how i configure it into mormot sendmail?
I fell me a newbie!
Last edited by mrbar2000 (2024-09-27 19:37:59)
Offline
Please try with
https://github.com/synopse/mORMot2/commit/3a25a51b
Offline
Thanks now works. Can u explain about this change? Or by default sendmail should be ignore certificate?
Offline
My guess is that on Windows, you did have the information about the SMTP server certificate into your system, whereas with OpenSSL, you did not.
But it seems unsafe that SendEmail() would always ignore the certificate.
I have added a new optional TLSIgnoreCertError parameter:
https://github.com/synopse/mORMot2/commit/08d5d660
Ensure you set TLSIgnoreCertError = true for your server.
Offline
It works! Thank you A.B!!
Offline
In linux, `/etc/ssl/certs` stores trusted certificates, including CA's. But in Windows, I don't know how to make openssl work to verify the tls cert. Therefore, it is recommended to use SChannel as the TLS layer in Windows, and OpenSSL is preferred in Linux.
Offline
Pages: 1