x_x509.c
Go to the documentation of this file.
1 /* crypto/asn1/x_x509.c */
2 /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
3  * All rights reserved.
4  *
5  * This package is an SSL implementation written
6  * by Eric Young (eay@cryptsoft.com).
7  * The implementation was written so as to conform with Netscapes SSL.
8  *
9  * This library is free for commercial and non-commercial use as long as
10  * the following conditions are aheared to. The following conditions
11  * apply to all code found in this distribution, be it the RC4, RSA,
12  * lhash, DES, etc., code; not just the SSL code. The SSL documentation
13  * included with this distribution is covered by the same copyright terms
14  * except that the holder is Tim Hudson (tjh@cryptsoft.com).
15  *
16  * Copyright remains Eric Young's, and as such any Copyright notices in
17  * the code are not to be removed.
18  * If this package is used in a product, Eric Young should be given attribution
19  * as the author of the parts of the library used.
20  * This can be in the form of a textual message at program startup or
21  * in documentation (online or textual) provided with the package.
22  *
23  * Redistribution and use in source and binary forms, with or without
24  * modification, are permitted provided that the following conditions
25  * are met:
26  * 1. Redistributions of source code must retain the copyright
27  * notice, this list of conditions and the following disclaimer.
28  * 2. Redistributions in binary form must reproduce the above copyright
29  * notice, this list of conditions and the following disclaimer in the
30  * documentation and/or other materials provided with the distribution.
31  * 3. All advertising materials mentioning features or use of this software
32  * must display the following acknowledgement:
33  * "This product includes cryptographic software written by
34  * Eric Young (eay@cryptsoft.com)"
35  * The word 'cryptographic' can be left out if the rouines from the library
36  * being used are not cryptographic related :-).
37  * 4. If you include any Windows specific code (or a derivative thereof) from
38  * the apps directory (application code) you must include an acknowledgement:
39  * "This product includes software written by Tim Hudson (tjh@cryptsoft.com)"
40  *
41  * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND
42  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
43  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
44  * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
45  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
46  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
47  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
48  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
49  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
50  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
51  * SUCH DAMAGE.
52  *
53  * The licence and distribution terms for any publically available version or
54  * derivative of this code cannot be changed. i.e. this code cannot simply be
55  * copied and put under another distribution licence
56  * [including the GNU Public Licence.] */
57 
58 #include <assert.h>
59 #include <limits.h>
60 #include <stdio.h>
61 
62 #include <openssl/asn1t.h>
63 #include <openssl/evp.h>
64 #include <openssl/mem.h>
65 #include <openssl/obj.h>
66 #include <openssl/pool.h>
67 #include <openssl/thread.h>
68 #include <openssl/x509.h>
69 #include <openssl/x509v3.h>
70 
71 #include "../internal.h"
72 #include "internal.h"
73 
75 
76 ASN1_SEQUENCE_enc(X509_CINF, enc, 0) = {
78  ASN1_SIMPLE(X509_CINF, serialNumber, ASN1_INTEGER),
79  ASN1_SIMPLE(X509_CINF, signature, X509_ALGOR),
81  ASN1_SIMPLE(X509_CINF, validity, X509_VAL),
82  ASN1_SIMPLE(X509_CINF, subject, X509_NAME),
84  ASN1_IMP_OPT(X509_CINF, issuerUID, ASN1_BIT_STRING, 1),
85  ASN1_IMP_OPT(X509_CINF, subjectUID, ASN1_BIT_STRING, 2),
88 
90 /* X509 top level structure needs a bit of customisation */
91 
92 extern void policy_cache_free(X509_POLICY_CACHE *cache);
93 
94 static int x509_cb(int operation, ASN1_VALUE **pval, const ASN1_ITEM *it,
95  void *exarg)
96 {
97  X509 *ret = (X509 *)*pval;
98 
99  switch (operation) {
100 
101  case ASN1_OP_NEW_POST:
102  ret->ex_flags = 0;
103  ret->ex_pathlen = -1;
104  ret->skid = NULL;
105  ret->akid = NULL;
106  ret->aux = NULL;
107  ret->crldp = NULL;
108  ret->buf = NULL;
109  CRYPTO_new_ex_data(&ret->ex_data);
110  CRYPTO_MUTEX_init(&ret->lock);
111  break;
112 
113  case ASN1_OP_D2I_PRE:
114  CRYPTO_BUFFER_free(ret->buf);
115  ret->buf = NULL;
116  break;
117 
118  case ASN1_OP_D2I_POST: {
119  /* The version must be one of v1(0), v2(1), or v3(2). */
120  long version = 0;
121  if (ret->cert_info->version != NULL) {
122  version = ASN1_INTEGER_get(ret->cert_info->version);
123  /* TODO(https://crbug.com/boringssl/364): |version| = 0 should also
124  * be rejected. This means an explicitly-encoded X.509v1 version.
125  * v1 is DEFAULT, so DER requires it be omitted. */
126  if (version < 0 || version > 2) {
128  return 0;
129  }
130  }
131 
132  /* Per RFC 5280, section 4.1.2.8, these fields require v2 or v3. */
133  if (version == 0 && (ret->cert_info->issuerUID != NULL ||
134  ret->cert_info->subjectUID != NULL)) {
136  return 0;
137  }
138 
139  /* Per RFC 5280, section 4.1.2.9, extensions require v3. */
140  if (version != 2 && ret->cert_info->extensions != NULL) {
142  return 0;
143  }
144 
145  break;
146  }
147 
148  case ASN1_OP_FREE_POST:
149  CRYPTO_MUTEX_cleanup(&ret->lock);
151  X509_CERT_AUX_free(ret->aux);
153  AUTHORITY_KEYID_free(ret->akid);
154  CRL_DIST_POINTS_free(ret->crldp);
155  policy_cache_free(ret->policy_cache);
156  GENERAL_NAMES_free(ret->altname);
158  CRYPTO_BUFFER_free(ret->buf);
159  break;
160 
161  }
162 
163  return 1;
164 
165 }
166 
168  ASN1_SIMPLE(X509, cert_info, X509_CINF),
169  ASN1_SIMPLE(X509, sig_alg, X509_ALGOR),
170  ASN1_SIMPLE(X509, signature, ASN1_BIT_STRING)
172 
174 
176 
178  if (CRYPTO_BUFFER_len(buf) > LONG_MAX) {
180  return 0;
181  }
182 
183  X509 *x509 = X509_new();
184  if (x509 == NULL) {
185  return NULL;
186  }
187 
189 
190  const uint8_t *inp = CRYPTO_BUFFER_data(buf);
191  X509 *x509p = x509;
192  X509 *ret = d2i_X509(&x509p, &inp, CRYPTO_BUFFER_len(buf));
193  if (ret == NULL ||
194  inp - CRYPTO_BUFFER_data(buf) != (ptrdiff_t)CRYPTO_BUFFER_len(buf)) {
195  X509_free(x509p);
196  return NULL;
197  }
198  assert(x509p == x509);
199  assert(ret == x509);
200 
202  ret->buf = buf;
203 
204  return ret;
205 }
206 
207 int X509_up_ref(X509 *x)
208 {
209  CRYPTO_refcount_inc(&x->references);
210  return 1;
211 }
212 
213 int X509_get_ex_new_index(long argl, void *argp, CRYPTO_EX_unused * unused,
214  CRYPTO_EX_dup *dup_unused, CRYPTO_EX_free *free_func)
215 {
216  int index;
218  free_func)) {
219  return -1;
220  }
221  return index;
222 }
223 
224 int X509_set_ex_data(X509 *r, int idx, void *arg)
225 {
226  return (CRYPTO_set_ex_data(&r->ex_data, idx, arg));
227 }
228 
229 void *X509_get_ex_data(X509 *r, int idx)
230 {
231  return (CRYPTO_get_ex_data(&r->ex_data, idx));
232 }
233 
234 /*
235  * X509_AUX ASN1 routines. X509_AUX is the name given to a certificate with
236  * extra info tagged on the end. Since these functions set how a certificate
237  * is trusted they should only be used when the certificate comes from a
238  * reliable source such as local storage.
239  */
240 
241 X509 *d2i_X509_AUX(X509 **a, const unsigned char **pp, long length)
242 {
243  const unsigned char *q = *pp;
244  X509 *ret;
245  int freeret = 0;
246 
247  if (!a || *a == NULL)
248  freeret = 1;
249  ret = d2i_X509(a, &q, length);
250  /* If certificate unreadable then forget it */
251  if (!ret)
252  return NULL;
253  /* update length */
254  length -= q - *pp;
255  /* Parse auxiliary information if there is any. */
256  if (length > 0 && !d2i_X509_CERT_AUX(&ret->aux, &q, length))
257  goto err;
258  *pp = q;
259  return ret;
260  err:
261  if (freeret) {
262  X509_free(ret);
263  if (a)
264  *a = NULL;
265  }
266  return NULL;
267 }
268 
269 /*
270  * Serialize trusted certificate to *pp or just return the required buffer
271  * length if pp == NULL. We ultimately want to avoid modifying *pp in the
272  * error path, but that depends on similar hygiene in lower-level functions.
273  * Here we avoid compounding the problem.
274  */
275 static int i2d_x509_aux_internal(X509 *a, unsigned char **pp)
276 {
277  int length, tmplen;
278  unsigned char *start = pp != NULL ? *pp : NULL;
279 
280  assert(pp == NULL || *pp != NULL);
281 
282  /*
283  * This might perturb *pp on error, but fixing that belongs in i2d_X509()
284  * not here. It should be that if a == NULL length is zero, but we check
285  * both just in case.
286  */
287  length = i2d_X509(a, pp);
288  if (length <= 0 || a == NULL) {
289  return length;
290  }
291 
292  if (a->aux != NULL) {
293  tmplen = i2d_X509_CERT_AUX(a->aux, pp);
294  if (tmplen < 0) {
295  if (start != NULL)
296  *pp = start;
297  return tmplen;
298  }
299  length += tmplen;
300  }
301 
302  return length;
303 }
304 
305 /*
306  * Serialize trusted certificate to *pp, or just return the required buffer
307  * length if pp == NULL.
308  *
309  * When pp is not NULL, but *pp == NULL, we allocate the buffer, but since
310  * we're writing two ASN.1 objects back to back, we can't have i2d_X509() do
311  * the allocation, nor can we allow i2d_X509_CERT_AUX() to increment the
312  * allocated buffer.
313  */
314 int i2d_X509_AUX(X509 *a, unsigned char **pp)
315 {
316  int length;
317  unsigned char *tmp;
318 
319  /* Buffer provided by caller */
320  if (pp == NULL || *pp != NULL)
321  return i2d_x509_aux_internal(a, pp);
322 
323  /* Obtain the combined length */
324  if ((length = i2d_x509_aux_internal(a, NULL)) <= 0)
325  return length;
326 
327  /* Allocate requisite combined storage */
328  *pp = tmp = OPENSSL_malloc(length);
329  if (tmp == NULL)
330  return -1; /* Push error onto error stack? */
331 
332  /* Encode, but keep *pp at the originally malloced pointer */
333  length = i2d_x509_aux_internal(a, &tmp);
334  if (length <= 0) {
335  OPENSSL_free(*pp);
336  *pp = NULL;
337  }
338  return length;
339 }
340 
341 int i2d_re_X509_tbs(X509 *x509, unsigned char **outp)
342 {
343  x509->cert_info->enc.modified = 1;
344  return i2d_X509_CINF(x509->cert_info, outp);
345 }
346 
347 int i2d_X509_tbs(X509 *x509, unsigned char **outp)
348 {
349  return i2d_X509_CINF(x509->cert_info, outp);
350 }
351 
352 int X509_set1_signature_algo(X509 *x509, const X509_ALGOR *algo)
353 {
354  /* TODO(davidben): Const-correct generated ASN.1 dup functions.
355  * Alternatively, when the types are hidden and we can embed required fields
356  * directly in structs, import |X509_ALGOR_copy| from upstream. */
357  X509_ALGOR *copy1 = X509_ALGOR_dup((X509_ALGOR *)algo);
358  X509_ALGOR *copy2 = X509_ALGOR_dup((X509_ALGOR *)algo);
359  if (copy1 == NULL || copy2 == NULL) {
360  X509_ALGOR_free(copy1);
361  X509_ALGOR_free(copy2);
362  return 0;
363  }
364 
365  X509_ALGOR_free(x509->sig_alg);
366  x509->sig_alg = copy1;
368  x509->cert_info->signature = copy2;
369  return 1;
370 }
371 
372 int X509_set1_signature_value(X509 *x509, const uint8_t *sig, size_t sig_len)
373 {
374  if (!ASN1_STRING_set(x509->signature, sig, sig_len)) {
375  return 0;
376  }
377  x509->signature->flags &= ~(ASN1_STRING_FLAG_BITS_LEFT | 0x07);
379  return 1;
380 }
381 
382 void X509_get0_signature(const ASN1_BIT_STRING **psig, const X509_ALGOR **palg,
383  const X509 *x)
384 {
385  if (psig)
386  *psig = x->signature;
387  if (palg)
388  *palg = x->sig_alg;
389 }
390 
391 int X509_get_signature_nid(const X509 *x)
392 {
393  return OBJ_obj2nid(x->sig_alg->algorithm);
394 }
CRYPTO_BUFFER_free
#define CRYPTO_BUFFER_free
Definition: boringssl_prefix_symbols.h:1116
X509_pubkey_st
Definition: third_party/boringssl-with-bazel/src/crypto/x509/internal.h:82
ASN1_EXP_SEQUENCE_OF_OPT
#define ASN1_EXP_SEQUENCE_OF_OPT(stname, field, type, tag)
Definition: asn1t.h:320
test_server.argp
argp
Definition: test_server.py:33
CRYPTO_EX_DATA_CLASS_INIT
#define CRYPTO_EX_DATA_CLASS_INIT
Definition: third_party/boringssl-with-bazel/src/crypto/internal.h:687
regen-readme.it
it
Definition: regen-readme.py:15
X509_ALGOR_free
#define X509_ALGOR_free
Definition: boringssl_prefix_symbols.h:2253
x509_st::cert_info
X509_CINF * cert_info
Definition: third_party/boringssl-with-bazel/src/crypto/x509/internal.h:140
x509_cb
static int x509_cb(int operation, ASN1_VALUE **pval, const ASN1_ITEM *it, void *exarg)
Definition: x_x509.c:94
CRYPTO_EX_dup
int CRYPTO_EX_dup(CRYPTO_EX_DATA *to, const CRYPTO_EX_DATA *from, void **from_d, int index, long argl, void *argp)
Definition: ex_data.h:184
i2d_X509_CINF
#define i2d_X509_CINF
Definition: boringssl_prefix_symbols.h:3280
ASN1_ENCODING_st::alias_only_on_next_parse
unsigned alias_only_on_next_parse
Definition: third_party/boringssl-with-bazel/src/crypto/asn1/internal.h:126
evp.h
regen-readme.inp
inp
Definition: regen-readme.py:11
CRYPTO_EX_DATA_CLASS
Definition: third_party/boringssl-with-bazel/src/crypto/internal.h:679
OPENSSL_PUT_ERROR
#define OPENSSL_PUT_ERROR(library, reason)
Definition: err.h:423
internal.h
ASN1_INTEGER_get
#define ASN1_INTEGER_get
Definition: boringssl_prefix_symbols.h:645
buf
voidpf void * buf
Definition: bloaty/third_party/zlib/contrib/minizip/ioapi.h:136
CRYPTO_BUFFER_len
#define CRYPTO_BUFFER_len
Definition: boringssl_prefix_symbols.h:1118
X509_get_ex_new_index
OPENSSL_EXPORT int X509_get_ex_new_index(long argl, void *argp, CRYPTO_EX_unused *unused, CRYPTO_EX_dup *dup_unused, CRYPTO_EX_free *free_func)
error_ref_leak.err
err
Definition: error_ref_leak.py:35
g_ex_data_class
static CRYPTO_EX_DATA_CLASS g_ex_data_class
Definition: x_x509.c:74
x509v3.h
X509_parse_from_buffer
OPENSSL_EXPORT X509 * X509_parse_from_buffer(CRYPTO_BUFFER *buf)
ASN1_SEQUENCE_ref
#define ASN1_SEQUENCE_ref(tname, cb)
Definition: asn1t.h:151
d2i_X509_CERT_AUX
#define d2i_X509_CERT_AUX
Definition: boringssl_prefix_symbols.h:3036
crypto_buffer_st
Definition: third_party/boringssl-with-bazel/src/crypto/pool/internal.h:31
i2d_X509
#define i2d_X509
Definition: boringssl_prefix_symbols.h:3274
version
Definition: version.py:1
a
int a
Definition: abseil-cpp/absl/container/internal/hash_policy_traits_test.cc:88
X509_set1_signature_algo
OPENSSL_EXPORT int X509_set1_signature_algo(X509 *x509, const X509_ALGOR *algo)
CRYPTO_MUTEX_init
#define CRYPTO_MUTEX_init
Definition: boringssl_prefix_symbols.h:1124
CRYPTO_BUFFER_up_ref
#define CRYPTO_BUFFER_up_ref
Definition: boringssl_prefix_symbols.h:1122
uint8_t
unsigned char uint8_t
Definition: stdint-msvc2008.h:78
X509_extension_st
Definition: third_party/boringssl-with-bazel/src/crypto/x509/internal.h:117
IMPLEMENT_ASN1_FUNCTIONS
#define IMPLEMENT_ASN1_FUNCTIONS(stname)
Definition: asn1t.h:636
ASN1_SEQUENCE_enc
ASN1_SEQUENCE_enc(X509_CINF, enc, 0)
X509_set1_signature_value
OPENSSL_EXPORT int X509_set1_signature_value(X509 *x509, const uint8_t *sig, size_t sig_len)
X509_CINF::enc
ASN1_ENCODING enc
Definition: third_party/boringssl-with-bazel/src/crypto/x509/internal.h:134
X509_free
#define X509_free
Definition: boringssl_prefix_symbols.h:2632
CRYPTO_free_ex_data
#define CRYPTO_free_ex_data
Definition: boringssl_prefix_symbols.h:1151
NAME_CONSTRAINTS_free
#define NAME_CONSTRAINTS_free
Definition: boringssl_prefix_symbols.h:1819
i2d_X509_tbs
OPENSSL_EXPORT int i2d_X509_tbs(X509 *x509, unsigned char **outp)
OPENSSL_malloc
#define OPENSSL_malloc
Definition: boringssl_prefix_symbols.h:1885
asn1_string_st::flags
long flags
Definition: asn1.h:547
ASN1_STRING_set
#define ASN1_STRING_set
Definition: boringssl_prefix_symbols.h:688
start
static uint64_t start
Definition: benchmark-pound.c:74
ASN1_ENCODING_st::modified
int modified
Definition: third_party/boringssl-with-bazel/src/crypto/asn1/internal.h:118
OBJ_obj2nid
#define OBJ_obj2nid
Definition: boringssl_prefix_symbols.h:1857
ASN1_ITEM_st
Definition: asn1t.h:459
ASN1_OP_D2I_PRE
#define ASN1_OP_D2I_PRE
Definition: asn1t.h:599
i2d_X509_AUX
OPENSSL_EXPORT int i2d_X509_AUX(X509 *a, unsigned char **pp)
X509_CERT_AUX_free
#define X509_CERT_AUX_free
Definition: boringssl_prefix_symbols.h:2273
AUTHORITY_KEYID_free
#define AUTHORITY_KEYID_free
Definition: boringssl_prefix_symbols.h:768
ssl_st
Definition: third_party/boringssl-with-bazel/src/ssl/internal.h:3698
ASN1_SEQUENCE_END_enc
#define ASN1_SEQUENCE_END_enc(stname, tname)
Definition: asn1t.h:159
pool.h
X509_up_ref
OPENSSL_EXPORT int X509_up_ref(X509 *x509)
arg
Definition: cmdline.cc:40
CRYPTO_EX_unused
int CRYPTO_EX_unused
Definition: ex_data.h:192
X509_get0_signature
OPENSSL_EXPORT void X509_get0_signature(const ASN1_BIT_STRING **out_sig, const X509_ALGOR **out_alg, const X509 *x509)
CRYPTO_new_ex_data
#define CRYPTO_new_ex_data
Definition: boringssl_prefix_symbols.h:1179
asn1t.h
x509_st::signature
ASN1_BIT_STRING * signature
Definition: third_party/boringssl-with-bazel/src/crypto/x509/internal.h:142
IMPLEMENT_ASN1_DUP_FUNCTION
#define IMPLEMENT_ASN1_DUP_FUNCTION(stname)
Definition: asn1t.h:696
ASN1_STRING_FLAG_BITS_LEFT
#define ASN1_STRING_FLAG_BITS_LEFT
Definition: asn1.h:554
x
int x
Definition: bloaty/third_party/googletest/googlemock/test/gmock-matchers_test.cc:3610
conf.extensions
list extensions
Definition: doc/python/sphinx/conf.py:54
X509_val_st
Definition: third_party/boringssl-with-bazel/src/crypto/x509/internal.h:75
ASN1_IMP_OPT
#define ASN1_IMP_OPT(stname, field, type, tag)
Definition: asn1t.h:274
X509_get_signature_nid
OPENSSL_EXPORT int X509_get_signature_nid(const X509 *x509)
GENERAL_NAMES_free
#define GENERAL_NAMES_free
Definition: boringssl_prefix_symbols.h:1764
ASN1_OP_NEW_POST
#define ASN1_OP_NEW_POST
Definition: asn1t.h:596
CRYPTO_EX_free
void CRYPTO_EX_free(void *parent, void *ptr, CRYPTO_EX_DATA *ad, int index, long argl, void *argp)
Definition: ex_data.h:174
setup.idx
idx
Definition: third_party/bloaty/third_party/capstone/bindings/python/setup.py:197
ERR_R_OVERFLOW
#define ERR_R_OVERFLOW
Definition: err.h:375
X509_new
#define X509_new
Definition: boringssl_prefix_symbols.h:2687
X509_CINF
Definition: third_party/boringssl-with-bazel/src/crypto/x509/internal.h:123
CRYPTO_get_ex_data
#define CRYPTO_get_ex_data
Definition: boringssl_prefix_symbols.h:1164
d2i_X509
#define d2i_X509
Definition: boringssl_prefix_symbols.h:3031
pp
const uint8_t ** pp
Definition: ssl_x509.cc:1020
X509_algor_st
Definition: x509.h:113
CRYPTO_MUTEX_cleanup
#define CRYPTO_MUTEX_cleanup
Definition: boringssl_prefix_symbols.h:1123
CRYPTO_get_ex_new_index
#define CRYPTO_get_ex_new_index
Definition: boringssl_prefix_symbols.h:1165
key
const char * key
Definition: hpack_parser_table.cc:164
x509_st
Definition: third_party/boringssl-with-bazel/src/crypto/x509/internal.h:139
ASN1_EXP_OPT
#define ASN1_EXP_OPT(stname, field, type, tag)
Definition: asn1t.h:279
ASN1_OP_D2I_POST
#define ASN1_OP_D2I_POST
Definition: asn1t.h:600
index
int index
Definition: bloaty/third_party/protobuf/php/ext/google/protobuf/protobuf.h:1184
ret
UniquePtr< SSL_SESSION > ret
Definition: ssl_x509.cc:1029
fix_build_deps.r
r
Definition: fix_build_deps.py:491
i2d_X509_CERT_AUX
#define i2d_X509_CERT_AUX
Definition: boringssl_prefix_symbols.h:3279
policy_cache_free
#define policy_cache_free
Definition: boringssl_prefix_symbols.h:3346
X509_ALGOR_dup
OPENSSL_EXPORT X509_ALGOR * X509_ALGOR_dup(X509_ALGOR *xn)
ASN1_VALUE
struct ASN1_VALUE_st ASN1_VALUE
Definition: asn1.h:320
obj.h
absl::str_format_internal::LengthMod::q
@ q
X509_get_ex_data
OPENSSL_EXPORT void * X509_get_ex_data(X509 *r, int idx)
X509_CINF::signature
X509_ALGOR * signature
Definition: third_party/boringssl-with-bazel/src/crypto/x509/internal.h:126
CRL_DIST_POINTS_free
#define CRL_DIST_POINTS_free
Definition: boringssl_prefix_symbols.h:1109
CRYPTO_refcount_inc
#define CRYPTO_refcount_inc
Definition: boringssl_prefix_symbols.h:1191
mem.h
autogen_x86imm.tmp
tmp
Definition: autogen_x86imm.py:12
ASN1_OP_FREE_POST
#define ASN1_OP_FREE_POST
Definition: asn1t.h:598
CRYPTO_set_ex_data
#define CRYPTO_set_ex_data
Definition: boringssl_prefix_symbols.h:1196
length
std::size_t length
Definition: abseil-cpp/absl/time/internal/test_util.cc:57
X509_POLICY_CACHE_st
Definition: third_party/boringssl-with-bazel/src/crypto/x509v3/internal.h:180
thread.h
ASN1_SEQUENCE_END_ref
#define ASN1_SEQUENCE_END_ref(stname, tname)
Definition: asn1t.h:163
X509_set_ex_data
OPENSSL_EXPORT int X509_set_ex_data(X509 *r, int idx, void *arg)
OPENSSL_free
#define OPENSSL_free
Definition: boringssl_prefix_symbols.h:1869
x509_st::sig_alg
X509_ALGOR * sig_alg
Definition: third_party/boringssl-with-bazel/src/crypto/x509/internal.h:141
X509_name_st
Definition: third_party/boringssl-with-bazel/src/crypto/x509/internal.h:95
X509_R_INVALID_VERSION
#define X509_R_INVALID_VERSION
Definition: x509.h:2417
i2d_re_X509_tbs
OPENSSL_EXPORT int i2d_re_X509_tbs(X509 *x509, unsigned char **outp)
X509_R_INVALID_FIELD_FOR_VERSION
#define X509_R_INVALID_FIELD_FOR_VERSION
Definition: x509.h:2416
asn1_string_st
Definition: asn1.h:543
ASN1_OCTET_STRING_free
OPENSSL_EXPORT void ASN1_OCTET_STRING_free(ASN1_OCTET_STRING *str)
CRYPTO_BUFFER_data
#define CRYPTO_BUFFER_data
Definition: boringssl_prefix_symbols.h:1115
d2i_X509_AUX
OPENSSL_EXPORT X509 * d2i_X509_AUX(X509 **a, const unsigned char **pp, long length)
x509.h
ASN1_SIMPLE
#define ASN1_SIMPLE(stname, field, type)
Definition: asn1t.h:265


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