Re: [Davmail-users] java.lang.RuntimeException: Unable to configure SunPKCS11 provider Initializati
Brought to you by:
mguessan
From: Edward J. S. <edw...@gm...> - 2022-10-01 22:29:53
|
On Aug 11, 2022, at 5:25 PM, Edward J. Sabol <edw...@gm...> wrote: > Hi. I had DavMail 6.0.1 running fine on CentOS 7.x. My sys admins recently upgraded my Linux box at work to RHEL 8.6 (actually Oracle Linux 8.6 but it's basically identical to RHEL), and now DavMail isn't working. The log shows this: > > WARN [ImapConnection-60182] davmail - DavMail configuration exception: > Connect exception: java.lang.RuntimeException Unable to configure SunPKCS11 provider Initialization failed slotListIndex is 0 but token only has 0 slots > > I'm using O365Manual mode where you copy a URL and paste it in your web browser in order to authenticate with a card reader. But I can't seem to get that far where it will let me do that anymore. > > Has anyone else seen this error? > > Anyone know the cause? Maybe this is due to some change in the OpenSC library? > > Is there any fix or workaround? > > I created an issue on GitHub about this last week. Sorry, I keep forgetting DavMail development isn't done on GitHub. :-) > > https://github.com/mguessan/davmail/issues/226 It was disappointing that I never got any kind of reply about this. After almost 2 months of banging my head on this and not seeing emails sent to me in a timely fashion, I finally found a solution (or a workaround)! All it required was changing davmail.ssl.pkcs11Library=/usr/lib64/pkcs11/opensc-pkcs11.so to davmail.ssl.pkcs11Library=/usr/lib64/pkcs11/gnome-keyring-pkcs11.so in my ~/.davmail.properties file. I came across a completely-unrelated-to-DavMail posting somewhere which recommended switching from opensc-pkcs11.so to gnome-keyring-pkcs11.so for something else, so I thought I'd give it a try. I'm so very happy to discover that it worked for DavMail! I hope this information helps out someone else who is using DavMail on RHEL 8. Regards, Ed |