NeoMutt  2025-09-05-55-g97fc89
Teaching an old dog new tricks
DOXYGEN
Loading...
Searching...
No Matches
config.c File Reference

Connection Global Variables. More...

#include "config.h"
#include <stdbool.h>
#include <stddef.h>
#include "config/lib.h"
+ Include dependency graph for config.c:

Go to the source code of this file.

Functions

bool config_init_conn (struct ConfigSet *cs)
 Register conn config variables - Implements module_init_config_t -.
 

Variables

static struct ConfigDef ConnVars []
 Config definitions for the connection library.
 
static struct ConfigDef ConnVarsSsl []
 General SSL Config definitions for the conn library.
 
static struct ConfigDef ConnVarsGnutls []
 GnuTLS Config definitions for the connection library.
 
static struct ConfigDef ConnVarsOpenssl []
 OpenSSL Config definitions for the connection library.
 
static struct ConfigDef ConnVarsPartial []
 SSL partial chains Config definitions for the connection library.
 
static struct ConfigDef ConnVarsGetaddr []
 GetAddrInfo Config definitions for the connection library.
 

Detailed Description

Connection Global Variables.

Authors
  • Richard Russon
  • Pietro Cerutti
  • наб

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program. If not, see http://www.gnu.org/licenses/.

Definition in file config.c.

Variable Documentation

◆ ConnVars

struct ConfigDef ConnVars[]
static
Initial value:
= {
{ "account_command", DT_STRING|D_STRING_COMMAND, 0, 0, NULL,
"Shell command to retrieve account credentials"
},
{ "preconnect", DT_STRING, 0, 0, NULL,
"(socket) External command to run prior to opening a socket"
},
{ "socket_timeout", DT_NUMBER, 30, 0, NULL,
"Timeout for socket connect/read/write operations (-1 to wait indefinitely)"
},
{ "tunnel", DT_STRING|D_STRING_COMMAND, 0, 0, NULL,
"Shell command to establish a tunnel"
},
{ "tunnel_is_secure", DT_BOOL, true, 0, NULL,
"Assume a tunneled connection is secure"
},
{ "connect_timeout", DT_SYNONYM, IP "socket_timeout", IP "2023-02-15" },
{ NULL },
}
#define IP
Definition set.h:52
#define D_STRING_COMMAND
A command.
Definition types.h:98
@ DT_NUMBER
a number
Definition types.h:38
@ DT_BOOL
boolean option
Definition types.h:32
@ DT_SYNONYM
synonym for another variable
Definition types.h:45
@ DT_STRING
a string
Definition types.h:44

Config definitions for the connection library.

Definition at line 39 of file config.c.

39 {
40 // clang-format off
41 { "account_command", DT_STRING|D_STRING_COMMAND, 0, 0, NULL,
42 "Shell command to retrieve account credentials"
43 },
44 { "preconnect", DT_STRING, 0, 0, NULL,
45 "(socket) External command to run prior to opening a socket"
46 },
47 { "socket_timeout", DT_NUMBER, 30, 0, NULL,
48 "Timeout for socket connect/read/write operations (-1 to wait indefinitely)"
49 },
50 { "tunnel", DT_STRING|D_STRING_COMMAND, 0, 0, NULL,
51 "Shell command to establish a tunnel"
52 },
53 { "tunnel_is_secure", DT_BOOL, true, 0, NULL,
54 "Assume a tunneled connection is secure"
55 },
56
57 { "connect_timeout", DT_SYNONYM, IP "socket_timeout", IP "2023-02-15" },
58 { NULL },
59 // clang-format on
60};

◆ ConnVarsSsl

struct ConfigDef ConnVarsSsl[]
static

General SSL Config definitions for the conn library.

Definition at line 66 of file config.c.

66 {
67 // clang-format off
68 { "certificate_file", DT_PATH|D_PATH_FILE, IP "~/.mutt_certificates", 0, NULL,
69 "File containing trusted certificates"
70 },
71 { "ssl_ciphers", DT_STRING, 0, 0, NULL,
72 "Ciphers to use when using SSL"
73 },
74 { "ssl_client_cert", DT_PATH|D_PATH_FILE, 0, 0, NULL,
75 "File containing client certificates"
76 },
77 { "ssl_force_tls", DT_BOOL, true, 0, NULL,
78 "(ssl) Require TLS encryption for all connections"
79 },
80 { "ssl_starttls", DT_QUAD, MUTT_YES, 0, NULL,
81 "(ssl) Use STARTTLS on servers advertising the capability"
82 },
83 { "ssl_use_sslv3", DT_BOOL, false, 0, NULL,
84 "(ssl) INSECURE: Use SSLv3 for authentication"
85 },
86 { "ssl_use_tlsv1", DT_BOOL, false, 0, NULL,
87 "(ssl) Use TLSv1 for authentication"
88 },
89 { "ssl_use_tlsv1_1", DT_BOOL, false, 0, NULL,
90 "(ssl) Use TLSv1.1 for authentication"
91 },
92 { "ssl_use_tlsv1_2", DT_BOOL, true, 0, NULL,
93 "(ssl) Use TLSv1.2 for authentication"
94 },
95 { "ssl_use_tlsv1_3", DT_BOOL, true, 0, NULL,
96 "(ssl) Use TLSv1.3 for authentication"
97 },
98 { "ssl_verify_dates", DT_BOOL, true, 0, NULL,
99 "(ssl) Verify the dates on the server certificate"
100 },
101 { "ssl_verify_host", DT_BOOL, true, 0, NULL,
102 "(ssl) Verify the server's hostname against the certificate"
103 },
104 { NULL },
105 // clang-format on
106};
@ MUTT_YES
User answered 'Yes', or assume 'Yes'.
Definition quad.h:39
#define D_PATH_FILE
Path is a file.
Definition types.h:103
@ DT_QUAD
quad-option (no/yes/ask-no/ask-yes)
Definition types.h:40
@ DT_PATH
a path to a file/directory
Definition types.h:39

◆ ConnVarsGnutls

struct ConfigDef ConnVarsGnutls[]
static
Initial value:
= {
{ "ssl_ca_certificates_file", DT_PATH|D_PATH_FILE, 0, 0, NULL,
"File containing trusted CA certificates"
},
{ "ssl_min_dh_prime_bits", DT_NUMBER|D_INTEGER_NOT_NEGATIVE, 0, 0, NULL,
"Minimum keysize for Diffie-Hellman key exchange"
},
{ NULL },
}
#define D_INTEGER_NOT_NEGATIVE
Negative numbers are not allowed.
Definition types.h:100

GnuTLS Config definitions for the connection library.

Definition at line 113 of file config.c.

113 {
114 // clang-format off
115 { "ssl_ca_certificates_file", DT_PATH|D_PATH_FILE, 0, 0, NULL,
116 "File containing trusted CA certificates"
117 },
118 { "ssl_min_dh_prime_bits", DT_NUMBER|D_INTEGER_NOT_NEGATIVE, 0, 0, NULL,
119 "Minimum keysize for Diffie-Hellman key exchange"
120 },
121 { NULL },
122 // clang-format on
123};

◆ ConnVarsOpenssl

struct ConfigDef ConnVarsOpenssl[]
static
Initial value:
= {
{ "entropy_file", DT_PATH|D_PATH_FILE, 0, 0, NULL,
"(ssl) File/device containing random data to initialise SSL"
},
{ "ssl_use_sslv2", DT_BOOL, false, 0, NULL,
"(ssl) INSECURE: Use SSLv2 for authentication"
},
{ "ssl_use_system_certs", DT_BOOL, true, 0, NULL,
"(ssl) Use CA certificates in the system-wide store"
},
{ "ssl_usesystemcerts", DT_SYNONYM, IP "ssl_use_system_certs", IP "2021-02-11" },
{ NULL },
}

OpenSSL Config definitions for the connection library.

Definition at line 130 of file config.c.

130 {
131 // clang-format off
132 { "entropy_file", DT_PATH|D_PATH_FILE, 0, 0, NULL,
133 "(ssl) File/device containing random data to initialise SSL"
134 },
135 { "ssl_use_sslv2", DT_BOOL, false, 0, NULL,
136 "(ssl) INSECURE: Use SSLv2 for authentication"
137 },
138 { "ssl_use_system_certs", DT_BOOL, true, 0, NULL,
139 "(ssl) Use CA certificates in the system-wide store"
140 },
141 { "ssl_usesystemcerts", DT_SYNONYM, IP "ssl_use_system_certs", IP "2021-02-11" },
142 { NULL },
143 // clang-format on
144};

◆ ConnVarsPartial

struct ConfigDef ConnVarsPartial[]
static
Initial value:
= {
{ "ssl_verify_partial_chains", DT_BOOL, false, 0, NULL,
"(ssl) Allow verification using partial certificate chains"
},
{ NULL },
}

SSL partial chains Config definitions for the connection library.

Definition at line 151 of file config.c.

151 {
152 // clang-format off
153 { "ssl_verify_partial_chains", DT_BOOL, false, 0, NULL,
154 "(ssl) Allow verification using partial certificate chains"
155 },
156 { NULL },
157 // clang-format on
158};

◆ ConnVarsGetaddr

struct ConfigDef ConnVarsGetaddr[]
static
Initial value:
= {
{ "use_ipv6", DT_BOOL, true, 0, NULL,
"Lookup IPv6 addresses when making connections"
},
{ NULL },
}

GetAddrInfo Config definitions for the connection library.

Definition at line 165 of file config.c.

165 {
166 // clang-format off
167 { "use_ipv6", DT_BOOL, true, 0, NULL,
168 "Lookup IPv6 addresses when making connections"
169 },
170 { NULL },
171 // clang-format on
172};