v3_ncons.c
Go to the documentation of this file.
1 /* v3_ncons.c */
2 /*
3  * Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL
4  * project.
5  */
6 /* ====================================================================
7  * Copyright (c) 2003 The OpenSSL Project. All rights reserved.
8  *
9  * Redistribution and use in source and binary forms, with or without
10  * modification, are permitted provided that the following conditions
11  * are met:
12  *
13  * 1. Redistributions of source code must retain the above copyright
14  * notice, this list of conditions and the following disclaimer.
15  *
16  * 2. Redistributions in binary form must reproduce the above copyright
17  * notice, this list of conditions and the following disclaimer in
18  * the documentation and/or other materials provided with the
19  * distribution.
20  *
21  * 3. All advertising materials mentioning features or use of this
22  * software must display the following acknowledgment:
23  * "This product includes software developed by the OpenSSL Project
24  * for use in the OpenSSL Toolkit. (http://www.OpenSSL.org/)"
25  *
26  * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
27  * endorse or promote products derived from this software without
28  * prior written permission. For written permission, please contact
29  * licensing@OpenSSL.org.
30  *
31  * 5. Products derived from this software may not be called "OpenSSL"
32  * nor may "OpenSSL" appear in their names without prior written
33  * permission of the OpenSSL Project.
34  *
35  * 6. Redistributions of any form whatsoever must retain the following
36  * acknowledgment:
37  * "This product includes software developed by the OpenSSL Project
38  * for use in the OpenSSL Toolkit (http://www.OpenSSL.org/)"
39  *
40  * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
41  * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
42  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
43  * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE OpenSSL PROJECT OR
44  * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
45  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
46  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
47  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
48  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
49  * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
50  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
51  * OF THE POSSIBILITY OF SUCH DAMAGE.
52  * ====================================================================
53  *
54  * This product includes cryptographic software written by Eric Young
55  * (eay@cryptsoft.com). This product includes software written by Tim
56  * Hudson (tjh@cryptsoft.com). */
57 
58 #include <stdio.h>
59 #include <string.h>
60 
61 #include <openssl/asn1t.h>
62 #include <openssl/conf.h>
63 #include <openssl/err.h>
64 #include <openssl/mem.h>
65 #include <openssl/obj.h>
66 #include <openssl/x509v3.h>
67 
68 #include "../internal.h"
69 #include "../x509/internal.h"
70 
71 
73  X509V3_CTX *ctx,
74  STACK_OF(CONF_VALUE) *nval);
75 static int i2r_NAME_CONSTRAINTS(const X509V3_EXT_METHOD *method, void *a,
76  BIO *bp, int ind);
78  STACK_OF(GENERAL_SUBTREE) *trees, BIO *bp,
79  int ind, const char *name);
80 static int print_nc_ipadd(BIO *bp, ASN1_OCTET_STRING *ip);
81 
82 static int nc_match(GENERAL_NAME *gen, NAME_CONSTRAINTS *nc);
83 static int nc_match_single(GENERAL_NAME *sub, GENERAL_NAME *gen);
84 static int nc_dn(X509_NAME *sub, X509_NAME *nm);
85 static int nc_dns(ASN1_IA5STRING *sub, ASN1_IA5STRING *dns);
86 static int nc_email(ASN1_IA5STRING *sub, ASN1_IA5STRING *eml);
87 static int nc_uri(ASN1_IA5STRING *uri, ASN1_IA5STRING *base);
88 
92  0, 0, 0, 0,
93  0, 0,
96  NULL
97 };
98 
104 
106  ASN1_IMP_SEQUENCE_OF_OPT(NAME_CONSTRAINTS, permittedSubtrees,
107  GENERAL_SUBTREE, 0),
108  ASN1_IMP_SEQUENCE_OF_OPT(NAME_CONSTRAINTS, excludedSubtrees,
109  GENERAL_SUBTREE, 1),
111 
112 
115 
116 static void *v2i_NAME_CONSTRAINTS(const X509V3_EXT_METHOD *method,
118 {
119  size_t i;
120  CONF_VALUE tval, *val;
121  STACK_OF(GENERAL_SUBTREE) **ptree = NULL;
122  NAME_CONSTRAINTS *ncons = NULL;
123  GENERAL_SUBTREE *sub = NULL;
124  ncons = NAME_CONSTRAINTS_new();
125  if (!ncons)
126  goto memerr;
127  for (i = 0; i < sk_CONF_VALUE_num(nval); i++) {
128  val = sk_CONF_VALUE_value(nval, i);
129  if (!strncmp(val->name, "permitted", 9) && val->name[9]) {
130  ptree = &ncons->permittedSubtrees;
131  tval.name = val->name + 10;
132  } else if (!strncmp(val->name, "excluded", 8) && val->name[8]) {
133  ptree = &ncons->excludedSubtrees;
134  tval.name = val->name + 9;
135  } else {
137  goto err;
138  }
139  tval.value = val->value;
140  sub = GENERAL_SUBTREE_new();
141  if (!v2i_GENERAL_NAME_ex(sub->base, method, ctx, &tval, 1))
142  goto err;
143  if (!*ptree)
144  *ptree = sk_GENERAL_SUBTREE_new_null();
145  if (!*ptree || !sk_GENERAL_SUBTREE_push(*ptree, sub))
146  goto memerr;
147  sub = NULL;
148  }
149 
150  return ncons;
151 
152  memerr:
154  err:
155  if (ncons)
156  NAME_CONSTRAINTS_free(ncons);
157  if (sub)
159 
160  return NULL;
161 }
162 
163 static int i2r_NAME_CONSTRAINTS(const X509V3_EXT_METHOD *method, void *a,
164  BIO *bp, int ind)
165 {
166  NAME_CONSTRAINTS *ncons = a;
167  do_i2r_name_constraints(method, ncons->permittedSubtrees,
168  bp, ind, "Permitted");
169  do_i2r_name_constraints(method, ncons->excludedSubtrees,
170  bp, ind, "Excluded");
171  return 1;
172 }
173 
175  STACK_OF(GENERAL_SUBTREE) *trees,
176  BIO *bp, int ind, const char *name)
177 {
178  GENERAL_SUBTREE *tree;
179  size_t i;
180  if (sk_GENERAL_SUBTREE_num(trees) > 0)
181  BIO_printf(bp, "%*s%s:\n", ind, "", name);
182  for (i = 0; i < sk_GENERAL_SUBTREE_num(trees); i++) {
183  tree = sk_GENERAL_SUBTREE_value(trees, i);
184  BIO_printf(bp, "%*s", ind + 2, "");
185  if (tree->base->type == GEN_IPADD)
186  print_nc_ipadd(bp, tree->base->d.ip);
187  else
188  GENERAL_NAME_print(bp, tree->base);
189  BIO_puts(bp, "\n");
190  }
191  return 1;
192 }
193 
194 static int print_nc_ipadd(BIO *bp, ASN1_OCTET_STRING *ip)
195 {
196  int i, len;
197  unsigned char *p;
198  p = ip->data;
199  len = ip->length;
200  BIO_puts(bp, "IP:");
201  if (len == 8) {
202  BIO_printf(bp, "%d.%d.%d.%d/%d.%d.%d.%d",
203  p[0], p[1], p[2], p[3], p[4], p[5], p[6], p[7]);
204  } else if (len == 32) {
205  for (i = 0; i < 16; i++) {
206  BIO_printf(bp, "%X", p[0] << 8 | p[1]);
207  p += 2;
208  if (i == 7)
209  BIO_puts(bp, "/");
210  else if (i != 15)
211  BIO_puts(bp, ":");
212  }
213  } else
214  BIO_printf(bp, "IP Address:<invalid>");
215  return 1;
216 }
217 
218 /*-
219  * Check a certificate conforms to a specified set of constraints.
220  * Return values:
221  * X509_V_OK: All constraints obeyed.
222  * X509_V_ERR_PERMITTED_VIOLATION: Permitted subtree violation.
223  * X509_V_ERR_EXCLUDED_VIOLATION: Excluded subtree violation.
224  * X509_V_ERR_SUBTREE_MINMAX: Min or max values present and matching type.
225  * X509_V_ERR_UNSPECIFIED: Unspecified error.
226  * X509_V_ERR_UNSUPPORTED_CONSTRAINT_TYPE: Unsupported constraint type.
227  * X509_V_ERR_UNSUPPORTED_CONSTRAINT_SYNTAX: Bad or unsupported constraint
228  * syntax.
229  * X509_V_ERR_UNSUPPORTED_NAME_SYNTAX: Bad or unsupported syntax of name.
230  */
231 
233 {
234  int r, i;
235  size_t j;
236  X509_NAME *nm;
237 
239 
240  /* Guard against certificates with an excessive number of names or
241  * constraints causing a computationally expensive name constraints
242  * check. */
243  size_t name_count =
244  X509_NAME_entry_count(nm) + sk_GENERAL_NAME_num(x->altname);
245  size_t constraint_count = sk_GENERAL_SUBTREE_num(nc->permittedSubtrees) +
246  sk_GENERAL_SUBTREE_num(nc->excludedSubtrees);
247  size_t check_count = constraint_count * name_count;
248  if (name_count < (size_t)X509_NAME_entry_count(nm) ||
249  constraint_count < sk_GENERAL_SUBTREE_num(nc->permittedSubtrees) ||
250  (constraint_count && check_count / constraint_count != name_count) ||
251  check_count > 1 << 20) {
252  return X509_V_ERR_UNSPECIFIED;
253  }
254 
255  if (X509_NAME_entry_count(nm) > 0) {
256  GENERAL_NAME gntmp;
257  gntmp.type = GEN_DIRNAME;
258  gntmp.d.directoryName = nm;
259 
260  r = nc_match(&gntmp, nc);
261 
262  if (r != X509_V_OK)
263  return r;
264 
265  gntmp.type = GEN_EMAIL;
266 
267  /* Process any email address attributes in subject name */
268 
269  for (i = -1;;) {
270  X509_NAME_ENTRY *ne;
272  if (i == -1)
273  break;
274  ne = X509_NAME_get_entry(nm, i);
276  if (gntmp.d.rfc822Name->type != V_ASN1_IA5STRING)
278 
279  r = nc_match(&gntmp, nc);
280 
281  if (r != X509_V_OK)
282  return r;
283  }
284 
285  }
286 
287  for (j = 0; j < sk_GENERAL_NAME_num(x->altname); j++) {
288  GENERAL_NAME *gen = sk_GENERAL_NAME_value(x->altname, j);
289  r = nc_match(gen, nc);
290  if (r != X509_V_OK)
291  return r;
292  }
293 
294  return X509_V_OK;
295 
296 }
297 
298 static int nc_match(GENERAL_NAME *gen, NAME_CONSTRAINTS *nc)
299 {
300  GENERAL_SUBTREE *sub;
301  int r, match = 0;
302  size_t i;
303 
304  /*
305  * Permitted subtrees: if any subtrees exist of matching the type at
306  * least one subtree must match.
307  */
308 
309  for (i = 0; i < sk_GENERAL_SUBTREE_num(nc->permittedSubtrees); i++) {
310  sub = sk_GENERAL_SUBTREE_value(nc->permittedSubtrees, i);
311  if (gen->type != sub->base->type)
312  continue;
313  if (sub->minimum || sub->maximum)
315  /* If we already have a match don't bother trying any more */
316  if (match == 2)
317  continue;
318  if (match == 0)
319  match = 1;
320  r = nc_match_single(gen, sub->base);
321  if (r == X509_V_OK)
322  match = 2;
323  else if (r != X509_V_ERR_PERMITTED_VIOLATION)
324  return r;
325  }
326 
327  if (match == 1)
329 
330  /* Excluded subtrees: must not match any of these */
331 
332  for (i = 0; i < sk_GENERAL_SUBTREE_num(nc->excludedSubtrees); i++) {
333  sub = sk_GENERAL_SUBTREE_value(nc->excludedSubtrees, i);
334  if (gen->type != sub->base->type)
335  continue;
336  if (sub->minimum || sub->maximum)
338 
339  r = nc_match_single(gen, sub->base);
340  if (r == X509_V_OK)
342  else if (r != X509_V_ERR_PERMITTED_VIOLATION)
343  return r;
344 
345  }
346 
347  return X509_V_OK;
348 
349 }
350 
352 {
353  switch (base->type) {
354  case GEN_DIRNAME:
355  return nc_dn(gen->d.directoryName, base->d.directoryName);
356 
357  case GEN_DNS:
358  return nc_dns(gen->d.dNSName, base->d.dNSName);
359 
360  case GEN_EMAIL:
361  return nc_email(gen->d.rfc822Name, base->d.rfc822Name);
362 
363  case GEN_URI:
365  base->d.uniformResourceIdentifier);
366 
367  default:
369  }
370 
371 }
372 
373 /*
374  * directoryName name constraint matching. The canonical encoding of
375  * X509_NAME makes this comparison easy. It is matched if the subtree is a
376  * subset of the name.
377  */
378 
379 static int nc_dn(X509_NAME *nm, X509_NAME *base)
380 {
381  /* Ensure canonical encodings are up to date. */
382  if (nm->modified && i2d_X509_NAME(nm, NULL) < 0)
383  return X509_V_ERR_OUT_OF_MEM;
384  if (base->modified && i2d_X509_NAME(base, NULL) < 0)
385  return X509_V_ERR_OUT_OF_MEM;
386  if (base->canon_enclen > nm->canon_enclen)
388  if (OPENSSL_memcmp(base->canon_enc, nm->canon_enc, base->canon_enclen))
390  return X509_V_OK;
391 }
392 
393 static int starts_with(const CBS *cbs, uint8_t c)
394 {
395  return CBS_len(cbs) > 0 && CBS_data(cbs)[0] == c;
396 }
397 
398 static int equal_case(const CBS *a, const CBS *b)
399 {
400  if (CBS_len(a) != CBS_len(b)) {
401  return 0;
402  }
403  /* Note we cannot use |OPENSSL_strncasecmp| because that would stop
404  * iterating at NUL. */
405  const uint8_t *a_data = CBS_data(a), *b_data = CBS_data(b);
406  for (size_t i = 0; i < CBS_len(a); i++) {
407  if (OPENSSL_tolower(a_data[i]) != OPENSSL_tolower(b_data[i])) {
408  return 0;
409  }
410  }
411  return 1;
412 }
413 
414 static int has_suffix_case(const CBS *a, const CBS *b)
415 {
416  if (CBS_len(a) < CBS_len(b)) {
417  return 0;
418  }
419  CBS copy = *a;
420  CBS_skip(&copy, CBS_len(a) - CBS_len(b));
421  return equal_case(&copy, b);
422 }
423 
424 static int nc_dns(ASN1_IA5STRING *dns, ASN1_IA5STRING *base)
425 {
426  CBS dns_cbs, base_cbs;
427  CBS_init(&dns_cbs, dns->data, dns->length);
428  CBS_init(&base_cbs, base->data, base->length);
429 
430  /* Empty matches everything */
431  if (CBS_len(&base_cbs) == 0) {
432  return X509_V_OK;
433  }
434 
435  /* If |base_cbs| begins with a '.', do a simple suffix comparison. This is
436  * not part of RFC5280, but is part of OpenSSL's original behavior. */
437  if (starts_with(&base_cbs, '.')) {
438  if (has_suffix_case(&dns_cbs, &base_cbs)) {
439  return X509_V_OK;
440  }
442  }
443 
444  /*
445  * Otherwise can add zero or more components on the left so compare RHS
446  * and if dns is longer and expect '.' as preceding character.
447  */
448  if (CBS_len(&dns_cbs) > CBS_len(&base_cbs)) {
449  uint8_t dot;
450  if (!CBS_skip(&dns_cbs, CBS_len(&dns_cbs) - CBS_len(&base_cbs) - 1) ||
451  !CBS_get_u8(&dns_cbs, &dot) ||
452  dot != '.') {
454  }
455  }
456 
457  if (!equal_case(&dns_cbs, &base_cbs)) {
459  }
460 
461  return X509_V_OK;
462 
463 }
464 
465 static int nc_email(ASN1_IA5STRING *eml, ASN1_IA5STRING *base)
466 {
467  CBS eml_cbs, base_cbs;
468  CBS_init(&eml_cbs, eml->data, eml->length);
469  CBS_init(&base_cbs, base->data, base->length);
470 
471  /* TODO(davidben): In OpenSSL 1.1.1, this switched from the first '@' to the
472  * last one. Match them here, or perhaps do an actual parse. Looks like
473  * multiple '@'s may be allowed in quoted strings. */
474  CBS eml_local, base_local;
475  if (!CBS_get_until_first(&eml_cbs, &eml_local, '@')) {
477  }
478  int base_has_at = CBS_get_until_first(&base_cbs, &base_local, '@');
479 
480  /* Special case: inital '.' is RHS match */
481  if (!base_has_at && starts_with(&base_cbs, '.')) {
482  if (has_suffix_case(&eml_cbs, &base_cbs)) {
483  return X509_V_OK;
484  }
486  }
487 
488  /* If we have anything before '@' match local part */
489  if (base_has_at) {
490  /* TODO(davidben): This interprets a constraint of "@example.com" as
491  * "example.com", which is not part of RFC5280. */
492  if (CBS_len(&base_local) > 0) {
493  /* Case sensitive match of local part */
494  if (!CBS_mem_equal(&base_local, CBS_data(&eml_local),
495  CBS_len(&eml_local))) {
497  }
498  }
499  /* Position base after '@' */
500  assert(starts_with(&base_cbs, '@'));
501  CBS_skip(&base_cbs, 1);
502  }
503 
504  /* Just have hostname left to match: case insensitive */
505  assert(starts_with(&eml_cbs, '@'));
506  CBS_skip(&eml_cbs, 1);
507  if (!equal_case(&base_cbs, &eml_cbs)) {
509  }
510 
511  return X509_V_OK;
512 }
513 
514 static int nc_uri(ASN1_IA5STRING *uri, ASN1_IA5STRING *base)
515 {
516  CBS uri_cbs, base_cbs;
517  CBS_init(&uri_cbs, uri->data, uri->length);
518  CBS_init(&base_cbs, base->data, base->length);
519 
520  /* Check for foo:// and skip past it */
521  CBS scheme;
522  uint8_t byte;
523  if (!CBS_get_until_first(&uri_cbs, &scheme, ':') ||
524  !CBS_skip(&uri_cbs, 1) || // Skip the colon
525  !CBS_get_u8(&uri_cbs, &byte) || byte != '/' ||
526  !CBS_get_u8(&uri_cbs, &byte) || byte != '/') {
528  }
529 
530  /* Look for a port indicator as end of hostname first. Otherwise look for
531  * trailing slash, or the end of the string.
532  * TODO(davidben): This is not a correct URI parser and mishandles IPv6
533  * literals. */
534  CBS host;
535  if (!CBS_get_until_first(&uri_cbs, &host, ':') &&
536  !CBS_get_until_first(&uri_cbs, &host, '/')) {
537  host = uri_cbs;
538  }
539 
540  if (CBS_len(&host) == 0) {
542  }
543 
544  /* Special case: inital '.' is RHS match */
545  if (starts_with(&base_cbs, '.')) {
546  if (has_suffix_case(&host, &base_cbs)) {
547  return X509_V_OK;
548  }
550  }
551 
552  if (!equal_case(&base_cbs, &host)) {
554  }
555 
556  return X509_V_OK;
557 
558 }
NID_pkcs9_emailAddress
#define NID_pkcs9_emailAddress
Definition: nid.h:304
v2i_GENERAL_NAME_ex
#define v2i_GENERAL_NAME_ex
Definition: boringssl_prefix_symbols.h:3399
X509_V_ERR_UNSUPPORTED_CONSTRAINT_TYPE
#define X509_V_ERR_UNSUPPORTED_CONSTRAINT_TYPE
Definition: x509.h:1975
GENERAL_NAME_st::type
int type
Definition: x509v3.h:184
X509_get_subject_name
#define X509_get_subject_name
Definition: boringssl_prefix_symbols.h:2672
GEN_IPADD
#define GEN_IPADD
Definition: x509v3.h:181
absl::str_format_internal::LengthMod::j
@ j
cbs_st
Definition: bytestring.h:39
OPENSSL_memcmp
static int OPENSSL_memcmp(const void *s1, const void *s2, size_t n)
Definition: third_party/boringssl-with-bazel/src/crypto/internal.h:811
GENERAL_NAME_st
Definition: x509v3.h:173
ctx
Definition: benchmark-async.c:30
CBS_skip
#define CBS_skip
Definition: boringssl_prefix_symbols.h:1092
v3_ext_ctx
Definition: x509v3.h:136
bio_st
Definition: bio.h:822
nc_match_single
static int nc_match_single(GENERAL_NAME *sub, GENERAL_NAME *gen)
X509_NAME_entry_count
#define X509_NAME_entry_count
Definition: boringssl_prefix_symbols.h:2380
do_i2r_name_constraints
static int do_i2r_name_constraints(const X509V3_EXT_METHOD *method, STACK_OF(GENERAL_SUBTREE) *trees, BIO *bp, int ind, const char *name)
GENERAL_NAME_st::directoryName
X509_NAME * directoryName
Definition: x509v3.h:191
CBS_data
#define CBS_data
Definition: boringssl_prefix_symbols.h:1057
nc_uri
static int nc_uri(ASN1_IA5STRING *uri, ASN1_IA5STRING *base)
GENERAL_NAME_st::uniformResourceIdentifier
ASN1_IA5STRING * uniformResourceIdentifier
Definition: x509v3.h:193
equal_case
static int equal_case(const unsigned char *pattern, size_t pattern_len, const unsigned char *subject, size_t subject_len, unsigned int flags)
Definition: v3_utl.c:773
v3_name_constraints
const X509V3_EXT_METHOD v3_name_constraints
Definition: v3_ncons.c:89
OPENSSL_PUT_ERROR
#define OPENSSL_PUT_ERROR(library, reason)
Definition: err.h:423
match
unsigned char match[65280+2]
Definition: bloaty/third_party/zlib/examples/gun.c:165
string.h
copy
static int copy(grpc_slice_buffer *input, grpc_slice_buffer *output)
Definition: message_compress.cc:145
ind
Definition: bloaty/third_party/zlib/examples/gun.c:81
CBS_mem_equal
#define CBS_mem_equal
Definition: boringssl_prefix_symbols.h:1090
error_ref_leak.err
err
Definition: error_ref_leak.py:35
x509v3.h
X509_V_ERR_UNSUPPORTED_NAME_SYNTAX
#define X509_V_ERR_UNSUPPORTED_NAME_SYNTAX
Definition: x509.h:1977
CBS_len
#define CBS_len
Definition: boringssl_prefix_symbols.h:1089
X509_V_ERR_SUBTREE_MINMAX
#define X509_V_ERR_SUBTREE_MINMAX
Definition: x509.h:1973
ASN1_ITEM_ref
#define ASN1_ITEM_ref(name)
Definition: asn1.h:312
setup.name
name
Definition: setup.py:542
a
int a
Definition: abseil-cpp/absl/container/internal/hash_policy_traits_test.cc:88
cbs
const CBS * cbs
Definition: third_party/boringssl-with-bazel/src/crypto/trust_token/internal.h:107
xds_manager.p
p
Definition: xds_manager.py:60
X509_V_OK
#define X509_V_OK
Definition: x509.h:1918
CBS_init
#define CBS_init
Definition: boringssl_prefix_symbols.h:1085
uint8_t
unsigned char uint8_t
Definition: stdint-msvc2008.h:78
X509_NAME_get_index_by_NID
#define X509_NAME_get_index_by_NID
Definition: boringssl_prefix_symbols.h:2384
GENERAL_NAME_st::dNSName
ASN1_IA5STRING * dNSName
Definition: x509v3.h:189
asn1_string_st::data
unsigned char * data
Definition: asn1.h:546
BIO_printf
#define BIO_printf
Definition: boringssl_prefix_symbols.h:827
GENERAL_SUBTREE_st::minimum
ASN1_INTEGER * minimum
Definition: x509v3.h:304
NAME_CONSTRAINTS_free
#define NAME_CONSTRAINTS_free
Definition: boringssl_prefix_symbols.h:1819
CBS_get_until_first
#define CBS_get_until_first
Definition: boringssl_prefix_symbols.h:1084
X509_V_ERR_UNSPECIFIED
#define X509_V_ERR_UNSPECIFIED
Definition: x509.h:1919
OPENSSL_tolower
#define OPENSSL_tolower
Definition: boringssl_prefix_symbols.h:1898
GEN_EMAIL
#define GEN_EMAIL
Definition: x509v3.h:175
GEN_DNS
#define GEN_DNS
Definition: x509v3.h:176
c
void c(T a)
Definition: miscompile_with_no_unique_address_test.cc:40
NID_name_constraints
#define NID_name_constraints
Definition: nid.h:2963
conf_value_st::value
char * value
Definition: conf.h:85
STACK_OF
#define STACK_OF(type)
Definition: stack.h:125
asn1_string_st::length
int length
Definition: asn1.h:544
nc_dn
static int nc_dn(X509_NAME *sub, X509_NAME *nm)
X509_NAME_get_entry
#define X509_NAME_get_entry
Definition: boringssl_prefix_symbols.h:2383
X509_V_ERR_PERMITTED_VIOLATION
#define X509_V_ERR_PERMITTED_VIOLATION
Definition: x509.h:1971
nm
X509_NAME * nm
Definition: x509.h:1896
GENERAL_NAME_print
#define GENERAL_NAME_print
Definition: boringssl_prefix_symbols.h:1774
GENERAL_NAME_st::rfc822Name
ASN1_IA5STRING * rfc822Name
Definition: x509v3.h:188
X509_V_ERR_OUT_OF_MEM
#define X509_V_ERR_OUT_OF_MEM
Definition: x509.h:1936
X509_name_st::canon_enc
unsigned char * canon_enc
Definition: third_party/boringssl-with-bazel/src/crypto/x509/internal.h:100
CBS_get_u8
#define CBS_get_u8
Definition: boringssl_prefix_symbols.h:1082
X509_NAME_ENTRY_get_data
#define X509_NAME_ENTRY_get_data
Definition: boringssl_prefix_symbols.h:2364
X509_name_st::canon_enclen
int canon_enclen
Definition: third_party/boringssl-with-bazel/src/crypto/x509/internal.h:101
err.h
ASN1_SEQUENCE
#define ASN1_SEQUENCE(tname)
Definition: asn1t.h:130
asn1t.h
x
int x
Definition: bloaty/third_party/googletest/googlemock/test/gmock-matchers_test.cc:3610
gen_synthetic_protos.base
base
Definition: gen_synthetic_protos.py:31
gen
OPENSSL_EXPORT GENERAL_NAME * gen
Definition: x509v3.h:495
conf.h
GENERAL_SUBTREE_st::base
GENERAL_NAME * base
Definition: x509v3.h:303
b
uint64_t b
Definition: abseil-cpp/absl/container/internal/layout_test.cc:53
ASN1_IMP_OPT
#define ASN1_IMP_OPT(stname, field, type, tag)
Definition: asn1t.h:274
NAME_CONSTRAINTS_check
OPENSSL_EXPORT int NAME_CONSTRAINTS_check(X509 *x, NAME_CONSTRAINTS *nc)
GENERAL_SUBTREE_free
#define GENERAL_SUBTREE_free
Definition: boringssl_prefix_symbols.h:1777
NAME_CONSTRAINTS_st
Definition: x509v3.h:310
V_ASN1_IA5STRING
#define V_ASN1_IA5STRING
Definition: asn1.h:143
X509_name_entry_st
Definition: third_party/boringssl-with-bazel/src/crypto/x509/internal.h:88
i2d_X509_NAME
#define i2d_X509_NAME
Definition: boringssl_prefix_symbols.h:3288
GENERAL_SUBTREE_st
Definition: x509v3.h:302
GENERAL_NAME_st::ip
ASN1_OCTET_STRING * ip
Definition: x509v3.h:198
ASN1_SEQUENCE_END
ASN1_SEQUENCE_END(X509_NAME_ENTRY)
Definition: x_name.c:103
v2i_NAME_CONSTRAINTS
static void * v2i_NAME_CONSTRAINTS(const X509V3_EXT_METHOD *method, X509V3_CTX *ctx, STACK_OF(CONF_VALUE) *nval)
ares::byte
unsigned char byte
Definition: ares-test.h:33
ASN1_IMP_SEQUENCE_OF_OPT
#define ASN1_IMP_SEQUENCE_OF_OPT(stname, field, type, tag)
Definition: asn1t.h:314
X509V3_R_INVALID_SYNTAX
#define X509V3_R_INVALID_SYNTAX
Definition: x509v3.h:989
nc_email
static int nc_email(ASN1_IA5STRING *sub, ASN1_IA5STRING *eml)
x509_st
Definition: third_party/boringssl-with-bazel/src/crypto/x509/internal.h:139
GENERAL_NAME_st::d
union GENERAL_NAME_st::@370 d
i2r_NAME_CONSTRAINTS
static int i2r_NAME_CONSTRAINTS(const X509V3_EXT_METHOD *method, void *a, BIO *bp, int ind)
fix_build_deps.r
r
Definition: fix_build_deps.py:491
nc_dns
static int nc_dns(ASN1_IA5STRING *sub, ASN1_IA5STRING *dns)
starts_with
static bool starts_with(const char *s, const char *prefix)
Definition: demumble.cc:37
BIO_puts
#define BIO_puts
Definition: boringssl_prefix_symbols.h:830
IMPLEMENT_ASN1_ALLOC_FUNCTIONS
#define IMPLEMENT_ASN1_ALLOC_FUNCTIONS(stname)
Definition: asn1t.h:646
X509_V_ERR_EXCLUDED_VIOLATION
#define X509_V_ERR_EXCLUDED_VIOLATION
Definition: x509.h:1972
GEN_URI
#define GEN_URI
Definition: x509v3.h:180
asn1_string_st::type
int type
Definition: asn1.h:545
obj.h
NAME_CONSTRAINTS_new
#define NAME_CONSTRAINTS_new
Definition: boringssl_prefix_symbols.h:1821
v3_ext_method
Definition: x509v3.h:102
GENERAL_SUBTREE_new
#define GENERAL_SUBTREE_new
Definition: boringssl_prefix_symbols.h:1779
print_nc_ipadd
static int print_nc_ipadd(BIO *bp, ASN1_OCTET_STRING *ip)
mem.h
len
int len
Definition: abseil-cpp/absl/base/internal/low_level_alloc_test.cc:46
nc_match
static int nc_match(GENERAL_NAME *gen, NAME_CONSTRAINTS *nc)
method
NSString * method
Definition: ProtoMethod.h:28
GENERAL_SUBTREE_st::maximum
ASN1_INTEGER * maximum
Definition: x509v3.h:305
GEN_DIRNAME
#define GEN_DIRNAME
Definition: x509v3.h:178
X509_name_st
Definition: third_party/boringssl-with-bazel/src/crypto/x509/internal.h:95
X509_name_st::modified
int modified
Definition: third_party/boringssl-with-bazel/src/crypto/x509/internal.h:97
asn1_string_st
Definition: asn1.h:543
i
uint64_t i
Definition: abseil-cpp/absl/container/btree_benchmark.cc:230
ERR_R_MALLOC_FAILURE
#define ERR_R_MALLOC_FAILURE
Definition: err.h:371
conf_value_st
Definition: conf.h:82
conf_value_st::name
char * name
Definition: conf.h:84
ASN1_SIMPLE
#define ASN1_SIMPLE(stname, field, type)
Definition: asn1t.h:265


grpc
Author(s):
autogenerated on Fri May 16 2025 03:00:50