Lines Matching refs:id
62 struct krb5_pk_identity *id;
182 find_cert(krb5_context context, struct krb5_pk_identity *id,
197 if (id->flags & PKINIT_BTMM)
213 ret = hx509_certs_find(context->hx509ctx, id->certs, q, cert);
227 struct krb5_pk_identity *id,
233 if (id->cert == NULL)
242 id->cert,
245 id->certs,
260 ExternalPrincipalIdentifier id;
268 memset(&id, 0, sizeof(id));
276 id.subjectName = calloc(1, sizeof(*id.subjectName));
277 if (id.subjectName == NULL) {
279 free_ExternalPrincipalIdentifier(&id);
283 ret = hx509_name_binary(subject, id.subjectName);
286 free_ExternalPrincipalIdentifier(&id);
293 id.issuerAndSerialNumber = calloc(1, sizeof(*id.issuerAndSerialNumber));
294 if (id.issuerAndSerialNumber == NULL) {
295 free_ExternalPrincipalIdentifier(&id);
308 free_ExternalPrincipalIdentifier(&id);
315 free_ExternalPrincipalIdentifier(&id);
322 free_ExternalPrincipalIdentifier(&id);
327 id.issuerAndSerialNumber->data,
328 id.issuerAndSerialNumber->length,
333 if (id.issuerAndSerialNumber->length != size)
337 id.subjectKeyIdentifier = NULL;
341 free_ExternalPrincipalIdentifier(&id);
346 ids->val[ids->len] = id;
612 ctx->id->cert,
727 ret = create_signature(context, oid, &buf, ctx->id,
773 ctx->id->anchors, req.trustedCertifiers);
824 if (ctx->id->certs == NULL && ctx->anonymous == 0) {
858 if (ctx->id->flags & PKINIT_BTMM)
892 struct krb5_pk_identity *id,
901 if (id->flags & PKINIT_BTMM) {
910 id->verify_ctx,
915 id->certpool,
1182 ctx->id->certs,
1245 ctx->id,
1335 ctx->id,
1769 if (ctx->id->certs)
1770 hx509_certs_free(&ctx->id->certs);
1771 if (ctx->id->cert) {
1772 hx509_cert_free(ctx->id->cert);
1773 ctx->id->cert = NULL;
1776 ctx->id->certs = c;
1790 ctx->id->flags |= PKINIT_BTMM;
1793 ret = find_cert(context, ctx->id, q, &ctx->id->cert);
1801 ret = hx509_cert_get_subject(ctx->id->cert, &name);
1810 ret = hx509_cert_get_serialnumber(ctx->id->cert, &i);
1843 struct krb5_pk_identity *id = NULL;
1857 id = calloc(1, sizeof(*id));
1858 if (id == NULL) {
1888 ret = hx509_certs_init(context->hx509ctx, user_id, 0, lock, &id->certs);
1896 id->certs = NULL;
1899 ret = hx509_certs_init(context->hx509ctx, anchor_id, 0, NULL, &id->anchors);
1907 0, NULL, &id->certpool);
1915 ret = hx509_certs_append(context->hx509ctx, id->certpool,
1927 ret = hx509_revoke_init(context->hx509ctx, &id->revokectx);
1936 id->revokectx,
1948 ret = hx509_verify_init_ctx(context->hx509ctx, &id->verify_ctx);
1955 hx509_verify_attach_anchors(id->verify_ctx, id->anchors);
1956 hx509_verify_attach_revoke(id->verify_ctx, id->revokectx);
1960 hx509_verify_destroy_ctx(id->verify_ctx);
1961 hx509_certs_free(&id->certs);
1962 hx509_certs_free(&id->anchors);
1963 hx509_certs_free(&id->certpool);
1964 hx509_revoke_free(&id->revokectx);
1965 free(id);
1967 *ret_id = id;
2333 if (ctx->id) {
2334 hx509_verify_destroy_ctx(ctx->id->verify_ctx);
2335 hx509_certs_free(&ctx->id->certs);
2336 hx509_cert_free(ctx->id->cert);
2337 hx509_certs_free(&ctx->id->anchors);
2338 hx509_certs_free(&ctx->id->certpool);
2346 free(ctx->id);
2347 ctx->id = NULL;
2413 &opt->opt_private->pk_init_ctx->id,
2427 if (opt->opt_private->pk_init_ctx->id->certs) {
2431 opt->opt_private->pk_init_ctx->id->certs);
2433 opt->opt_private->pk_init_ctx->id->cert = NULL;
2437 hx509_cert cert = opt->opt_private->pk_init_ctx->id->cert;
2458 if (opt->opt_private->pk_init_ctx->id->certs == NULL) {
2566 krb5_set_error_message(context, ENOENT, "no user id");