Okay, I found the solution myself.
It appears that NSS/pk12util is going to add the
"PrivateTokenDescription" prefix if (and only if!) there happens to be a
":" character in the certificate's friendly name.
And this was the case with our certificates for a certain reason. Of
course we couldn't know this has such effect and we will remove it in
the future.
As soon as the ":" is removed from the certificate's friendly name,
there no longer is a locale-specific prefix in the certificate name at
all - best solution of all for our purposes.
(If I only knew this earlier, it could have saved many hours)
Regards.
BTW: The problem with the "wrong" certificate names still persists...
Am 20.07.2015 um 10:24 schrieb Trick, Daniel:
alta88, thanks for your reply!
I was able to get a full list of all localized prefix-strings from
"l10n" repository. This helps a lot! Didn't know there are separate
"l10n" repositories, so couldn't find this before.
Regarding using JavaScript to get the "PrivateTokenDescription"
string: You probably mean that this code could be used inside
Thunderbird, e.g. in an extension, right?
My situation is a bit different, as we have a separate *stand-alone*
program, which needs to perform the whole certificate import and setup
process (it's a C# program, by the way).
So far, our program will invoke /pk12util/ and /certutil/ from NSS
Tools to import the certificates and it then updates the "prefs.js"
file manually.
Is there any way how our program could figure out the
"PrivateTokenDescription" string from a local Thunderbird (or Firefox)
installation, without having to use a built-in LUT?
Possible options for us include:
1. Invoking a suitable command-line tool and capturing the output
2. Calling some function from a DLL
3. Reading the data directly from a file or from the registry
(So far, I was unable to figure out where exactly the localized
strings are stored in a local Thunderbird installation)
Best Regards!
Daniel
Am 17.07.2015 um 21:42 schrieb alta88:
On 07/15/2015 09:57 AM, Trick, Daniel wrote:
3. Where does the prefix string come from? I did full-text search on
the
Thunderbrid source codes, but the strings "Sécurité personnelle" or
"das
Software-Sicherheitsmodul" do not exist in Thunderbrid source. They
neither exits in NSS Tools source.
The name for the localized string is PrivateTokenDescription (found
by searching for the en-US value). You can get the localized name
with a call like this, in js:
Services.strings.createBundle("chrome://pipnss/locale/pipnss.properties").GetStringFromName("PrivateTokenDescription");
All the localizations are here:
http://mxr.mozilla.org/l10n-mozilla-release/search?string=PrivateTokenDescription&find=&findi=&filter=^[^\0]*%24&hitlimit=&tree=l10n-mozilla-release
--
Daniel Trick, Fraunhofer SIT
Cloud Computing, Identity & Privacy (CIP)
Rheinstr. 75, 64295 Darmstadt, Germany
Tel +49 6151 869-303
mailto:daniel.tr...@sit.fraunhofer.de
http://www.sit.fraunhofer.de/
--
dev-tech-crypto mailing list
dev-tech-crypto@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-tech-crypto