Author |
|
groblescompu Newbie
Joined: 26 February 2021 Location: France
Online Status: Offline Posts: 1
|
Posted: 26 February 2021 at 5:19am | IP Logged
|
|
|
Hello Everybody,
I encounter a problem when using StartTls () for the Imap component.
We authenticate ourselves using authentication cards and it sometimes happens that we have to change the card in order to retrieve mails on another account.
The connection to the first account with the authentication card works fine. By cons when I change card and I try to authenticate with this card for his associated account I have an error and he can not find his information.
I have verified that in the certificate store all were in place.
If I relaunch the application and I authenticate myself with this famous card on the corresponding account all work niquel. The error occurs after a first authentication with another card / account.
we are using version 9 of the components.
If you have an idea, I'm a taker because I don't know what to do anymore!
Sorry for my awfull english
|
Back to Top |
|
|
Alex AfterLogic Support
Joined: 19 November 2003
Online Status: Offline Posts: 2206
|
Posted: 26 February 2021 at 12:29pm | IP Logged
|
|
|
Hi,
I guess you're using client certificates for authentication. You can check if your code is correct by making some simple test sample.
Code:
Imap imp = new Imap();
imp.Log.Enabled = true;
imp.Log.Filename = @"C:\Temp\log.txt";
imp.Log.Clear();
imp.SslCertificates.Client = new Certificate(@"C:\my1.pfx", CertFileType.Pfx, "secret");
imp.Connect(...);
imp.StartTls();
imp.Disconnect();
imp.SslCertificates.Client = new Certificate(@"C:\my2.pfx", CertFileType.Pfx, "secret");
imp.Connect(...);
imp.StartTls();
imp.Disconnect();
|
|
|
Does it work this way? If not, does it work if you try my2 first and then my1? You'll need to collect as much info as possible, with different scenarios. Also, please note that we support only the current, up-to-date version. So please make sure you tried the latest version.
Regards,
Alex
|
Back to Top |
|
|
petervolz Newbie
Joined: 20 March 2023 Location: United Kingdom
Online Status: Offline Posts: 2
|
Posted: 20 March 2023 at 4:11pm | IP Logged
|
|
|
Hi - I didn't know that instead of setting authentication options, we can use client certificates, so no username/password is needed to authenticate, but now bunch of questions are in my mind; does pop3 also support this? as well as StartTls for pop3?
CertFileType P7b and cer can't be used for this kind of authentication?
And is this something that server must support?
Anyone got idea?
|
Back to Top |
|
|
petervolz Newbie
Joined: 20 March 2023 Location: United Kingdom
Online Status: Offline Posts: 2
|
Posted: 20 March 2023 at 4:16pm | IP Logged
|
|
|
oh forgot to ask about if client certificate can be set from X509Store \ X509Certificate2?
|
Back to Top |
|
|
Igor AfterLogic Support
Joined: 24 June 2008 Location: United States
Online Status: Offline Posts: 6095
|
Posted: 21 March 2023 at 3:38am | IP Logged
|
|
|
Quote:
does pop3 also support this? as well as StartTls for pop3? |
|
|
Yes.
Quote:
CertFileType P7b and cer can't be used for this kind of authentication? |
|
|
They cannot as they don't contain a private key.
Quote:
And is this something that server must support? |
|
|
Indeed, as that requires advanced configuration you probably won't get with public email services but can be done in case of corporate network servers.
Quote:
if client certificate can be set from X509Store \ X509Certificate2? |
|
|
Yes, that's actually the only way how it would work.
--
Regards,
Igor, Afterlogic Support
|
Back to Top |
|
|