I need to develop a tool that will automatically (i.e. without the need for the user to do things manually) install a Certificate into Thunderbrid and configure the user's existing Mail account to make use of the new Cert. We need this in the company, to deploy certificates on many machines, so that our customers can sign their e-mail, even if they don't understand how to configure Thunderbrid for X.509 cert usage by hand (yes, for most users it's still way to complex to install and setup a certificate by hand).
Now the easy part is to import the certificate into Thunderbird's certificate store, because pk12util does this nicely:
pk12util.exe -i temp.p12 -d C:\Users\john\AppData\Roaming\Thunderbird\Profiles\1278dm3u.default -W rvfsfDAMdMyD71Z
But the difficult part is to actually configure the Mail account to actually use the certificate!
In perfs.js there is a property "mail.identity.idX.encryption_cert_name" which I need to set. Okay, but the value, on my system is "das Software-Sicherheitsmodul:ERIKA MUSTERMANN", after I setup the certificate manually.
Where does the prefix string "das Software-Sicherheitsmodul:" come from? And how I can my program get it? I clearly can not hardcode the String, as it appears to be Locale-specific
Also, if I use "certutil.exe -L" to list the installed certificates, then the output is very different!
NSS Certificate DB:ERIKA MUSTERMANN u,u,u
I tried using the name that certutil shows, i.e. "NSS Certificate DB:Something" instead of "das Software-Sicherheitsmodul::Something". But it does not work
Thanks in advance!