Lines Matching defs:tbscert
167 free_tbscert(KMF_X509_TBS_CERT *tbscert)
169 if (tbscert) {
170 free_data(&tbscert->version);
171 free_bigint(&tbscert->serialNumber);
172 free_algoid(&tbscert->signature);
174 free_rdn_data(&tbscert->issuer);
175 free_rdn_data(&tbscert->subject);
177 free_validity(&tbscert->validity);
179 free_data(&tbscert->issuerUniqueIdentifier);
180 free_data(&tbscert->subjectUniqueIdentifier);
181 free_decoded_spki(&tbscert->subjectPublicKeyInfo);
182 free_extensions(&tbscert->extensions);
184 free_data(&tbscert->issuerUniqueIdentifier);
185 free_data(&tbscert->subjectUniqueIdentifier);
1272 KMF_X509_TBS_CERT *tbscert = NULL;
1301 tbscert = malloc(sizeof (KMF_X509_TBS_CERT));
1302 if (!tbscert) {
1307 (void) memset(tbscert, 0, sizeof (KMF_X509_TBS_CERT));
1309 if ((ret = set_der_integer(&tbscert->version, version)) != KMF_OK)
1312 if ((ret = set_bigint(&tbscert->serialNumber, &serno)) != KMF_OK)
1315 if ((ret = get_algoid(asn1, &tbscert->signature)) != KMF_OK)
1318 if ((ret = get_rdn(asn1, &tbscert->issuer)) != KMF_OK)
1321 if ((ret = get_validity(asn1, &tbscert->validity)) != KMF_OK)
1324 if ((ret = get_rdn(asn1, &tbscert->subject)) != KMF_OK)
1327 if ((ret = get_spki(asn1, &tbscert->subjectPublicKeyInfo)) != KMF_OK)
1331 tbscert->extensions.numberOfExtensions = 0;
1332 tbscert->extensions.extensions = NULL;
1348 tbscert->issuerUniqueIdentifier.Data =
1350 tbscert->issuerUniqueIdentifier.Length =
1359 tbscert->subjectUniqueIdentifier.Data =
1361 tbscert->subjectUniqueIdentifier.Length =
1365 ret = get_extensions(asn1, &tbscert->extensions);
1370 *signed_cert_ptr_ptr = tbscert;
1378 if (tbscert) {
1379 free_tbscert(tbscert);
1380 free(tbscert);
1389 KMF_X509_TBS_CERT **tbscert)
1396 if (!tbscert || !Value || !Value->Data || !Value->Length)
1409 *tbscert = newcert;
1415 *tbscert = NULL;
1444 KMF_X509_TBS_CERT *tbscert = NULL;
1469 ret = decode_tbscert_data(asn1, &tbscert);
1473 certptr->certificate = *tbscert;
1474 free(tbscert);
1475 tbscert = NULL;
1614 encode_tbs_cert(BerElement *asn1, KMF_X509_TBS_CERT *tbscert)
1620 if (tbscert->version.Length > sizeof (int))
1623 (void) memcpy(&version, tbscert->version.Data,
1624 tbscert->version.Length);
1633 (char *)tbscert->serialNumber.val,
1634 (size_t)tbscert->serialNumber.len) == -1) {
1640 if ((ret = encode_algoid(asn1, &tbscert->signature, FALSE)) != KMF_OK)
1644 if ((ret = encode_rdn(asn1, &tbscert->issuer)) != KMF_OK)
1648 if ((ret = encode_validity(asn1, &tbscert->validity)) != KMF_OK)
1652 if ((ret = encode_rdn(asn1, &tbscert->subject)) != KMF_OK)
1656 if ((ret = encode_spki(asn1, &tbscert->subjectPublicKeyInfo)) != KMF_OK)
1660 if (tbscert->issuerUniqueIdentifier.Length > 0) {
1662 &tbscert->issuerUniqueIdentifier)) != KMF_OK)
1667 if (tbscert->subjectUniqueIdentifier.Length > 0) {
1669 &tbscert->subjectUniqueIdentifier)) != KMF_OK)
1674 if (tbscert->extensions.numberOfExtensions > 0) {
1676 &tbscert->extensions)) != KMF_OK)
1740 KMF_X509_TBS_CERT *tbscert = NULL;
1751 tbscert = &signed_cert_ptr->certificate;
1764 if ((ret = encode_tbs_cert(asn1, tbscert)) != KMF_OK) {
1809 ExtractX509CertParts(KMF_DATA *x509cert, KMF_DATA *tbscert,
1818 if (tbscert == NULL || x509cert == NULL)
1845 tbscert->Data = malloc(size);
1846 if (tbscert->Data == NULL) {
1850 tbscert->Length = size;
1853 size = kmfber_read(der, (char *)tbscert->Data, tbscert->Length);
1854 if (size != tbscert->Length) {
1884 free_data(tbscert);