]> git.sur5r.net Git - bacula/bacula/blob - bacula/src/console/console_conf.h
- Integrated TLS network encryption
[bacula/bacula] / bacula / src / console / console_conf.h
1 /*
2  * Bacula User Agent specific configuration and defines
3  *
4  *     Kern Sibbald, Sep MM
5  *
6  *     Version $Id$
7  */
8
9 /*
10  * Resource codes -- they must be sequential for indexing
11  */
12
13 enum {
14    R_CONSOLE   = 1001,
15    R_DIRECTOR,
16    R_FIRST     = R_CONSOLE,
17    R_LAST      = R_DIRECTOR           /* Keep this updated */
18 };
19
20 /*
21  * Some resource attributes
22  */
23 enum {
24    R_NAME     = 1020,
25    R_ADDRESS,
26    R_PASSWORD,
27    R_TYPE,
28    R_BACKUP
29 };
30
31
32 /* Definition of the contents of each Resource */
33
34 /* Console "globals" */
35 struct CONRES {
36    RES   hdr;
37    char *rc_file;                     /* startup file */
38    char *hist_file;                   /* command history file */
39    char *password;                    /* UA server password */
40 #ifdef HAVE_TLS
41    int tls_enable;                    /* Enable TLS on all connections */
42    int tls_require;                   /* Require TLS on all connections */
43    char *tls_ca_certfile;             /* TLS CA Certificate File */
44    char *tls_ca_certdir;              /* TLS CA Certificate Directory */
45    char *tls_certfile;                /* TLS Client Certificate File */
46    char *tls_keyfile;                 /* TLS Client Key File */
47
48    TLS_CONTEXT *tls_ctx;              /* Shared TLS Context */
49 #endif /* HAVE_TLS */
50 };
51
52 /* Director */
53 struct DIRRES {
54    RES   hdr;
55    int   DIRport;                     /* UA server port */
56    char *address;                     /* UA server address */
57    char *password;                    /* UA server password */
58 #ifdef HAVE_TLS
59    int tls_enable;                    /* Enable TLS */
60    int tls_require;                   /* Require TLS */
61    char *tls_ca_certfile;             /* TLS CA Certificate File */
62    char *tls_ca_certdir;              /* TLS CA Certificate Directory */
63    char *tls_certfile;                /* TLS Client Certificate File */
64    char *tls_keyfile;                 /* TLS Client Key File */
65
66    TLS_CONTEXT *tls_ctx;              /* Shared TLS Context */
67 #endif /* HAVE_TLS */
68 };
69
70
71 /* Define the Union of all the above
72  * resource structure definitions.
73  */
74 union URES {
75    DIRRES res_dir;
76    CONRES res_cons;
77    RES hdr;
78 };