/* Now explode the ssl_options string into individual flags */
/* First set them all to defaults */
set->parsed_opts.compression = TRUE;
+ set->parsed_opts.tickets = TRUE;
/* Then modify anything specified in the string */
const char **opts = t_strsplit_spaces(set->ssl_options, ", ");
while ((opt = *opts++) != NULL) {
if (strcasecmp(opt, "no_compression") == 0) {
set->parsed_opts.compression = FALSE;
+ } else if (strcasecmp(opt, "no_ticket") == 0) {
+ set->parsed_opts.tickets = FALSE;
} else {
*error_r = t_strdup_printf("ssl_options: unknown flag: '%s'",
opt);
/* These are derived from ssl_options, not set directly */
struct {
bool compression;
+ bool tickets;
} parsed_opts;
};
#ifdef SSL_OP_NO_COMPRESSION
if (!set->compression)
ssl_ops |= SSL_OP_NO_COMPRESSION;
+#endif
+#ifdef SSL_OP_NO_TICKET
+ if (!set->tickets)
+ ssl_ops |= SSL_OP_NO_TICKET;
#endif
SSL_CTX_set_options(ctx->ssl_ctx, ssl_ops);
#ifdef SSL_MODE_RELEASE_BUFFERS
bool require_valid_cert; /* stream-only */
bool prefer_server_ciphers;
bool compression;
+ bool tickets;
};
/* Returns 0 if ok, -1 and sets error_r if failed. The returned error string
bool verify_client_cert;
bool prefer_server_ciphers;
bool compression;
+ bool tickets;
};
static int extdata_index;
login_set->auth_ssl_username_from_cert;
lookup_ctx.prefer_server_ciphers = set->ssl_prefer_server_ciphers;
lookup_ctx.compression = set->parsed_opts.compression;
+ lookup_ctx.tickets = set->parsed_opts.tickets;
ctx = hash_table_lookup(ssl_servers, &lookup_ctx);
if (ctx == NULL)
#ifdef SSL_OP_NO_COMPRESSION
if (!set->parsed_opts.compression)
ssl_ops |= SSL_OP_NO_COMPRESSION;
+#endif
+#ifdef SSL_OP_NO_TICKET
+ if (!set->parsed_opts.tickets)
+ ssl_ops |= SSL_OP_NO_TICKET;
#endif
SSL_CTX_set_options(ssl_ctx, ssl_ops);
login_set->auth_ssl_username_from_cert;
ctx->prefer_server_ciphers = ssl_set->ssl_prefer_server_ciphers;
ctx->compression = ssl_set->parsed_opts.compression;
+ ctx->tickets = ssl_set->parsed_opts.tickets;
ctx->ctx = ssl_ctx = SSL_CTX_new(SSLv23_server_method());
if (ssl_ctx == NULL)