The FreeRADIUS server  $Id: 15bac2a4c627c01d1aa2047687b3418955ac7f00 $
engine.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: 0cb21f8057994813fa81466b8ede2d271cfd0d7c $
20  *
21  * @file lib/tls/engine.h
22  * @brief Initialise and manage OpenSSL engines
23  *
24  * @copyright 2021 The FreeRADIUS server project
25  * @copyright 2021 Arran Cudbard-Bell <a.cudbardb@freeradius.org>
26  */
27 RCSIDH(tls_engine_h, "$Id: 0cb21f8057994813fa81466b8ede2d271cfd0d7c $")
28 
29 #include "openssl_user_macros.h"
30 
31 #include <freeradius-devel/util/dlist.h>
32 #include <openssl/engine.h>
33 
34 #ifdef __cplusplus
35 extern "C" {
36 #endif
37 
38 /** Engine configuration parameters
39  *
40  * Used by fr_tls_global_engine_conf_t.
41  */
42 typedef struct {
43  fr_dlist_t entry; //!< Entry in list of controls.
44  char const *name; //!< Name of control.
45  char const *value; //!< Value to pass to control.
46 } fr_tls_engine_ctrl_t;
47 
48 typedef fr_dlist_head_t fr_tls_engine_ctrl_list_t;
49 
50 int fr_tls_engine_init(ENGINE **e_out,
51  char const *id, char const *instance,
52  fr_tls_engine_ctrl_list_t const *pre_ctrls, fr_tls_engine_ctrl_list_t const *post_ctrls);
53 
54 int fr_tls_engine(ENGINE **e_out, char const *id, char const *instance, bool auto_init);
55 
56 void fr_tls_engine_load_builtin(void);
57 
58 void fr_tls_engine_free_all(void);
59 
60 #ifdef __cplusplus
61 }
62 #endif
63 #endif
#define RCSIDH(h, id)
Definition: build.h:482
Test enumeration values.
Definition: dict_test.h:92
Head of a doubly linked list.
Definition: dlist.h:51
Entry in a doubly linked list.
Definition: dlist.h:41
static char const * name