Lines Matching refs:cert

89 elfcertlib_verifycert(ELFsign_t ess, ELFCert_t cert)  in elfcertlib_verifycert()  argument
95 if ((cert->c_verified == E_OK) || (cert->c_verified == E_IS_TA)) { in elfcertlib_verifycert()
121 KMF_CERT_DATA_ATTR, &cert->c_cert.certificate, in elfcertlib_verifycert()
131 cert, CACERT); in elfcertlib_verifycert()
132 cert->c_verified = E_OK; in elfcertlib_verifycert()
140 KMF_CERT_DATA_ATTR, &cert->c_cert.certificate, in elfcertlib_verifycert()
150 cert, OBJCACERT); in elfcertlib_verifycert()
151 cert->c_verified = E_OK; in elfcertlib_verifycert()
159 KMF_CERT_DATA_ATTR, &cert->c_cert.certificate, in elfcertlib_verifycert()
169 cert, SECACERT); in elfcertlib_verifycert()
170 cert->c_verified = E_OK; in elfcertlib_verifycert()
195 ELFCert_t cert = NULL; in elfcertlib_getcert() local
226 if ((cert = elfcertlib_allocatecert()) == NULL) { in elfcertlib_getcert()
264 cert->c_cert = certbuf[0]; in elfcertlib_getcert()
278 &cert->c_cert.certificate, &cert->c_subject); in elfcertlib_getcert()
283 &cert->c_cert.certificate, &cert->c_issuer); in elfcertlib_getcert()
293 cert->c_verified = E_UNCHECKED; in elfcertlib_getcert()
305 (ess->es_certCAcallback)(ess->es_callbackctx, cert, in elfcertlib_getcert()
307 cert->c_verified = E_IS_TA; in elfcertlib_getcert()
314 *certp = cert; in elfcertlib_getcert()
316 if (cert != NULL) in elfcertlib_getcert()
317 elfcertlib_freecert(ess, cert); in elfcertlib_getcert()
338 elfcertlib_loadprivatekey(ELFsign_t ess, ELFCert_t cert, const char *pathname) in elfcertlib_loadprivatekey() argument
380 cert->c_privatekey = keybuf[0]; in elfcertlib_loadprivatekey()
396 elfcertlib_loadtokenkey(ELFsign_t ess, ELFCert_t cert, in elfcertlib_loadtokenkey() argument
418 rv = kmf_get_cert_id_str(&cert->c_cert.certificate, &idstr); in elfcertlib_loadtokenkey()
441 &cert->c_privatekey, sizeof (KMF_KEY_HANDLE)); in elfcertlib_loadtokenkey()
474 &cert->c_privatekey); in elfcertlib_loadtokenkey()
496 elfcertlib_sign(ELFsign_t ess, ELFCert_t cert, in elfcertlib_sign() argument
540 KMF_KEYSTORE_TYPE_ATTR, &(cert->c_privatekey.kstype), in elfcertlib_sign()
543 KMF_KEY_HANDLE_ATTR, &cert->c_privatekey, sizeof (KMF_KEY_HANDLE)); in elfcertlib_sign()
580 elfcertlib_verifysig(ELFsign_t ess, ELFCert_t cert, in elfcertlib_verifysig() argument
618 (KMF_DATA *)(&cert->c_cert.certificate), sizeof (KMF_DATA)); in elfcertlib_verifysig()
635 elfcertlib_getdn(ELFCert_t cert) in elfcertlib_getdn() argument
639 return (cert->c_subject); in elfcertlib_getdn()
650 elfcertlib_getissuer(ELFCert_t cert) in elfcertlib_getissuer() argument
654 return (cert->c_issuer); in elfcertlib_getissuer()
742 elfcertlib_releasecert(ELFsign_t ess, ELFCert_t cert) in elfcertlib_releasecert() argument
744 elfcertlib_freecert(ess, cert); in elfcertlib_releasecert()
757 ELFCert_t cert = NULL; in elfcertlib_allocatecert() local
759 cert = malloc(sizeof (struct ELFCert_s)); in elfcertlib_allocatecert()
760 if (cert == NULL) { in elfcertlib_allocatecert()
766 (void) memset(cert, 0, sizeof (struct ELFCert_s)); in elfcertlib_allocatecert()
767 cert->c_verified = E_UNCHECKED; in elfcertlib_allocatecert()
768 cert->c_subject = NULL; in elfcertlib_allocatecert()
769 cert->c_issuer = NULL; in elfcertlib_allocatecert()
770 return (cert); in elfcertlib_allocatecert()
782 elfcertlib_freecert(ELFsign_t ess, ELFCert_t cert) in elfcertlib_freecert() argument
784 if (cert == NULL) in elfcertlib_freecert()
787 free(cert->c_subject); in elfcertlib_freecert()
788 free(cert->c_issuer); in elfcertlib_freecert()
790 kmf_free_kmf_cert(ess->es_kmfhandle, &cert->c_cert); in elfcertlib_freecert()
791 kmf_free_kmf_key(ess->es_kmfhandle, &cert->c_privatekey); in elfcertlib_freecert()
793 free(cert); in elfcertlib_freecert()