Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Indy SMTP Server TLS Change Certificates while Active?
Running Indy

It seems like I can’t change the certificate files after setting
IdSMTPServer1->Active = true;

I have my test certificate loaded before that call and that domain works fine but when I try to do after that does not reload/work

What I am trying do is add STARTTLS support based on bound IP then find the right domain certificate based on the IP to load.

Trying doing this in IdSMTPServer1Connect(TIdContext *AContext)
Where I find the AContext->Connection->Socket->Binding->IP; 

Which I hoped would then allow me to load the certificate file that was needed used the following:
IdServerIOHandlerSSLOpenSSL1->SSLOptions->CertFile = aSystemDrive + "\\cert\\" + asBannerDomain + "-chain.pem";
IdServerIOHandlerSSLOpenSSL1->SSLOptions->KeyFile = aSystemDrive + "\\cert\\" + asBannerDomain + "-key.pem";

Added logging to IdSMTPServerOnBeforeCommandHandler
And the CertFile and KeyFile were still set correctly. It seems like the certificates were not reloaded.

Been using to test with as well.

Messages In This Thread
Indy SMTP Server TLS Change Certificates while Active? - by vbgamer45 - 08-23-2019, 08:47 PM

Forum Jump:

Users browsing this thread: 1 Guest(s)