08-23-2019, 08:47 PM
Running Indy 10.6.2.0
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:
Added logging to IdSMTPServerOnBeforeCommandHandler
And the CertFile and KeyFile were still set correctly. It seems like the certificates were not reloaded.
Been using https://www.checktls.com to test with as well.
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:
Code:
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 https://www.checktls.com to test with as well.