ascii-chat
Binary v0.15.83-53-gb711d8720
Library lib/v0.3.2-701-gb711d8720
Video chat in your terminal
Loading...
Searching...
No Matches
security.c File Reference

Security and authentication options. More...

Go to the source code of this file.

Variables

const registry_entry_t g_security_entries []

Detailed Description

Security and authentication options.

Options for encryption, key management, and authentication.

Author
Zachary Fogg me@zf.nosp@m.o.gg
Date
January 2026

Definition in file lib/options/registry/security.c.

Variable Documentation

◆ g_security_entries

const registry_entry_t g_security_entries[]

Definition at line 19 of file lib/options/registry/security.c.

19 {
20 // SECURITY GROUP (client, server, discovery)
21 {"encrypt",
22 'E',
24 offsetof(options_t, encrypt_enabled),
25 &default_encrypt_enabled_value,
26 sizeof(bool),
27 "Explicitly enable ACIP payload encryption, including over WSS.",
28 "SECURITY",
29 NULL,
30 false,
31 "ASCII_CHAT_ENCRYPT",
32 NULL,
33 NULL,
34 false,
35 false,
37 {0},
38 NULL},
39 {"key",
40 'K',
42 offsetof(options_t, encrypt_key),
43 "",
44 0,
45 "Server identity key (SSH Ed25519 or GPG key file, gpg:FINGERPRINT, github:USER[.gpg], gitlab:USER[.gpg], or "
46 "HTTPS URL like https://example.com/key.pub or .gpg).",
47 "SECURITY",
48 NULL,
49 false,
50 "ASCII_CHAT_KEY",
51 NULL,
52 NULL,
53 false,
54 false,
56 {.input_type = OPTION_INPUT_FILEPATH},
57 NULL},
58 {"password",
59 '\0',
61 offsetof(options_t, password),
62 "",
63 0,
64 "Shared password for authentication (8-256 characters).",
65 "SECURITY",
66 NULL,
67 false,
68 "ASCII_CHAT_PASSWORD",
69 NULL,
70 NULL,
71 false,
72 false,
74 {0},
75 NULL},
76 {"no-encrypt",
77 '\0',
79 offsetof(options_t, no_encrypt),
80 &default_no_encrypt_value,
81 sizeof(bool),
82 "Disable ACIP payload encryption; configured keys/password still authenticate.",
83 "SECURITY",
84 NULL,
85 false,
86 "ASCII_CHAT_NO_ENCRYPT",
87 NULL,
88 NULL,
89 false,
90 false,
92 {0},
93 NULL},
94 {"no-auth",
95 '\0',
97 offsetof(options_t, no_auth),
98 &default_no_auth_value,
99 sizeof(bool),
100 "Disable authentication layer (--no-auth). Use with --no-encrypt to bypass ACIP entirely.",
101 "SECURITY",
102 NULL,
103 false,
104 "ASCII_CHAT_NO_AUTH",
105 NULL,
106 NULL,
107 false,
108 false,
110 {0},
111 NULL},
112 {"server-key",
113 '\0',
115 offsetof(options_t, server_key),
116 "",
117 0,
118 "Expected server public key for verification. Supports: raw base64 public key (AAAAC3Nz...), "
119 "SSH/GPG key files, gpg:FINGERPRINT, github:USER[.gpg], gitlab:USER[.gpg], "
120 "or HTTP(S) URLs like https://github.com/zfogg.[keys|gpg].",
121 "SECURITY",
122 NULL,
123 false,
124 "ASCII_CHAT_SERVER_KEY",
125 NULL,
126 NULL,
127 false,
128 false,
130 {.input_type = OPTION_INPUT_FILEPATH},
131 NULL},
132 {"client-keys",
133 '\0',
135 offsetof(options_t, client_keys),
136 "",
137 0,
138 "Allowed client keys (comma-separated). Supports: raw base64 public keys (AAAAC3Nz...), "
139 "file paths with one key per line, github:USER[.gpg], gitlab:USER[.gpg], gpg:KEYID, "
140 "or HTTP(S) URLs like https://github.com/zfogg.[keys|gpg].",
141 "SECURITY",
142 NULL,
143 false,
144 "ASCII_CHAT_CLIENT_KEYS",
145 NULL,
146 NULL,
147 false,
148 false,
150 {.input_type = OPTION_INPUT_FILEPATH},
151 NULL},
152 {"discovery-insecure",
153 '\0',
155 offsetof(options_t, discovery_insecure),
156 &default_discovery_insecure_value,
157 sizeof(bool),
158 "Skip server key verification (MITM-vulnerable, requires explicit opt-in).",
159 "SECURITY",
160 NULL,
161 false,
162 "ASCII_CHAT_DISCOVERY_INSECURE",
163 NULL,
164 NULL,
165 false,
166 false,
168 {0},
169 NULL},
170 {"discovery-service-key",
171 '\0',
173 offsetof(options_t, discovery_service_key),
174 "",
175 0,
176 "Discovery server public key for verification. Supports: raw base64 public key (AAAAC3Nz...), "
177 "SSH/GPG key files, gpg:FINGERPRINT, github:USER[.gpg], gitlab:USER[.gpg], "
178 "or HTTP(S) URLs like https://github.com/zfogg.[keys|gpg].",
179 "SECURITY",
180 NULL,
181 false,
182 "ASCII_CHAT_DISCOVERY_SERVER_KEY",
183 NULL,
184 NULL,
185 false,
186 false,
188 {0},
189 NULL},
190 {"require-server-identity",
191 '\0',
193 offsetof(options_t, require_server_identity),
194 NULL,
195 sizeof(bool),
196 "Require servers to provide signed Ed25519 identity.",
197 "SECURITY",
198 NULL,
199 false,
200 "ASCII_CHAT_REQUIRE_SERVER_IDENTITY",
201 NULL,
202 NULL,
203 false,
204 false,
206 {0},
207 NULL},
208 {"require-client-identity",
209 '\0',
211 offsetof(options_t, require_client_identity),
212 NULL,
213 sizeof(bool),
214 "Require clients to provide signed Ed25519 identity.",
215 "SECURITY",
216 NULL,
217 false,
218 "ASCII_CHAT_REQUIRE_CLIENT_IDENTITY",
219 NULL,
220 NULL,
221 false,
222 false,
224 {0},
225 NULL},
226
@ OPTION_INPUT_FILEPATH
File path completion.
Definition builder.h:186
@ OPTION_TYPE_STRING
String value (–name foo).
Definition builder.h:169
@ OPTION_TYPE_BOOL
Boolean flag (–flag, no value).
Definition builder.h:167
struct options_state options_t
Immutable, RCU-published snapshot of the application's runtime configuration.
@ OPTION_MODE_CLIENT
Client mode (bit 1).
Definition options.h:939
@ OPTION_MODE_DISCOVERY
Discovery mode (bit 4).
Definition options.h:942
@ OPTION_MODE_SERVER
Server mode (bit 0).
Definition options.h:938
@ OPTION_MODE_DISCOVERY_SVC
Discovery server mode (bit 3).
Definition options.h:941
#define REGISTRY_TERMINATOR()
Initialize a terminator entry (sentinel value for array end) Uses designated initializers to properly...