It's not a dum question.
There are two functions that you could use.
PK11_ListCerts with the PK11CertListUser argument....
certlist = PK11_ListCert(PK11CertListUser, pwarg);
and
CERT_FindUserCertByUsage:
* Find all user certificates that match the given criteria.
*
* "handle" - database to search
* "usage" - certificate usage to match
* "oneCertPerName" - if set then only return the "best" cert per
* name
* "validOnly" - only return certs that are curently valid
* "proto_win" - window handle passed to pkcs11
CERTCertList *
CERT_FindUserCertsByUsage(CERTCertDBHandle *handle,
SECCertUsage usage,
PRBool oneCertPerName,
PRBool validOnly,
void *proto_win)
The former loops through all the certs in the system, and can return any kind of cert
(all certs, user certs, CA certs, etc). It's typically used in display functions
(PSM's cert display, for instance).
The latter returns User certs that match a particular usage (Signing, encryption,
etc). It's used in mozilla when mozilla needs to select a certificate for a particular
task (encryption/signing).
Both functions return CERTCertList *, which can be traversed with the
CERT_LIST_HEAD(), CERT_LIST_NEXT() macros.
bob
Nelson B wrote on Fri, 26 Mar 04, 3:45 AM:
> Alexander Dimitrov wrote:
>
> > this may be a dumb question, but what should i type as
> > nickname in above function to get a list of user certificates?
>
> You need a different function to enumerate the user certs.
> That function exists to find the cert with a given nickname,
> not to enumerate certs with all nicknames.
>
> Sorry, I don't know the name of the function that you need.
>
> --
> Nelson B
>
> _______________________________________________
> mozilla-crypto mailing list
> [EMAIL PROTECTED]
> http://mail.mozilla.org/listinfo/mozilla-crypto
_______________________________________________
mozilla-crypto mailing list
[EMAIL PROTECTED]
http://mail.mozilla.org/listinfo/mozilla-crypto