Lines Matching refs:cert

40 #include <mps/cert.h>
396 /* this is an invalid cert, reject it */
406 /* this is a valid cert, reject it in this case. */
467 der.Data = node->cert->derIssuer.data;
468 der.Length = node->cert->derIssuer.len;
481 der.Data = node->cert->derSubject.data;
482 der.Length = node->cert->derSubject.len;
497 sernum = &node->cert->serialNumber;
512 ret = CERT_CertTimesValid(node->cert);
514 /* this is an invalid cert */
520 ret = CERT_CertTimesValid(node->cert);
522 /* this is a valid cert */
568 rv = nss2kmf_cert(node->cert, &kmfcerts[*numcerts]);
691 CERTCertificate *cert = NULL;
721 cert = PK11_FindCertFromNickname(certlabel, NULL);
722 if (cert == NULL) {
730 nssrv = CERT_CertTimesValid(cert);
732 /* this is an invalid cert - skip it */
737 nssrv = CERT_CertTimesValid(cert);
739 /* this is a valid cert - skip it */
745 nssrv = SEC_DeletePermCertificate(cert);
761 nssrv = SEC_DeletePermCertificate(node->cert);
779 if (cert != NULL) {
780 CERT_DestroyCertificate(cert);
1235 KMF_DATA *cert = NULL;
1261 /* Get the cert data and decode it */
1262 cert = kmf_get_attr_ptr(KMF_CERT_DATA_ATTR, attrlist, numattr);
1263 if (cert == NULL || cert->Data == NULL)
1266 nss_cert = CERT_DecodeCertFromPackage((char *)cert->Data,
1267 cert->Length);
1738 CERTCertificate *cert, SECItem *pwitem)
1756 if (SEC_PKCS12AddCertAndKey(p12ecx, certSafe, NULL, cert,
1869 rv = add_cert_to_bag(p12ecx, node->cert, &pwitem);
2199 KMF_DATA *cert;
2201 cert = kmf_get_attr_ptr(KMF_CERT_DATA_ATTR, attrlist, numattr);
2202 if (cert == NULL)
2205 * Decode the cert into an NSS CERT object so we can access the
2208 nss_cert = CERT_DecodeCertFromPackage((char *)cert->Data,
2209 cert->Length);
2286 store_cert(KMF_HANDLE_T handle, PK11SlotInfo *nss_slot, KMF_DATA *cert,
2296 if (nss_slot == NULL || cert == NULL)
2299 nss_cert = CERT_DecodeCertFromPackage((char *)cert->Data,
2300 cert->Length);
2307 /* Store the cert into the NSS database */
2357 KMF_DATA *cert = NULL;
2369 /* Get the cert data */
2370 cert = kmf_get_attr_ptr(KMF_CERT_DATA_ATTR, attrlist, numattr);
2371 if (cert == NULL || cert->Data == NULL)
2380 ret = store_cert(handle, nss_slot, cert, label, trust_flag);
2396 KMF_DATA cert = {NULL, 0};
2412 /* Get the input cert filename attribute */
2417 /* Check the cert file and auto-detect the file format of it. */
2422 ret = kmf_read_input_file(handle, certfile, &cert);
2428 * If the imported cert is in PEM format, convert it to
2433 ret = kmf_pem_to_der(cert.Data, cert.Length,
2441 cptr = &cert;
2453 kmf_free_data(&cert);
2567 CERTCertificate *cert = NULL;
2600 * nickname, we will get the issuer's cert first, then
2601 * get the CRL from the cert.
2603 cert = CERT_FindCertByNicknameOrEmailAddr(certHandle,
2605 if (!cert) {
2611 crl = SEC_FindCrlByName(certHandle, &cert->derSubject,
2679 /* We found a cert but no CRL */
2710 if (cert != NULL) {
2711 CERT_DestroyCertificate(cert);
2847 CERTCertificate *cert = NULL;
2870 cert = CERT_FindCertByNicknameOrEmailAddr(certHandle,
2884 cert = CERT_FindCertByDERCert(certHandle, &derCert);
2887 if (cert == NULL) {
2894 crl = SEC_FindCrlByName(certHandle, &cert->derIssuer, SEC_CRL_TYPE);
2909 if (SECITEM_CompareItem(&(cert->serialNumber),
2925 if (cert != NULL) {
2926 CERT_DestroyCertificate(cert);