Ulf Leichsenring wrote (quoting Bob Relyea): >> 1) the user has multiple certs with the same subject, but some certs >> map to different roles (evil IMHO).
When Bob talks about different roles, he doesn't mean signing vs encryption. He means (for example) multiple signing certs, each with the same exact Subject name, where one of those signing certs is used to sign certain types of documents, and other signing certs (all with the same exact subject name) are used to sign other sorts of documents. I will say more about this below. > But you can find this constellation in many "business" PKI. The identity > of an user (his name or employee number) is taken as the cn= to match > the local directory structure (eG. company LDAP or ADS). But for > security reasons you need multiple keypairs and therefore also multiple > certificates. You must be sure, that his secret signing key is only on > his smartcard, so you generate this keypair on the card. For the > encryption keypair you must be sure to have a backup otherwise the lost > or damage of the smartcard results in data loss. That's why often users > have two different certificates (encryption and signing/authentication) > with the same subject in the certificates. > It's the job of the applications to select the right certificate > according to the keyUsage (and extendedKeyUsage). That's exactly right. It's the job of the applications, NOT the USER's job! NSS does that job. Apparently other software you are using does not! You want to give two certs with the same subject name different nicknames. You want the signing cert to have one nickname and the encryption cert to have another nickname. You want this precisely because you are dealing with other software (NOT NSS) that does not properly do its job. That other software does not pick the proper cert according to its crypto abilities, Consequently, that other software requires the user to be careful to select a signing cert for signing, and not (say) an encryption cert. That is unfortunate for the user, because the User may make the wrong choice some times. If the software chooses only the cert with the right capabilities from among different certs with the same subject name, then the user cannot make that mistake, and the user is freed from having to know the difference between a signing cert and an encryption cert. With such software, the user only needs to pick the cert(s) with the right identity, and if there are multiple certs for a single identity, the software will pick the right one. So the user only needs to have nicknames that remind him of the identity in the certs, not the identity and also the cryptographic purpose. NSS picks the right cert for the job. That is why NSS does not let you have different nicknames for different certs with the same subject name. NSS wants the user to pick the identity, and let it (NSS) pick the right cert for that identity. If all your software was capable of picking the right cert, then you would have no need to put the cert's cryptographic usage in the nickname. So, far from being a bug in NSS, it is a bug in that other software (which cannot pick the right cert) that makes you desire to have nicknames that tell the cert usage also. For users who have only software like NSS, software that picks the right cert for the identity, the only time they ever wish to be able to choose among different certs with the same subject name is the case I described above, where they have multiple certs with the same subject name and the same cryptographic usage, but they're supposed to use one for some organizational purposes (e.g. requesting employee benefits) and another for other purposes (say, filing expense reports). That is the situation where the identity and the cryptographic usage (signing) is not enough information to be able to pick the right certificate. Bob called that Evil, and I tend to agree. In such circumstances, it would be best if the certs' subject names had information about their uses encoded into the subject names, subject names that reflect their organizational purposes. > I think resolving this will take some thought so we don't break existing > applications (perhaps adding a new friendly name parallel with out > nickname which can be different even if the subject is the same). You want to change the browser to accommodate another less-capable application. I would ask, why not change that other application, so that it picks the right cert for the job, the way NSS does? -- Nelson B _______________________________________________ dev-tech-crypto mailing list dev-tech-crypto@lists.mozilla.org https://lists.mozilla.org/listinfo/dev-tech-crypto