diff --git a/postfix/HISTORY b/postfix/HISTORY
index a6c374f94..fd45ffe07 100644
--- a/postfix/HISTORY
+++ b/postfix/HISTORY
@@ -15799,8 +15799,8 @@ Apologies for any names omitted.
tls/tls_dh.c, tls/tls_server.c.
Portability: Mac OS 10.6.3 requires
The internet domain name of this mail system. The default is to
-use $myhostname minus the first component. $mydomain is used as
+use $myhostname minus the first component, or "localdomain" (Postfix
+2.3 and later). $mydomain is used as
a default value for many other configuration parameters.
The internet hostname of this mail system. The default is to use
-the fully-qualified domain name from gethostname(). $myhostname is
-used as a default value for many other configuration parameters.
-
Example: @@ -9457,6 +9459,10 @@ file may also be used to augment the client certificate trust chain, but it is best to include all the required certificates directly in $smtp_tls_cert_file.
+Specify "tls_append_default_CA = no" to prevent Postfix from +appending the system-supplied default CAs and trusting third-party +certificates. This setting is default as of Postfix 2.8.
+Example:
@@ -9480,6 +9486,10 @@ with, for example, "$OPENSSL_HOME/bin/c_rehash /etc/postfix/certs".To use this option in chroot mode, this directory (or a copy) must be inside the chroot jail.
+Specify "tls_append_default_CA = no" to prevent Postfix from +appending the system-supplied default CAs and trusting third-party +certificates. This setting is default as of Postfix 2.8.
+Example:
@@ -11131,8 +11141,10 @@ authenticated via the RFC 4954
Specify "tls_append_default_CA = no" to prevent Postfix from +appending the system-supplied default CAs and trusting third-party +certificates. This setting is default as of Postfix 2.8.
+By default (see smtpd_tls_ask_ccert), client certificates are not requested, and smtpd_tls_CAfile should remain empty. If you do make use of client certificates, the distinguished names (DNs) of the certificate @@ -12976,6 +12992,10 @@ for example, "$OPENSSL_HOME/bin/c_rehash /etc/postfix/certs". To use smtpd_tls_CApath in chroot mode, this directory (or a copy) must be inside the chroot jail.
+Specify "tls_append_default_CA = no" to prevent Postfix from +appending the system-supplied default CAs and trusting third-party +certificates. This setting is default as of Postfix 2.8.
+By default (see smtpd_tls_ask_ccert), client certificates are not requested, and smtpd_tls_CApath should remain empty. In contrast to smtpd_tls_CAfile, DNs of certificate authorities installed @@ -14087,6 +14107,23 @@ connections. Next, you enable Postfix TCP servers with the updated
This feature is available in Postfix 2.6 and later.
+ + +Append the system-supplied default certificate authority +certificates to the ones specified with *_tls_CApath or *_tls_CAfile. +
+ +To avoid massive compatibility breaks, this parameter defaults +to "yes" for Postfix versions 2.7 and earlier. That is, they trust +third-party certificates and they give relay permission with +permit_tls_all_clientcerts.
+ +This feature is retroactive in Postfix 2.4 and later.
+ +The internet domain name of this mail system. The default is to -use $myhostname minus the first component. $mydomain is used as +use $myhostname minus the first component, or "localdomain" (Postfix +2.3 and later). $mydomain is used as a default value for many other configuration parameters.
@@ -2900,9 +2901,10 @@ mydomain = domain.tldThe internet hostname of this mail system. The default is to use -the fully-qualified domain name from gethostname(). $myhostname is -used as a default value for many other configuration parameters. -
+the fully-qualified domain name (FQDN) from gethostname(), or to +use the non-FQDN result from gethostname() and append ".$mydomain". +$myhostname is used as a default value for many other configuration +parameters.Example: @@ -4858,8 +4860,10 @@ authenticated via the RFC 4954 (AUTH) protocol.
Specify "tls_append_default_CA = no" to prevent Postfix from +appending the system-supplied default CAs and trusting third-party +certificates. This setting is default as of Postfix 2.8.
+By default (see smtpd_tls_ask_ccert), client certificates are not requested, and smtpd_tls_CAfile should remain empty. If you do make use of client certificates, the distinguished names (DNs) of the certificate @@ -8699,6 +8707,10 @@ for example, "$OPENSSL_HOME/bin/c_rehash /etc/postfix/certs". To use smtpd_tls_CApath in chroot mode, this directory (or a copy) must be inside the chroot jail.
+Specify "tls_append_default_CA = no" to prevent Postfix from +appending the system-supplied default CAs and trusting third-party +certificates. This setting is default as of Postfix 2.8.
+By default (see smtpd_tls_ask_ccert), client certificates are not requested, and smtpd_tls_CApath should remain empty. In contrast to smtpd_tls_CAfile, DNs of certificate authorities installed @@ -9067,6 +9079,10 @@ file may also be used to augment the client certificate trust chain, but it is best to include all the required certificates directly in $smtp_tls_cert_file.
+Specify "tls_append_default_CA = no" to prevent Postfix from +appending the system-supplied default CAs and trusting third-party +certificates. This setting is default as of Postfix 2.8.
+Example:
@@ -9086,6 +9102,10 @@ with, for example, "$OPENSSL_HOME/bin/c_rehash /etc/postfix/certs".To use this option in chroot mode, this directory (or a copy) must be inside the chroot jail.
+Specify "tls_append_default_CA = no" to prevent Postfix from +appending the system-supplied default CAs and trusting third-party +certificates. This setting is default as of Postfix 2.8.
+Example:
@@ -9375,6 +9395,19 @@ smtp_tls_dcert_file = /etc/postfix/client-dsa.pemThis feature is available in Postfix 2.2 and later.
+%PARAM tls_append_default_CA no + +Append the system-supplied default certificate authority +certificates to the ones specified with *_tls_CApath or *_tls_CAfile. +
+ +To avoid massive compatibility breaks, this parameter defaults +to "yes" for Postfix versions 2.7 and earlier. That is, they trust +third-party certificates and they give relay permission with +permit_tls_all_clientcerts.
+ +This feature is retroactive in Postfix 2.4 and later.
+ %PARAM tls_random_exchange_name see "postconf -d" outputName of the pseudo random number generator (PRNG) state file diff --git a/postfix/src/global/mail_params.h b/postfix/src/global/mail_params.h index 8861b8245..1d4be1e99 100644 --- a/postfix/src/global/mail_params.h +++ b/postfix/src/global/mail_params.h @@ -623,6 +623,10 @@ extern bool var_stat_home_dir; #define DEF_DUP_FILTER_LIMIT 1000 extern int var_dup_filter_limit; +#define VAR_TLS_APPEND_DEF_CA "tls_append_default_CA" +#define DEF_TLS_APPEND_DEF_CA 0 /* 1 for Postfix < 2.8 */ +extern bool var_tls_append_def_CA; + #define VAR_TLS_RAND_EXCH_NAME "tls_random_exchange_name" #define DEF_TLS_RAND_EXCH_NAME "${data_directory}/prng_exch" extern char *var_tls_rand_exch_name; diff --git a/postfix/src/global/mail_version.h b/postfix/src/global/mail_version.h index e621dd140..f2bfc7139 100644 --- a/postfix/src/global/mail_version.h +++ b/postfix/src/global/mail_version.h @@ -20,7 +20,7 @@ * Patches change both the patchlevel and the release date. Snapshots have no * patchlevel; they change the release date only. */ -#define MAIL_RELEASE_DATE "20100603" +#define MAIL_RELEASE_DATE "20100610" #define MAIL_VERSION_NUMBER "2.8" #ifdef SNAPSHOT diff --git a/postfix/src/tls/Makefile.in b/postfix/src/tls/Makefile.in index 1a8e26da7..918a9732f 100644 --- a/postfix/src/tls/Makefile.in +++ b/postfix/src/tls/Makefile.in @@ -101,6 +101,7 @@ tls_bio_ops.o: ../../include/vstring.h tls_bio_ops.o: tls.h tls_bio_ops.o: tls_bio_ops.c tls_certkey.o: ../../include/argv.h +tls_certkey.o: ../../include/mail_params.h tls_certkey.o: ../../include/msg.h tls_certkey.o: ../../include/name_code.h tls_certkey.o: ../../include/name_mask.h diff --git a/postfix/src/tls/tls_certkey.c b/postfix/src/tls/tls_certkey.c index 913b67e23..504c18627 100644 --- a/postfix/src/tls/tls_certkey.c +++ b/postfix/src/tls/tls_certkey.c @@ -70,6 +70,10 @@ #include
+/* Global library. */ + +#include + /* TLS library. */ #define TLS_INTERNAL @@ -91,7 +95,7 @@ int tls_set_ca_certificate_info(SSL_CTX *ctx, const char *CAfile, tls_print_errors(); return (-1); } - if (!SSL_CTX_set_default_verify_paths(ctx)) { + if (var_tls_append_def_CA && !SSL_CTX_set_default_verify_paths(ctx)) { msg_info("cannot set certificate verification paths: " "disabling TLS support"); tls_print_errors(); diff --git a/postfix/src/tls/tls_misc.c b/postfix/src/tls/tls_misc.c index 8f12fe166..c1fd1c52a 100644 --- a/postfix/src/tls/tls_misc.c +++ b/postfix/src/tls/tls_misc.c @@ -15,6 +15,7 @@ /* char *var_tls_eecdh_strong; /* char *var_tls_eecdh_ultra; /* int var_tls_daemon_rand_bytes; +/* bool var_tls_append_def_CA; /* /* TLS_APPL_STATE *tls_alloc_app_context(ssl_ctx) /* SSL_CTX *ssl_ctx; @@ -190,6 +191,7 @@ char *var_tls_null_clist; int var_tls_daemon_rand_bytes; char *var_tls_eecdh_strong; char *var_tls_eecdh_ultra; +bool var_tls_append_def_CA; /* * Index to attach TLScontext pointers to SSL objects, so that they can be @@ -407,6 +409,10 @@ void tls_param_init(void) VAR_TLS_DAEMON_RAND_BYTES, DEF_TLS_DAEMON_RAND_BYTES, &var_tls_daemon_rand_bytes, 1, 0, 0, }; + static const CONFIG_BOOL_TABLE bool_table[] = { + VAR_TLS_APPEND_DEF_CA, DEF_TLS_APPEND_DEF_CA, &var_tls_append_def_CA, + 0, + }; static int init_done; if (init_done)