13 #define NGX_DEFAULT_CIPHERS "HIGH:!aNULL:!MD5"
14 #define NGX_DEFAULT_ECDH_CURVE "prime256v1"
17 static void *ngx_mail_ssl_create_conf(
ngx_conf_t *cf);
18 static char *ngx_mail_ssl_merge_conf(
ngx_conf_t *cf,
void *parent,
void *child);
58 ngx_mail_ssl_starttls,
61 ngx_http_starttls_state },
96 &ngx_mail_ssl_protocols },
114 ngx_mail_ssl_session_cache,
136 ngx_mail_ssl_create_conf,
137 ngx_mail_ssl_merge_conf
143 &ngx_mail_ssl_module_ctx,
144 ngx_mail_ssl_commands,
193 ngx_mail_ssl_merge_conf(
ngx_conf_t *cf,
void *parent,
void *child)
242 "no \"ssl_certificate\" is defined for "
243 "the \"%s\" directive in %s:%ui",
250 "no \"ssl_certificate_key\" is defined for "
251 "the \"%s\" directive in %s:%ui",
264 "no \"ssl_certificate_key\" is defined "
265 "for certificate \"%V\"",
291 if (SSL_CTX_set_cipher_list(conf->
ssl.
ctx,
296 "SSL_CTX_set_cipher_list(\"%V\") failed",
302 SSL_CTX_set_options(conf->
ssl.
ctx, SSL_OP_CIPHER_SERVER_PREFERENCE);
345 "\"starttls\" directive conflicts with \"ssl on\"");
371 "\"ssl\" directive conflicts with \"starttls\"");
406 if (
ngx_strcmp(value[i].data,
"builtin") == 0) {
411 if (value[i].len >
sizeof(
"builtin:") - 1
412 &&
ngx_strncmp(value[i].data,
"builtin:",
sizeof(
"builtin:") - 1)
415 n =
ngx_atoi(value[i].data +
sizeof(
"builtin:") - 1,
416 value[i].len - (
sizeof(
"builtin:") - 1));
427 if (value[i].len >
sizeof(
"shared:") - 1
428 &&
ngx_strncmp(value[i].data,
"shared:",
sizeof(
"shared:") - 1)
433 for (j =
sizeof(
"shared:") - 1; j < value[
i].
len; j++) {
434 if (value[i].data[j] ==
':') {
446 name.
data = value[
i].
data +
sizeof(
"shared:") - 1;
448 size.
len = value[
i].
len - j - 1;
459 "session cache \"%V\" is too small",
466 &ngx_mail_ssl_module);
488 "invalid session cache \"%V\"", &value[i]);