ssl_file.cc
Go to the documentation of this file.
1 /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
2  * All rights reserved.
3  *
4  * This package is an SSL implementation written
5  * by Eric Young (eay@cryptsoft.com).
6  * The implementation was written so as to conform with Netscapes SSL.
7  *
8  * This library is free for commercial and non-commercial use as long as
9  * the following conditions are aheared to. The following conditions
10  * apply to all code found in this distribution, be it the RC4, RSA,
11  * lhash, DES, etc., code; not just the SSL code. The SSL documentation
12  * included with this distribution is covered by the same copyright terms
13  * except that the holder is Tim Hudson (tjh@cryptsoft.com).
14  *
15  * Copyright remains Eric Young's, and as such any Copyright notices in
16  * the code are not to be removed.
17  * If this package is used in a product, Eric Young should be given attribution
18  * as the author of the parts of the library used.
19  * This can be in the form of a textual message at program startup or
20  * in documentation (online or textual) provided with the package.
21  *
22  * Redistribution and use in source and binary forms, with or without
23  * modification, are permitted provided that the following conditions
24  * are met:
25  * 1. Redistributions of source code must retain the copyright
26  * notice, this list of conditions and the following disclaimer.
27  * 2. Redistributions in binary form must reproduce the above copyright
28  * notice, this list of conditions and the following disclaimer in the
29  * documentation and/or other materials provided with the distribution.
30  * 3. All advertising materials mentioning features or use of this software
31  * must display the following acknowledgement:
32  * "This product includes cryptographic software written by
33  * Eric Young (eay@cryptsoft.com)"
34  * The word 'cryptographic' can be left out if the rouines from the library
35  * being used are not cryptographic related :-).
36  * 4. If you include any Windows specific code (or a derivative thereof) from
37  * the apps directory (application code) you must include an acknowledgement:
38  * "This product includes software written by Tim Hudson (tjh@cryptsoft.com)"
39  *
40  * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND
41  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
42  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
43  * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
44  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
45  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
46  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
47  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
48  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
49  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
50  * SUCH DAMAGE.
51  *
52  * The licence and distribution terms for any publically available version or
53  * derivative of this code cannot be changed. i.e. this code cannot simply be
54  * copied and put under another distribution licence
55  * [including the GNU Public Licence.]
56  */
57 /* ====================================================================
58  * Copyright (c) 1998-2007 The OpenSSL Project. All rights reserved.
59  *
60  * Redistribution and use in source and binary forms, with or without
61  * modification, are permitted provided that the following conditions
62  * are met:
63  *
64  * 1. Redistributions of source code must retain the above copyright
65  * notice, this list of conditions and the following disclaimer.
66  *
67  * 2. Redistributions in binary form must reproduce the above copyright
68  * notice, this list of conditions and the following disclaimer in
69  * the documentation and/or other materials provided with the
70  * distribution.
71  *
72  * 3. All advertising materials mentioning features or use of this
73  * software must display the following acknowledgment:
74  * "This product includes software developed by the OpenSSL Project
75  * for use in the OpenSSL Toolkit. (http://www.openssl.org/)"
76  *
77  * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
78  * endorse or promote products derived from this software without
79  * prior written permission. For written permission, please contact
80  * openssl-core@openssl.org.
81  *
82  * 5. Products derived from this software may not be called "OpenSSL"
83  * nor may "OpenSSL" appear in their names without prior written
84  * permission of the OpenSSL Project.
85  *
86  * 6. Redistributions of any form whatsoever must retain the following
87  * acknowledgment:
88  * "This product includes software developed by the OpenSSL Project
89  * for use in the OpenSSL Toolkit (http://www.openssl.org/)"
90  *
91  * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
92  * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
93  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
94  * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE OpenSSL PROJECT OR
95  * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
96  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
97  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
98  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
99  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
100  * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
101  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
102  * OF THE POSSIBILITY OF SUCH DAMAGE.
103  * ====================================================================
104  *
105  * This product includes cryptographic software written by Eric Young
106  * (eay@cryptsoft.com). This product includes software written by Tim
107  * Hudson (tjh@cryptsoft.com).
108  *
109  */
110 
111 #include <openssl/ssl.h>
112 
113 #include <errno.h>
114 #include <string.h>
115 
116 #include <openssl/asn1.h>
117 #include <openssl/bio.h>
118 #include <openssl/err.h>
119 #include <openssl/mem.h>
120 #include <openssl/pem.h>
121 #include <openssl/stack.h>
122 #include <openssl/x509.h>
123 
124 #include "internal.h"
125 
126 
127 static int xname_cmp(const X509_NAME **a, const X509_NAME **b) {
128  return X509_NAME_cmp(*a, *b);
129 }
130 
131 // TODO(davidben): Is there any reason this doesn't call
132 // |SSL_add_file_cert_subjects_to_stack|?
134  BIO *in;
135  X509 *x = NULL;
136  X509_NAME *xn = NULL;
137  STACK_OF(X509_NAME) *ret = NULL, *sk;
138 
140  in = BIO_new(BIO_s_file());
141 
142  if (sk == NULL || in == NULL) {
144  goto err;
145  }
146 
147  if (!BIO_read_filename(in, file)) {
148  goto err;
149  }
150 
151  for (;;) {
152  if (PEM_read_bio_X509(in, &x, NULL, NULL) == NULL) {
153  break;
154  }
155  if (ret == NULL) {
157  if (ret == NULL) {
159  goto err;
160  }
161  }
162  xn = X509_get_subject_name(x);
163  if (xn == NULL) {
164  goto err;
165  }
166 
167  // Check for duplicates.
168  sk_X509_NAME_sort(sk);
169  if (sk_X509_NAME_find(sk, NULL, xn)) {
170  continue;
171  }
172 
173  xn = X509_NAME_dup(xn);
174  if (xn == NULL ||
175  !sk_X509_NAME_push(sk /* non-owning */, xn) ||
176  !sk_X509_NAME_push(ret /* owning */, xn)) {
177  X509_NAME_free(xn);
178  goto err;
179  }
180  }
181 
182  if (0) {
183  err:
185  ret = NULL;
186  }
187 
188  sk_X509_NAME_free(sk);
189  BIO_free(in);
190  X509_free(x);
191  if (ret != NULL) {
192  ERR_clear_error();
193  }
194  return ret;
195 }
196 
198  const char *file) {
199  BIO *in;
200  X509 *x = NULL;
201  X509_NAME *xn = NULL;
202  int ret = 0;
203  int (*oldcmp)(const X509_NAME **a, const X509_NAME **b);
204 
206  in = BIO_new(BIO_s_file());
207 
208  if (in == NULL) {
210  goto err;
211  }
212 
213  if (!BIO_read_filename(in, file)) {
214  goto err;
215  }
216 
217  for (;;) {
218  if (PEM_read_bio_X509(in, &x, NULL, NULL) == NULL) {
219  break;
220  }
221  xn = X509_get_subject_name(x);
222  if (xn == NULL) {
223  goto err;
224  }
225 
226  // Check for duplicates.
228  if (sk_X509_NAME_find(stack, NULL, xn)) {
229  continue;
230  }
231 
232  xn = X509_NAME_dup(xn);
233  if (xn == NULL ||
234  !sk_X509_NAME_push(stack, xn)) {
235  X509_NAME_free(xn);
236  goto err;
237  }
238  }
239 
240  ERR_clear_error();
241  ret = 1;
242 
243 err:
244  BIO_free(in);
245  X509_free(x);
246 
247  (void) sk_X509_NAME_set_cmp_func(stack, oldcmp);
248 
249  return ret;
250 }
251 
252 int SSL_use_certificate_file(SSL *ssl, const char *file, int type) {
253  int reason_code;
254  BIO *in;
255  int ret = 0;
256  X509 *x = NULL;
257 
258  in = BIO_new(BIO_s_file());
259  if (in == NULL) {
261  goto end;
262  }
263 
264  if (BIO_read_filename(in, file) <= 0) {
266  goto end;
267  }
268 
269  if (type == SSL_FILETYPE_ASN1) {
270  reason_code = ERR_R_ASN1_LIB;
271  x = d2i_X509_bio(in, NULL);
272  } else if (type == SSL_FILETYPE_PEM) {
273  reason_code = ERR_R_PEM_LIB;
274  x = PEM_read_bio_X509(in, NULL, ssl->ctx->default_passwd_callback,
275  ssl->ctx->default_passwd_callback_userdata);
276  } else {
278  goto end;
279  }
280 
281  if (x == NULL) {
282  OPENSSL_PUT_ERROR(SSL, reason_code);
283  goto end;
284  }
285 
286  ret = SSL_use_certificate(ssl, x);
287 
288 end:
289  X509_free(x);
290  BIO_free(in);
291 
292  return ret;
293 }
294 
295 int SSL_use_RSAPrivateKey_file(SSL *ssl, const char *file, int type) {
296  int reason_code, ret = 0;
297  BIO *in;
298  RSA *rsa = NULL;
299 
300  in = BIO_new(BIO_s_file());
301  if (in == NULL) {
303  goto end;
304  }
305 
306  if (BIO_read_filename(in, file) <= 0) {
308  goto end;
309  }
310 
311  if (type == SSL_FILETYPE_ASN1) {
312  reason_code = ERR_R_ASN1_LIB;
313  rsa = d2i_RSAPrivateKey_bio(in, NULL);
314  } else if (type == SSL_FILETYPE_PEM) {
315  reason_code = ERR_R_PEM_LIB;
316  rsa =
317  PEM_read_bio_RSAPrivateKey(in, NULL, ssl->ctx->default_passwd_callback,
318  ssl->ctx->default_passwd_callback_userdata);
319  } else {
321  goto end;
322  }
323 
324  if (rsa == NULL) {
325  OPENSSL_PUT_ERROR(SSL, reason_code);
326  goto end;
327  }
328  ret = SSL_use_RSAPrivateKey(ssl, rsa);
329  RSA_free(rsa);
330 
331 end:
332  BIO_free(in);
333  return ret;
334 }
335 
336 int SSL_use_PrivateKey_file(SSL *ssl, const char *file, int type) {
337  int reason_code, ret = 0;
338  BIO *in;
339  EVP_PKEY *pkey = NULL;
340 
341  in = BIO_new(BIO_s_file());
342  if (in == NULL) {
344  goto end;
345  }
346 
347  if (BIO_read_filename(in, file) <= 0) {
349  goto end;
350  }
351 
352  if (type == SSL_FILETYPE_PEM) {
353  reason_code = ERR_R_PEM_LIB;
354  pkey = PEM_read_bio_PrivateKey(in, NULL, ssl->ctx->default_passwd_callback,
355  ssl->ctx->default_passwd_callback_userdata);
356  } else if (type == SSL_FILETYPE_ASN1) {
357  reason_code = ERR_R_ASN1_LIB;
358  pkey = d2i_PrivateKey_bio(in, NULL);
359  } else {
361  goto end;
362  }
363 
364  if (pkey == NULL) {
365  OPENSSL_PUT_ERROR(SSL, reason_code);
366  goto end;
367  }
368  ret = SSL_use_PrivateKey(ssl, pkey);
369  EVP_PKEY_free(pkey);
370 
371 end:
372  BIO_free(in);
373  return ret;
374 }
375 
377  int reason_code;
378  BIO *in;
379  int ret = 0;
380  X509 *x = NULL;
381 
382  in = BIO_new(BIO_s_file());
383  if (in == NULL) {
385  goto end;
386  }
387 
388  if (BIO_read_filename(in, file) <= 0) {
390  goto end;
391  }
392 
393  if (type == SSL_FILETYPE_ASN1) {
394  reason_code = ERR_R_ASN1_LIB;
395  x = d2i_X509_bio(in, NULL);
396  } else if (type == SSL_FILETYPE_PEM) {
397  reason_code = ERR_R_PEM_LIB;
398  x = PEM_read_bio_X509(in, NULL, ctx->default_passwd_callback,
399  ctx->default_passwd_callback_userdata);
400  } else {
402  goto end;
403  }
404 
405  if (x == NULL) {
406  OPENSSL_PUT_ERROR(SSL, reason_code);
407  goto end;
408  }
409 
411 
412 end:
413  X509_free(x);
414  BIO_free(in);
415  return ret;
416 }
417 
419  int reason_code, ret = 0;
420  BIO *in;
421  RSA *rsa = NULL;
422 
423  in = BIO_new(BIO_s_file());
424  if (in == NULL) {
426  goto end;
427  }
428 
429  if (BIO_read_filename(in, file) <= 0) {
431  goto end;
432  }
433 
434  if (type == SSL_FILETYPE_ASN1) {
435  reason_code = ERR_R_ASN1_LIB;
436  rsa = d2i_RSAPrivateKey_bio(in, NULL);
437  } else if (type == SSL_FILETYPE_PEM) {
438  reason_code = ERR_R_PEM_LIB;
439  rsa = PEM_read_bio_RSAPrivateKey(in, NULL, ctx->default_passwd_callback,
440  ctx->default_passwd_callback_userdata);
441  } else {
443  goto end;
444  }
445 
446  if (rsa == NULL) {
447  OPENSSL_PUT_ERROR(SSL, reason_code);
448  goto end;
449  }
451  RSA_free(rsa);
452 
453 end:
454  BIO_free(in);
455  return ret;
456 }
457 
459  int reason_code, ret = 0;
460  BIO *in;
461  EVP_PKEY *pkey = NULL;
462 
463  in = BIO_new(BIO_s_file());
464  if (in == NULL) {
466  goto end;
467  }
468 
469  if (BIO_read_filename(in, file) <= 0) {
471  goto end;
472  }
473 
474  if (type == SSL_FILETYPE_PEM) {
475  reason_code = ERR_R_PEM_LIB;
476  pkey = PEM_read_bio_PrivateKey(in, NULL, ctx->default_passwd_callback,
477  ctx->default_passwd_callback_userdata);
478  } else if (type == SSL_FILETYPE_ASN1) {
479  reason_code = ERR_R_ASN1_LIB;
480  pkey = d2i_PrivateKey_bio(in, NULL);
481  } else {
483  goto end;
484  }
485 
486  if (pkey == NULL) {
487  OPENSSL_PUT_ERROR(SSL, reason_code);
488  goto end;
489  }
490  ret = SSL_CTX_use_PrivateKey(ctx, pkey);
491  EVP_PKEY_free(pkey);
492 
493 end:
494  BIO_free(in);
495  return ret;
496 }
497 
498 // Read a file that contains our certificate in "PEM" format, possibly followed
499 // by a sequence of CA certificates that should be sent to the peer in the
500 // Certificate message.
502  BIO *in;
503  int ret = 0;
504  X509 *x = NULL;
505 
506  ERR_clear_error(); // clear error stack for SSL_CTX_use_certificate()
507 
508  in = BIO_new(BIO_s_file());
509  if (in == NULL) {
511  goto end;
512  }
513 
514  if (BIO_read_filename(in, file) <= 0) {
516  goto end;
517  }
518 
519  x = PEM_read_bio_X509_AUX(in, NULL, ctx->default_passwd_callback,
520  ctx->default_passwd_callback_userdata);
521  if (x == NULL) {
523  goto end;
524  }
525 
527 
528  if (ERR_peek_error() != 0) {
529  ret = 0; // Key/certificate mismatch doesn't imply ret==0 ...
530  }
531 
532  if (ret) {
533  // If we could set up our certificate, now proceed to the CA
534  // certificates.
535  X509 *ca;
536  int r;
537  uint32_t err;
538 
540 
541  while ((ca = PEM_read_bio_X509(in, NULL, ctx->default_passwd_callback,
542  ctx->default_passwd_callback_userdata)) !=
543  NULL) {
545  if (!r) {
546  X509_free(ca);
547  ret = 0;
548  goto end;
549  }
550  // Note that we must not free r if it was successfully added to the chain
551  // (while we must free the main certificate, since its reference count is
552  // increased by SSL_CTX_use_certificate).
553  }
554 
555  // When the while loop ends, it's usually just EOF.
557  if (ERR_GET_LIB(err) == ERR_LIB_PEM &&
559  ERR_clear_error();
560  } else {
561  ret = 0; // some real error
562  }
563  }
564 
565 end:
566  X509_free(x);
567  BIO_free(in);
568  return ret;
569 }
570 
572  ctx->default_passwd_callback = cb;
573 }
574 
576  return ctx->default_passwd_callback;
577 }
578 
580  ctx->default_passwd_callback_userdata = data;
581 }
582 
584  return ctx->default_passwd_callback_userdata;
585 }
X509_get_subject_name
#define X509_get_subject_name
Definition: boringssl_prefix_symbols.h:2672
PEM_read_bio_X509_AUX
#define PEM_read_bio_X509_AUX
Definition: boringssl_prefix_symbols.h:1956
STACK_OF
STACK_OF(X509_NAME) *SSL_load_client_CA_file(const char *file)
Definition: ssl_file.cc:133
ctx
Definition: benchmark-async.c:30
bio_st
Definition: bio.h:822
sk_X509_NAME_sort
#define sk_X509_NAME_sort
Definition: boringssl_prefix_symbols.h:584
SSL_R_BAD_SSL_FILETYPE
#define SSL_R_BAD_SSL_FILETYPE
Definition: ssl.h:5385
ERR_R_SYS_LIB
#define ERR_R_SYS_LIB
Definition: err.h:330
xname_cmp
static int xname_cmp(const X509_NAME **a, const X509_NAME **b)
Definition: ssl_file.cc:127
OPENSSL_PUT_ERROR
#define OPENSSL_PUT_ERROR(library, reason)
Definition: err.h:423
bio.h
SSL_CTX_add0_chain_cert
#define SSL_CTX_add0_chain_cert
Definition: boringssl_prefix_symbols.h:68
string.h
error_ref_leak.err
err
Definition: error_ref_leak.py:35
file
Definition: bloaty/third_party/zlib/examples/gzappend.c:170
SSL_CTX_use_certificate_file
int SSL_CTX_use_certificate_file(SSL_CTX *ctx, const char *file, int type)
Definition: ssl_file.cc:376
pem.h
PEM_R_NO_START_LINE
#define PEM_R_NO_START_LINE
Definition: pem.h:477
a
int a
Definition: abseil-cpp/absl/container/internal/hash_policy_traits_test.cc:88
internal.h
pem_password_cb
int pem_password_cb(char *buf, int size, int rwflag, void *userdata)
Definition: pem.h:313
X509_NAME_cmp
#define X509_NAME_cmp
Definition: boringssl_prefix_symbols.h:2376
ssl_ctx_st
Definition: third_party/boringssl-with-bazel/src/ssl/internal.h:3404
X509_NAME_free
#define X509_NAME_free
Definition: boringssl_prefix_symbols.h:2381
PEM_read_bio_PrivateKey
EVP_PKEY * PEM_read_bio_PrivateKey(BIO *bp, EVP_PKEY **x, pem_password_cb *cb, void *u)
Definition: pem_pkey.c:71
sk_X509_NAME_free
#define sk_X509_NAME_free
Definition: boringssl_prefix_symbols.h:578
d2i_X509_bio
#define d2i_X509_bio
Definition: boringssl_prefix_symbols.h:3054
SSL_use_RSAPrivateKey_file
int SSL_use_RSAPrivateKey_file(SSL *ssl, const char *file, int type)
Definition: ssl_file.cc:295
X509_free
#define X509_free
Definition: boringssl_prefix_symbols.h:2632
SSL_CTX_get_default_passwd_cb_userdata
void * SSL_CTX_get_default_passwd_cb_userdata(const SSL_CTX *ctx)
Definition: ssl_file.cc:583
uint32_t
unsigned int uint32_t
Definition: stdint-msvc2008.h:80
sk_X509_NAME_pop_free
#define sk_X509_NAME_pop_free
Definition: boringssl_prefix_symbols.h:581
in
const char * in
Definition: third_party/abseil-cpp/absl/strings/internal/str_format/parser_test.cc:391
sk_X509_NAME_new
#define sk_X509_NAME_new
Definition: boringssl_prefix_symbols.h:579
SSL_load_client_CA_file
#define SSL_load_client_CA_file
Definition: boringssl_prefix_symbols.h:408
SSL_FILETYPE_ASN1
#define SSL_FILETYPE_ASN1
Definition: ssl.h:1186
PEM_read_bio_X509
#define PEM_read_bio_X509
Definition: boringssl_prefix_symbols.h:1955
SSL_CTX_set_default_passwd_cb
void SSL_CTX_set_default_passwd_cb(SSL_CTX *ctx, pem_password_cb *cb)
Definition: ssl_file.cc:571
ERR_GET_REASON
#define ERR_GET_REASON(packed_error)
Definition: err.h:171
evp_pkey_st
Definition: evp.h:1046
xds_interop_client.int
int
Definition: xds_interop_client.py:113
end
char * end
Definition: abseil-cpp/absl/strings/internal/str_format/float_conversion.cc:1008
RSA_free
#define RSA_free
Definition: boringssl_prefix_symbols.h:2090
ssl_st
Definition: third_party/boringssl-with-bazel/src/ssl/internal.h:3698
d2i_PrivateKey_bio
OPENSSL_EXPORT EVP_PKEY * d2i_PrivateKey_bio(BIO *bp, EVP_PKEY **a)
SSL_CTX_set_default_passwd_cb_userdata
void SSL_CTX_set_default_passwd_cb_userdata(SSL_CTX *ctx, void *data)
Definition: ssl_file.cc:579
SSL_add_file_cert_subjects_to_stack
int SSL_add_file_cert_subjects_to_stack(STACK_OF(X509_NAME) *stack, const char *file)
Definition: ssl_file.cc:197
ERR_peek_error
#define ERR_peek_error
Definition: boringssl_prefix_symbols.h:1428
sk_X509_NAME_set_cmp_func
#define sk_X509_NAME_set_cmp_func
Definition: boringssl_prefix_symbols.h:583
EVP_PKEY_free
#define EVP_PKEY_free
Definition: boringssl_prefix_symbols.h:1625
ERR_GET_LIB
#define ERR_GET_LIB(packed_error)
Definition: err.h:166
err.h
SSL_use_certificate_file
int SSL_use_certificate_file(SSL *ssl, const char *file, int type)
Definition: ssl_file.cc:252
x
int x
Definition: bloaty/third_party/googletest/googlemock/test/gmock-matchers_test.cc:3610
stack
NodeStack stack
Definition: cord_rep_btree.cc:356
data
char data[kBufferLength]
Definition: abseil-cpp/absl/strings/internal/str_format/float_conversion.cc:1006
BIO_new
#define BIO_new
Definition: boringssl_prefix_symbols.h:814
SSL_use_PrivateKey_file
int SSL_use_PrivateKey_file(SSL *ssl, const char *file, int type)
Definition: ssl_file.cc:336
b
uint64_t b
Definition: abseil-cpp/absl/container/internal/layout_test.cc:53
ERR_R_BUF_LIB
#define ERR_R_BUF_LIB
Definition: err.h:335
ERR_peek_last_error
#define ERR_peek_last_error
Definition: boringssl_prefix_symbols.h:1431
ssl.h
sk_X509_NAME_find
#define sk_X509_NAME_find
Definition: boringssl_prefix_symbols.h:577
SSL_CTX_use_RSAPrivateKey
#define SSL_CTX_use_RSAPrivateKey
Definition: boringssl_prefix_symbols.h:225
ERR_R_ASN1_LIB
#define ERR_R_ASN1_LIB
Definition: err.h:340
SSL_CTX_get_default_passwd_cb
pem_password_cb * SSL_CTX_get_default_passwd_cb(const SSL_CTX *ctx)
Definition: ssl_file.cc:575
BIO_free
#define BIO_free
Definition: boringssl_prefix_symbols.h:787
SSL_use_RSAPrivateKey
#define SSL_use_RSAPrivateKey
Definition: boringssl_prefix_symbols.h:523
BIO_read_filename
#define BIO_read_filename
Definition: boringssl_prefix_symbols.h:833
x509_st
Definition: third_party/boringssl-with-bazel/src/crypto/x509/internal.h:139
SSL_CTX_use_certificate_chain_file
int SSL_CTX_use_certificate_chain_file(SSL_CTX *ctx, const char *file)
Definition: ssl_file.cc:501
SSL_use_PrivateKey
#define SSL_use_PrivateKey
Definition: boringssl_prefix_symbols.h:520
PEM_read_bio_RSAPrivateKey
RSA * PEM_read_bio_RSAPrivateKey(BIO *bp, RSA **rsa, pem_password_cb *cb, void *u)
Definition: pem_all.c:152
ret
UniquePtr< SSL_SESSION > ret
Definition: ssl_x509.cc:1029
ERR_LIB_PEM
@ ERR_LIB_PEM
Definition: err.h:300
fix_build_deps.r
r
Definition: fix_build_deps.py:491
sk_X509_NAME_push
#define sk_X509_NAME_push
Definition: boringssl_prefix_symbols.h:582
ERR_clear_error
#define ERR_clear_error
Definition: boringssl_prefix_symbols.h:1413
SSL_CTX_use_certificate
#define SSL_CTX_use_certificate
Definition: boringssl_prefix_symbols.h:228
sk_X509_NAME_new_null
#define sk_X509_NAME_new_null
Definition: boringssl_prefix_symbols.h:580
SSL_use_certificate
#define SSL_use_certificate
Definition: boringssl_prefix_symbols.h:526
SSL_CTX_use_PrivateKey_file
int SSL_CTX_use_PrivateKey_file(SSL_CTX *ctx, const char *file, int type)
Definition: ssl_file.cc:458
X509_NAME_dup
OPENSSL_EXPORT X509_NAME * X509_NAME_dup(X509_NAME *xn)
SSL_CTX_use_PrivateKey
#define SSL_CTX_use_PrivateKey
Definition: boringssl_prefix_symbols.h:222
d2i_RSAPrivateKey_bio
OPENSSL_EXPORT RSA * d2i_RSAPrivateKey_bio(BIO *bp, RSA **rsa)
BIO_s_file
#define BIO_s_file
Definition: boringssl_prefix_symbols.h:838
SSL_CTX_use_RSAPrivateKey_file
int SSL_CTX_use_RSAPrivateKey_file(SSL_CTX *ctx, const char *file, int type)
Definition: ssl_file.cc:418
mem.h
asyncio_get_stats.type
type
Definition: asyncio_get_stats.py:37
rsa_st
Definition: rsa.h:732
ERR_R_PEM_LIB
#define ERR_R_PEM_LIB
Definition: err.h:337
SSL_CTX_clear_chain_certs
#define SSL_CTX_clear_chain_certs
Definition: boringssl_prefix_symbols.h:76
ssl_st::ctx
bssl::UniquePtr< SSL_CTX > ctx
Definition: third_party/boringssl-with-bazel/src/ssl/internal.h:3754
X509_name_st
Definition: third_party/boringssl-with-bazel/src/crypto/x509/internal.h:95
errno.h
cb
OPENSSL_EXPORT pem_password_cb * cb
Definition: pem.h:351
asn1.h
ERR_R_MALLOC_FAILURE
#define ERR_R_MALLOC_FAILURE
Definition: err.h:371
SSL_FILETYPE_PEM
#define SSL_FILETYPE_PEM
Definition: ssl.h:1185
stack.h
x509.h


grpc
Author(s):
autogenerated on Thu Mar 13 2025 03:01:20