Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

How to find all certificates by subject name?

20 views
Skip to first unread message

Sean Leonard

unread,
Jun 4, 2012, 2:47:00 AM6/4/12
to mozilla-dev...@lists.mozilla.org
Hi all,

What is the best way with NSS to find all certificates that have the
same subject name?

The function CERT_FindCertByName expresses the right general idea, but
it only returns one certificate at maximum. Internally, it calls
NSSCryptoContext_FindBestCertificateBySubject, which calls
nssCertificateStore_FindCertificatesBySubject (which is supposed to be
fast, since nssCertificateStore has an nssHash *subject member, which is
a list). Unfortunately this list is filtered with
nssCertificateArray_FindBestCertificate. Of course,
nssCertificateStore_FindCertificatesBySubject is not a public function.

Thanks.
0 new messages