Lines Matching defs:xcert

461 check_cert(X509 *xcert, char *issuer, char *subject, KMF_BIGINT *serial,
472 if (xcert == NULL) {
486 rv = get_x509_dn(xcert->cert_info->issuer, &certIssuerDN);
501 rv = get_x509_dn(xcert->cert_info->subject, &certSubjectDN);
515 bn = ASN1_INTEGER_to_BN(xcert->cert_info->serialNumber, NULL);
583 X509 *xcert = NULL;
607 xcert = PEM_read_bio_X509_AUX(bcert, NULL, NULL, NULL);
609 xcert = d2i_X509_bio(bcert, NULL);
613 (void) PKCS12_parse(p12, NULL, NULL, &xcert, NULL);
625 if (xcert == NULL) {
631 if (check_cert(xcert, issuer, subject, serial, &match) != KMF_OK ||
638 *outcert = xcert;
643 if (rv != KMF_OK && xcert != NULL)
644 X509_free(xcert);
2023 X509 *xcert = NULL;
2046 xcert = d2i_X509(NULL, (const uchar_t **)&outbuf_p, pcert->Length);
2047 if (xcert == NULL) {
2062 (void) X509_NAME_print_ex(mem, X509_get_issuer_name(xcert), 0,
2068 (void) X509_NAME_print_ex(mem, X509_get_subject_name(xcert), 0,
2074 tmpstr = i2s_ASN1_INTEGER(NULL, xcert->cert_info->version);
2081 if (i2a_ASN1_INTEGER(mem, X509_get_serialNumber(xcert)) > 0) {
2089 (void) ASN1_TIME_print(mem, X509_get_notBefore(xcert));
2094 (void) ASN1_TIME_print(mem, X509_get_notAfter(xcert));
2100 EVP_PKEY *pkey = X509_get_pubkey(xcert);
2129 xcert->sig_alg->algorithm);
2132 xcert->cert_info->key->algor->algorithm);
2142 emlst = X509_get1_email(xcert);
2169 ci = xcert->cert_info;
2209 if (xcert != NULL) {
2210 X509_free(xcert);
3011 add_alias_to_bag(PKCS12_SAFEBAG *bag, X509 *xcert)
3013 if (xcert != NULL && xcert->aux != NULL &&
3014 xcert->aux->alias != NULL) {
3016 (const char *)xcert->aux->alias->data,
3017 xcert->aux->alias->length) == 0)
3283 find_matching_key(X509 *xcert, int numkeys, KMF_KEY_HANDLE *keylist)
3288 if (numkeys == 0 || keylist == NULL || xcert == NULL)
3296 if (X509_check_private_key(xcert, pkey)) {
3345 X509 *xcert = NULL;
3350 xcert = d2i_X509(NULL, &p, len);
3351 if (xcert == NULL) {
3357 (void) X509_alias_set1(xcert,
3362 pkey = find_matching_key(xcert, numkeys, keylist);
3369 (void) X509_digest(xcert, EVP_sha1(),
3378 X509_free(xcert);
3385 X509_free(xcert);
3392 cert_authsafe = add_cert_to_safe(xcert, cred, keyid,
3395 X509_free(xcert);
3400 X509_free(xcert);
3405 X509_free(xcert);
3791 X509 *xcert = NULL;
3824 xcert = M_PKCS12_certbag2x509(bag);
3825 if (xcert == NULL) {
3830 if (X509_keyid_set1(xcert,
3842 r = X509_alias_set1(xcert, data, len);
3852 if (sk_X509_push(certlist, xcert) == 0)
3855 xcert = NULL;
3904 if (xcert != NULL)
3905 X509_free(xcert);
4980 X509 *xcert = NULL;
5061 xcert = d2i_X509_bio(in, NULL);
5063 xcert = PEM_read_bio_X509(in, NULL, NULL, NULL);
5069 if (xcert == NULL) {
5075 pkey = X509_get_pubkey(xcert);
5127 if (xcert != NULL)
5128 X509_free(xcert);
5311 X509 *xcert = NULL;
5382 xcert = d2i_X509_bio(in, NULL);
5384 xcert = PEM_read_bio_X509(in, NULL, NULL, NULL);
5387 if (xcert == NULL) {
5394 if (X509_NAME_cmp(xcert->cert_info->issuer, xcrl->crl->issuer) != 0) {
5411 if (ASN1_INTEGER_cmp(xcert->cert_info->serialNumber,
5428 if (xcert != NULL)
5429 X509_free(xcert);
5441 X509 *xcert = NULL;
5480 xcert = d2i_X509(NULL, (const uchar_t **)&p, len);
5482 if (xcert == NULL) {
5489 pkey = X509_get_pubkey(xcert);
5513 if (xcert != NULL)
5514 X509_free(xcert);