Lines Matching refs:hcert

436 static void add_logo(struct http_ctx *ctx, struct http_cert *hcert,
450 n = os_realloc_array(hcert->logo, hcert->num_logo + 1,
454 hcert->logo = n;
455 n = &hcert->logo[hcert->num_logo];
480 hcert->num_logo++;
484 static void add_logo_direct(struct http_ctx *ctx, struct http_cert *hcert,
535 add_logo(ctx, hcert, found_hash, uri);
541 static void add_logo_indirect(struct http_ctx *ctx, struct http_cert *hcert,
559 add_logo(ctx, hcert, hash, uri);
745 static void add_logotype_ext(struct http_ctx *ctx, struct http_cert *hcert,
804 add_logo_direct(ctx, hcert, info->d.direct);
807 add_logo_indirect(ctx, hcert, info->d.indirect);
816 static void parse_cert(struct http_ctx *ctx, struct http_cert *hcert,
819 os_memset(hcert, 0, sizeof(*hcert));
823 add_alt_names(ctx, hcert, *names);
825 add_logotype_ext(ctx, hcert, cert);
829 static void parse_cert_free(struct http_cert *hcert, GENERAL_NAMES *names)
833 for (i = 0; i < hcert->num_dnsname; i++)
834 OPENSSL_free(hcert->dnsname[i]);
835 os_free(hcert->dnsname);
837 for (i = 0; i < hcert->num_othername; i++)
838 os_free(hcert->othername[i].oid);
839 os_free(hcert->othername);
841 for (i = 0; i < hcert->num_logo; i++) {
842 os_free(hcert->logo[i].alg_oid);
843 os_free(hcert->logo[i].hash);
844 os_free(hcert->logo[i].uri);
846 os_free(hcert->logo);
855 struct http_cert hcert;
868 parse_cert(ctx, &hcert, cert, &names);
869 ret = ctx->cert_cb(ctx->cert_cb_ctx, &hcert);
870 parse_cert_free(&hcert, names);
881 struct http_cert hcert;
906 parse_cert(ctx, &hcert, cert, &names);
907 for (i = 0; i < hcert.num_othername; i++) {
908 if (os_strcmp(hcert.othername[i].oid,
910 char *name = os_zalloc(hcert.othername[i].len + 1);
912 os_memcpy(name, hcert.othername[i].data,
913 hcert.othername[i].len);
921 hcert.othername[i].data,
922 hcert.othername[i].len);
925 hcert.othername[i].oid);
927 hcert.othername[i].data,
928 hcert.othername[i].len);
931 parse_cert_free(&hcert, names);