Lines Matching refs:hcert

456 static void add_logo(struct http_ctx *ctx, struct http_cert *hcert,  in DEFINE_STACK_OF()
470 n = os_realloc_array(hcert->logo, hcert->num_logo + 1, in DEFINE_STACK_OF()
474 hcert->logo = n; in DEFINE_STACK_OF()
475 n = &hcert->logo[hcert->num_logo]; in DEFINE_STACK_OF()
500 hcert->num_logo++; in DEFINE_STACK_OF()
504 static void add_logo_direct(struct http_ctx *ctx, struct http_cert *hcert, in add_logo_direct() argument
555 add_logo(ctx, hcert, found_hash, uri); in add_logo_direct()
561 static void add_logo_indirect(struct http_ctx *ctx, struct http_cert *hcert, in add_logo_indirect() argument
579 add_logo(ctx, hcert, hash, uri); in add_logo_indirect()
777 static void add_logotype_ext(struct http_ctx *ctx, struct http_cert *hcert, in add_logotype_ext() argument
836 add_logo_direct(ctx, hcert, info->d.direct); in add_logotype_ext()
839 add_logo_indirect(ctx, hcert, info->d.indirect); in add_logotype_ext()
848 static void parse_cert(struct http_ctx *ctx, struct http_cert *hcert, in parse_cert() argument
851 os_memset(hcert, 0, sizeof(*hcert)); in parse_cert()
852 hcert->url = ctx->url ? ctx->url : ctx->svc_address; in parse_cert()
856 add_alt_names(ctx, hcert, *names); in parse_cert()
858 add_logotype_ext(ctx, hcert, cert); in parse_cert()
862 static void parse_cert_free(struct http_cert *hcert, GENERAL_NAMES *names) in parse_cert_free() argument
866 for (i = 0; i < hcert->num_dnsname; i++) in parse_cert_free()
867 OPENSSL_free(hcert->dnsname[i]); in parse_cert_free()
868 os_free(hcert->dnsname); in parse_cert_free()
870 for (i = 0; i < hcert->num_othername; i++) in parse_cert_free()
871 os_free(hcert->othername[i].oid); in parse_cert_free()
872 os_free(hcert->othername); in parse_cert_free()
874 for (i = 0; i < hcert->num_logo; i++) { in parse_cert_free()
875 os_free(hcert->logo[i].alg_oid); in parse_cert_free()
876 os_free(hcert->logo[i].hash); in parse_cert_free()
877 os_free(hcert->logo[i].uri); in parse_cert_free()
879 os_free(hcert->logo); in parse_cert_free()
888 struct http_cert hcert; in validate_server_cert() local
903 parse_cert(ctx, &hcert, cert, &names); in validate_server_cert()
904 ret = ctx->cert_cb(ctx->cert_cb_ctx, &hcert); in validate_server_cert()
905 parse_cert_free(&hcert, names); in validate_server_cert()
916 struct http_cert hcert; in http_parse_x509_certificate() local
941 parse_cert(ctx, &hcert, cert, &names); in http_parse_x509_certificate()
942 for (i = 0; i < hcert.num_othername; i++) { in http_parse_x509_certificate()
943 if (os_strcmp(hcert.othername[i].oid, in http_parse_x509_certificate()
945 char *name = os_zalloc(hcert.othername[i].len + 1); in http_parse_x509_certificate()
947 os_memcpy(name, hcert.othername[i].data, in http_parse_x509_certificate()
948 hcert.othername[i].len); in http_parse_x509_certificate()
956 hcert.othername[i].data, in http_parse_x509_certificate()
957 hcert.othername[i].len); in http_parse_x509_certificate()
960 hcert.othername[i].oid); in http_parse_x509_certificate()
962 hcert.othername[i].data, in http_parse_x509_certificate()
963 hcert.othername[i].len); in http_parse_x509_certificate()
966 parse_cert_free(&hcert, names); in http_parse_x509_certificate()