Skip to content

Commit 4ccde42

Browse files
imap: Added secured and ssl_secured flags
This adds two new boolean fields: 'secured', and 'ssl_secured' to the imap client structure, these reflect the values of conn_secured and conn_ssl_secured respectively. This is a prerequisite to integrating the imap_capability_list APIs into imap because imap needs to distinguish between secured/tls/non-secured connections when determining whether conditional capabilities should be displayed or not.
1 parent 286204a commit 4ccde42

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

src/imap/imap-client.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -233,6 +233,8 @@ struct client {
233233
bool mailbox_examined:1;
234234
bool anvil_sent:1;
235235
bool tls_compression:1;
236+
bool secured:1;
237+
bool ssl_secured:1;
236238
bool input_skip_line:1; /* skip all the data until we've
237239
found a new line */
238240
bool modseqs_sent_since_sync:1;

src/imap/main.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -285,6 +285,8 @@ int client_create_from_input(const struct mail_storage_service_input *input,
285285
event, mail_user, user, imap_set, smtp_set);
286286
client->userdb_fields = input->userdb_fields == NULL ? NULL :
287287
p_strarray_dup(client->pool, input->userdb_fields);
288+
client->secured = input->conn_secured;
289+
client->ssl_secured = input->conn_ssl_secured;
288290
event_unref(&event);
289291
*client_r = client;
290292
return 0;

0 commit comments

Comments
 (0)