Lines Matching refs:hcert

462 static void add_logo(struct http_ctx *ctx, struct http_cert *hcert,  in add_logo()  argument
476 n = os_realloc_array(hcert->logo, hcert->num_logo + 1, in add_logo()
480 hcert->logo = n; in add_logo()
481 n = &hcert->logo[hcert->num_logo]; in add_logo()
506 hcert->num_logo++; in add_logo()
510 static void add_logo_direct(struct http_ctx *ctx, struct http_cert *hcert, in add_logo_direct() argument
561 add_logo(ctx, hcert, found_hash, uri); in add_logo_direct()
567 static void add_logo_indirect(struct http_ctx *ctx, struct http_cert *hcert, in add_logo_indirect() argument
585 add_logo(ctx, hcert, hash, uri); in add_logo_indirect()
783 static void add_logotype_ext(struct http_ctx *ctx, struct http_cert *hcert, in add_logotype_ext() argument
842 add_logo_direct(ctx, hcert, info->d.direct); in add_logotype_ext()
845 add_logo_indirect(ctx, hcert, info->d.indirect); in add_logotype_ext()
854 static void parse_cert(struct http_ctx *ctx, struct http_cert *hcert, in parse_cert() argument
857 os_memset(hcert, 0, sizeof(*hcert)); in parse_cert()
861 add_alt_names(ctx, hcert, *names); in parse_cert()
865 add_logotype_ext(ctx, hcert, cert); in parse_cert()
869 static void parse_cert_free(struct http_cert *hcert, GENERAL_NAMES *names) in parse_cert_free() argument
873 for (i = 0; i < hcert->num_dnsname; i++) in parse_cert_free()
874 OPENSSL_free(hcert->dnsname[i]); in parse_cert_free()
875 os_free(hcert->dnsname); in parse_cert_free()
877 for (i = 0; i < hcert->num_othername; i++) in parse_cert_free()
878 os_free(hcert->othername[i].oid); in parse_cert_free()
879 os_free(hcert->othername); in parse_cert_free()
881 for (i = 0; i < hcert->num_logo; i++) { in parse_cert_free()
882 os_free(hcert->logo[i].alg_oid); in parse_cert_free()
883 os_free(hcert->logo[i].hash); in parse_cert_free()
884 os_free(hcert->logo[i].uri); in parse_cert_free()
886 os_free(hcert->logo); in parse_cert_free()
895 struct http_cert hcert; in validate_server_cert() local
910 parse_cert(ctx, &hcert, cert, &names); in validate_server_cert()
911 ret = ctx->cert_cb(ctx->cert_cb_ctx, &hcert); in validate_server_cert()
912 parse_cert_free(&hcert, names); in validate_server_cert()
923 struct http_cert hcert; in http_parse_x509_certificate() local
948 parse_cert(ctx, &hcert, cert, &names); in http_parse_x509_certificate()
949 for (i = 0; i < hcert.num_othername; i++) { in http_parse_x509_certificate()
950 if (os_strcmp(hcert.othername[i].oid, in http_parse_x509_certificate()
952 char *name = os_zalloc(hcert.othername[i].len + 1); in http_parse_x509_certificate()
954 os_memcpy(name, hcert.othername[i].data, in http_parse_x509_certificate()
955 hcert.othername[i].len); in http_parse_x509_certificate()
963 hcert.othername[i].data, in http_parse_x509_certificate()
964 hcert.othername[i].len); in http_parse_x509_certificate()
967 hcert.othername[i].oid); in http_parse_x509_certificate()
969 hcert.othername[i].data, in http_parse_x509_certificate()
970 hcert.othername[i].len); in http_parse_x509_certificate()
973 parse_cert_free(&hcert, names); in http_parse_x509_certificate()