Home | History | Annotate | Download | only in utils

Lines Matching refs:cert

45 	int (*cert_cb)(void *ctx, struct http_cert *cert);
168 static void debug_dump_cert(const char *title, X509 *cert)
178 X509_print_ex(out, cert, XN_FLAG_COMPAT, X509_FLAG_COMPAT);
193 static void add_alt_name_othername(struct http_ctx *ctx, struct http_cert *cert,
201 on = os_realloc_array(cert->othername, cert->num_othername + 1,
205 cert->othername = on;
206 on = &on[cert->num_othername];
221 cert->num_othername++;
225 static void add_alt_name_dns(struct http_ctx *ctx, struct http_cert *cert,
235 n = os_realloc_array(cert->dnsname, cert->num_dnsname + 1,
240 cert->dnsname = n;
241 n[cert->num_dnsname] = buf;
242 cert->num_dnsname++;
246 static void add_alt_name(struct http_ctx *ctx, struct http_cert *cert,
251 add_alt_name_othername(ctx, cert, name->d.otherName);
254 add_alt_name_dns(ctx, cert, name->d.dNSName);
260 static void add_alt_names(struct http_ctx *ctx, struct http_cert *cert,
269 add_alt_name(ctx, cert, name);
746 X509 *cert)
760 pos = X509_get_ext_by_OBJ(cert, obj, -1);
767 ext = X509_get_ext(cert, pos);
817 X509 *cert, GENERAL_NAMES **names)
821 *names = X509_get_ext_d2i(cert, NID_subject_alt_name, NULL, NULL);
825 add_logotype_ext(ctx, hcert, cert);
852 static int validate_server_cert(struct http_ctx *ctx, X509 *cert)
864 X509_print_ex(out, cert, XN_FLAG_COMPAT, X509_FLAG_COMPAT);
868 parse_cert(ctx, &hcert, cert, &names);
879 X509 *cert;
890 cert = d2i_X509_bio(in, NULL);
893 if (cert == NULL) {
900 X509_print_ex(out, cert, XN_FLAG_COMPAT,
906 parse_cert(ctx, &hcert, cert, &names);
933 X509_free(cert);
940 X509 *cert;
958 cert = X509_STORE_CTX_get_current_cert(x509_ctx);
959 if (!cert) {
966 ctx->peer_cert = cert;
968 ctx->peer_issuer = cert;
970 ctx->peer_issuer_issuer = cert;
972 name = X509_get_subject_name(cert);
976 debug_dump_cert("Server certificate chain - certificate", cert);
978 if (depth == 0 && preverify_ok && validate_server_cert(ctx, cert) < 0)
1091 X509 *cert;
1092 cert = X509_dup(ctx->peer_issuer);
1093 if (cert && !sk_X509_push(certs, cert)) {
1097 X509_free(cert);
1102 X509 *cert;
1103 cert = X509_dup(ctx->peer_issuer_issuer);
1104 if (cert && !sk_X509_push(certs, cert)) {
1108 X509_free(cert);
1630 int (*cb)(void *ctx, struct http_cert *cert),