ascii-chat 0.11.33
Video chat in your terminal
Loading...
Searching...
No Matches
security.c
Go to the documentation of this file.
1
14
15// ============================================================================
16// SECURITY CATEGORY - Security and authentication options
17// ============================================================================
19 // SECURITY GROUP (client, server, discovery)
20 {"encrypt",
21 'E',
23 offsetof(options_t, encrypt_enabled),
24 &default_encrypt_enabled_value,
25 sizeof(bool),
26 "Enable end-to-end encryption (requires the other party to be encrypted as well).",
27 "SECURITY",
28 NULL,
29 false,
30 "ASCII_CHAT_ENCRYPT",
31 NULL,
32 NULL,
33 false,
34 false,
36 {0},
37 NULL},
38 {"key",
39 'K',
41 offsetof(options_t, encrypt_key),
42 "",
43 0,
44 "Server identity key (SSH Ed25519 or GPG key file, gpg:FINGERPRINT, github:USER[.gpg], gitlab:USER[.gpg], or "
45 "HTTPS URL like https://example.com/key.pub or .gpg).",
46 "SECURITY",
47 NULL,
48 false,
49 "ASCII_CHAT_KEY",
50 NULL,
51 NULL,
52 false,
53 false,
55 {0},
56 NULL},
57 {"password",
58 '\0',
60 offsetof(options_t, password),
61 "",
62 0,
63 "Shared password for authentication (8-256 characters).",
64 "SECURITY",
65 NULL,
66 false,
67 "ASCII_CHAT_PASSWORD",
68 NULL,
69 NULL,
70 false,
71 false,
73 {0},
74 NULL},
75 {"no-encrypt",
76 '\0',
78 offsetof(options_t, no_encrypt),
79 &default_no_encrypt_value,
80 sizeof(bool),
81 "Disable encryption (requires the other party to be unencrypted as well).",
82 "SECURITY",
83 NULL,
84 false,
85 "ASCII_CHAT_NO_ENCRYPT",
86 NULL,
87 NULL,
88 false,
89 false,
91 {0},
92 NULL},
93 {"no-auth",
94 '\0',
96 offsetof(options_t, no_auth),
97 &default_no_auth_value,
98 sizeof(bool),
99 "Disable authentication layer (--no-auth). Use with --no-encrypt to bypass ACIP entirely.",
100 "SECURITY",
101 NULL,
102 false,
103 "ASCII_CHAT_NO_AUTH",
104 NULL,
105 NULL,
106 false,
107 false,
109 {0},
110 NULL},
111 {"server-key",
112 '\0',
114 offsetof(options_t, server_key),
115 "",
116 0,
117 "Expected server public key for verification. Supports: raw base64 public key (AAAAC3Nz...), "
118 "SSH/GPG key files, gpg:FINGERPRINT, github:USER[.gpg], gitlab:USER[.gpg], "
119 "or HTTP(S) URLs like https://github.com/zfogg.[keys|gpg].",
120 "SECURITY",
121 NULL,
122 false,
123 "ASCII_CHAT_SERVER_KEY",
124 NULL,
125 NULL,
126 false,
127 false,
129 {0},
130 NULL},
131 {"client-keys",
132 '\0',
134 offsetof(options_t, client_keys),
135 "",
136 0,
137 "Allowed client keys (comma-separated). Supports: raw base64 public keys (AAAAC3Nz...), "
138 "file paths with one key per line, github:USER[.gpg], gitlab:USER[.gpg], gpg:KEYID, "
139 "or HTTP(S) URLs like https://github.com/zfogg.[keys|gpg].",
140 "SECURITY",
141 NULL,
142 false,
143 "ASCII_CHAT_CLIENT_KEYS",
144 NULL,
145 NULL,
146 false,
147 false,
149 {0},
150 NULL},
151 {"discovery-insecure",
152 '\0',
154 offsetof(options_t, discovery_insecure),
155 &default_discovery_insecure_value,
156 sizeof(bool),
157 "Skip server key verification (MITM-vulnerable, requires explicit opt-in).",
158 "SECURITY",
159 NULL,
160 false,
161 "ASCII_CHAT_DISCOVERY_INSECURE",
162 NULL,
163 NULL,
164 false,
165 false,
167 {0},
168 NULL},
169 {"discovery-service-key",
170 '\0',
172 offsetof(options_t, discovery_service_key),
173 "",
174 0,
175 "Discovery server public key for verification. Supports: raw base64 public key (AAAAC3Nz...), "
176 "SSH/GPG key files, gpg:FINGERPRINT, github:USER[.gpg], gitlab:USER[.gpg], "
177 "or HTTP(S) URLs like https://github.com/zfogg.[keys|gpg].",
178 "SECURITY",
179 NULL,
180 false,
181 "ASCII_CHAT_DISCOVERY_SERVER_KEY",
182 NULL,
183 NULL,
184 false,
185 false,
187 {0},
188 NULL},
189 {"require-server-identity",
190 '\0',
192 offsetof(options_t, require_server_identity),
193 NULL,
194 sizeof(bool),
195 "Require servers to provide signed Ed25519 identity.",
196 "SECURITY",
197 NULL,
198 false,
199 "ASCII_CHAT_REQUIRE_SERVER_IDENTITY",
200 NULL,
201 NULL,
202 false,
203 false,
205 {0},
206 NULL},
207 {"require-client-identity",
208 '\0',
210 offsetof(options_t, require_client_identity),
211 NULL,
212 sizeof(bool),
213 "Require clients to provide signed Ed25519 identity.",
214 "SECURITY",
215 NULL,
216 false,
217 "ASCII_CHAT_REQUIRE_CLIENT_IDENTITY",
218 NULL,
219 NULL,
220 false,
221 false,
223 {0},
224 NULL},
225
@ OPTION_TYPE_STRING
String value (–name foo)
Definition builder.h:164
@ OPTION_TYPE_BOOL
Boolean flag (–flag, no value)
Definition builder.h:162
@ OPTION_MODE_CLIENT
Client mode (bit 1)
@ OPTION_MODE_DISCOVERY
Discovery mode (bit 4)
@ OPTION_MODE_SERVER
Server mode (bit 0)
@ OPTION_MODE_DISCOVERY_SVC
Discovery server mode (bit 3)
Shared structures and macros for registry implementation.
#define REGISTRY_TERMINATOR()
Initialize a terminator entry (sentinel value for array end) Uses designated initializers to properly...
Custom option parsers for enum types.
const registry_entry_t g_security_entries[]
Definition security.c:18
#define bool
Definition stdbool.h:61
Consolidated options structure.
Registry entry - stores option definition with mode bitmask and metadata.