Search completed in 1.24 seconds.
8 results for "CERTCertDBHandle":
Enc Dec MAC Using Key Wrap CertReq PKCS10 CSR
MozillaProjectsNSSNSS Sample CodeEnc Dec MAC Using Key Wrap CertReq PKCS10 CSR
&certreq->subjectpublickeyinfo, null /* wincx */); if (reqder.data) { secitem_freeitem(&reqder, pr_false); } cleanup: if (rv) { pr_fprintf(pr_stderr, "bad certificate request\n"); if (arena) { port_freearena(arena, pr_false); } certreq = null; } return certreq; } /* * sign cert */ static secitem * signcert(certcertdbhandle *handle, certcertificate *cert, prbool selfsign, secoidtag hashalgtag, seckeyprivatekey *privkey, char *issuernickname, void *pwarg) { secitem der; secstatus rv; secoidtag algid; void *dummy; prarenapool *arena = null; secitem *result = null; seckeyprivatekey *caprivatekey = null; if (!selfsign) { cer...
... port_errortostring(rv)); /* result allocated out of the arena, it will be freed * when the arena is freed */ result = null; goto cleanup; } cert->dercert = *result; cleanup: if (caprivatekey) { seckey_destroyprivatekey(caprivatekey); } return result; } /* * makev1cert */ static certcertificate * makev1cert(certcertdbhandle *handle, certcertificaterequest *req, char * issuernickname, prbool selfsign, unsigned int serialnumber, int warpmonths, int validitymonths) { prexplodedtime printabletime; prtime now; prtime after; ...
...&req->subject : &issuercert->subject), validity, req); cert_destroyvalidity(validity); } cleanup: if ( issuercert ) { cert_destroycertificate (issuercert); } return cert; } /* * add a certificate to the nss database */ secstatus addcert(pk11slotinfo *slot, certcertdbhandle *handle, const char *name, char *trusts, char *infilename, prbool ascii, prbool emailcert, void *pwdata) { secitem certder; secstatus rv; certcerttrust *trust = null; certcertificate *cert = null; certder.data = null; /* read in the entire file specified with the -i argument */ rv = readderfromfile(&certder, infilename, ascii);...
...And 6 more matches
sample2
MozillaProjectsNSSNSS Sample Codesample2
{ rv = secfailure; goto cleanup; } rv = cert_verifysigneddatawithpublickeyinfo(&signeddata, &certreq->subjectpublickeyinfo, null /* wincx */); if (reqder.data) { secitem_freeitem(&reqder, pr_false); } cleanup: if (rv) { pr_fprintf(pr_stderr, "bad certificate request\n"); if (arena) { port_freearena(arena, pr_false); } certreq = null; } return certreq; } /* * sign cert */ static secitem * signcert(certcertdbhandle *handle, certcertificate *cert, prbool selfsign, secoidtag hashalgtag, seckeyprivatekey *privkey, char *issuernickname, void *pwarg) { secitem der; secstatus rv; secoidtag algid; void *dummy; prarenapool *arena = null; secitem *result = null; seckeyprivatekey *caprivatekey = null; if (!selfsign) { certcertificate *issuer = pk11_findcertfromnickname(issuernickname, pwarg); if ((certcertificate *)n...
...rv != secsuccess) { pr_fprintf(pr_stderr, "could not sign encoded certificate data : %s\n", port_errortostring(rv)); /* result allocated out of the arena, it will be freed * when the arena is freed */ result = null; goto cleanup; } cert->dercert = *result; cleanup: if (caprivatekey) { seckey_destroyprivatekey(caprivatekey); } return result; } /* * makev1cert */ static certcertificate * makev1cert(certcertdbhandle *handle, certcertificaterequest *req, char * issuernickname, prbool selfsign, unsigned int serialnumber, int warpmonths, int validitymonths) { prexplodedtime printabletime; prtime now; prtime after; certvalidity *validity = null; certcertificate *issuercert = null; certcertificate *cert = null; if ( !selfsign ) { issuercert = cert_findcertbynicknameoremailaddr(handle, issuernickname); if (!issuer...
...&req->subject : &issuercert->subject), validity, req); cert_destroyvalidity(validity); } cleanup: if ( issuercert ) { cert_destroycertificate (issuercert); } return cert; } /* * add a certificate to the nss database */ secstatus addcert(pk11slotinfo *slot, certcertdbhandle *handle, const char *name, char *trusts, char *infilename, prbool ascii, prbool emailcert, void *pwdata) { secitem certder; secstatus rv; certcerttrust *trust = null; certcertificate *cert = null; certder.data = null; /* read in the entire file specified with the -i argument */ rv = readderfromfile(&certder, infilename, ascii); if (rv != secsuccess) { pr_fprintf(pr_stderr, "unable to read input f...
...And 6 more matches
sslcrt.html
MozillaProjectsNSSSSL functionssslcrt.html
syntax #include <cert.h> secstatus cert_verifycertnow( certcertdbhandle *handle, certcertificate *cert, prbool checksig, seccertusage certusage, void *wincx); parameters this function has the following parameters: handle a pointer to the certificate database handle.
... syntax #include <cert.h> certcertificate *cert_findcertbyname ( certcertdbhandle *handle, secitem *name); parameters this function has the following parameters: handle a pointer to the certificate database handle.
... syntax #include <cert.h> #include <certt.h> certcertnicknames *cert_getcertnicknames ( certcertdbhandle *handle, int what, void *wincx); parameters this function has the following parameters: handle a pointer to the certificate database handle.
... syntax #include <cert.h> certcertdbhandle *cert_getdefaultcertdb(void); returns the function returns the certcertdbhandle for the default certificate database.
ssltyp.html
MozillaProjectsNSSSSL functionsssltyp.html
types and structures managing secitem memory types and structures these types and structures are described here: certcertdbhandle certcertificate pk11slotinfo secitem seckeyprivatekey secstatus additional types used by a single function only are described with the function's entry in each chapter.
...<a name="> many of the structures presented here (certcertdbhandle, certcertificate, pk11slotinfo, and seckeyprivatekey) are opaque--that is, they are types defined as structures (for example, certcertdbhandlestr) that may change in future releases of network security services.
... certcertdbhandle an opaque handle structure for open certificate databases.
... syntax #include <certt.h> typedef struct certcertdbhandlestr certcertdbhandle; certcertificate an opaque x.509 certificate object.
Function_Name
MozillaProjectsNSSBlank Function
syntax #include <headers.h> returntype function_name( paramtype paramname, paramtype paramname, ); parameters paramname sample: in pointer to a certcertdbhandle representing the certificate database to look in paramname sample: in pointer to an secitem whose type must be sidercertbuffer and whose data contains a der-encoded certificate description long description of this function, what it does, and why you would use it.
CERT_FindCertByDERCert
MozillaProjectsNSSCERT FindCertByDERCert
syntax #include <cert.h> certcertificate *cert_findcertbydercert( certcertdbhandle *handle, secitem *dercert ); parameters handle in pointer to a certcertdbhandle representing the certificate database to look in dercert in pointer to an secitem whose type must be sidercertbuffer and whose data contains a der-encoded certificate description this function looks in the ?nsscryptocontext?
CERT_FindCertByIssuerAndSN
MozillaProjectsNSSCERT FindCertByIssuerAndSN
syntax #include <cert.h> certcertificate *cert_findcertbyissuerandsn ( certcertdbhandle *handle, certissuerandsn *issuerandsn ); parameters handle in pointer to a certcertdbhandle representing the certificate database to look in issuerandsn in pointer to a certissuerandsn that must be properly formed to contain the issuer name and the serial number (see [example]) description this function creates a certificate key using the issuerandsn and it then uses the key to find the matching certificate in the database.
OLD SSL Reference
MozillaProjectsNSSSSL functionsOLD SSL Reference
types and structures certcertdbhandle certcertificate pk11slotinfo secitem seckeyprivatekey secstatus managing secitem memory secitem_freeitem secitem_zfreeitem chapter 4 ssl functions this chapter describes the core ssl functions.