The FreeRADIUS server  $Id: 15bac2a4c627c01d1aa2047687b3418955ac7f00 $
bio.h
Go to the documentation of this file.
1 #pragma once
2 /*
3  * This program is free software; you can redistribute it and/or modify
4  * it under the terms of the GNU General Public License as published by
5  * the Free Software Foundation; either version 2 of the License, or
6  * (at your option) any later version.
7  *
8  * This program is distributed in the hope that it will be useful,
9  * but WITHOUT ANY WARRANTY; without even the implied warranty of
10  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11  * GNU General Public License for more details.
12  *
13  * You should have received a copy of the GNU General Public License
14  * along with this program; if not, write to the Free Software
15  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
16  */
17 #ifdef WITH_TLS
18 /**
19  * $Id: 8d48580aad105d56c71cde107dcc084f7c0e00b8 $
20  *
21  * @file lib/tls/bio.h
22  * @brief Custom BIOs to pass to OpenSSL's functions
23  *
24  * @copyright 2021 Arran Cudbard-Bell (a.cudbardb@freeradius.org)
25  */
26 RCSIDH(bio_h, "$Id: 8d48580aad105d56c71cde107dcc084f7c0e00b8 $")
27 
28 #include "openssl_user_macros.h"
29 
30 #include <openssl/bio.h>
31 #include <freeradius-devel/util/dbuff.h>
32 
33 typedef struct fr_tls_bio_dbuff_s fr_tls_bio_dbuff_t;
34 
35 uint8_t *fr_tls_bio_dbuff_finalise(fr_tls_bio_dbuff_t *bd);
36 
37 char *fr_tls_bio_dbuff_finalise_bstr(fr_tls_bio_dbuff_t *bd);
38 
39 fr_dbuff_t *fr_tls_bio_dbuff_out(fr_tls_bio_dbuff_t *bd);
40 
41 fr_dbuff_t *fr_tls_bio_dbuff_in(fr_tls_bio_dbuff_t *bd);
42 
43 void fr_tls_bio_dbuff_reset(fr_tls_bio_dbuff_t *bd);
44 
45 BIO *fr_tls_bio_dbuff_alloc(fr_tls_bio_dbuff_t **out, TALLOC_CTX *bio_ctx, TALLOC_CTX *buff_ctx,
46  size_t init, size_t max, bool free_buff);
47 
48 uint8_t *fr_tls_bio_dbuff_thread_local_finalise(void);
49 
50 char *fr_tls_bio_dbuff_thread_local_finalise_bstr(void);
51 
52 void fr_tls_bio_dbuff_thread_local_clear(void);
53 
54 BIO *fr_tls_bio_dbuff_thread_local(TALLOC_CTX *ctx, size_t init, size_t max);
55 
56 int fr_tls_bio_init(void);
57 
58 void fr_tls_bio_free(void);
59 
60 #endif /* WITH_TLS */
#define RCSIDH(h, id)
Definition: build.h:482
unsigned char uint8_t
Definition: merged_model.c:30
init
Enter the EAP-IDENTITY state.
Definition: state_machine.c:90
static size_t char ** out
Definition: value.h:997