]> git.ipfire.org Git - thirdparty/postfix.git/commitdiff
postfix-3.11-20250730
authorWietse Z Venema <wietse@porcupine.org>
Wed, 30 Jul 2025 05:00:00 +0000 (00:00 -0500)
committerViktor Dukhovni <ietf-dane@dukhovni.org>
Thu, 31 Jul 2025 09:13:08 +0000 (19:13 +1000)
28 files changed:
postfix/HISTORY
postfix/conf/postfix-tls-script
postfix/html/discard.8.html
postfix/html/error.8.html
postfix/html/oqmgr.8.html
postfix/html/postfix-tls.1.html
postfix/html/qmgr.8.html
postfix/html/virtual.8.html
postfix/man/man1/postfix-tls.1
postfix/man/man1/postmulti.1
postfix/man/man8/discard.8
postfix/man/man8/error.8
postfix/man/man8/oqmgr.8
postfix/man/man8/qmgr.8
postfix/man/man8/virtual.8
postfix/mantools/srctoman
postfix/proto/stop.double-history
postfix/src/discard/discard.c
postfix/src/error/error.c
postfix/src/global/config_known_tcp_ports.c
postfix/src/global/mail_version.h
postfix/src/oqmgr/qmgr.c
postfix/src/postmulti/postmulti.c
postfix/src/qmgr/qmgr.c
postfix/src/tls/tls_client.c
postfix/src/tls/tls_misc.c
postfix/src/tls/tls_verify.c
postfix/src/virtual/virtual.c

index d5658bd7acc155ae415e93842eaa83d5286fb646..db6dfb59c6e8d06e86ff5eea306245df9d77b36f 100644 (file)
@@ -29488,3 +29488,26 @@ Apologies for any names omitted.
        Postfix that would need to be converted to int64_t, or to
        long long which just like time_t is a 64-bit type on many
        ILP32 and LP64 systems.
+
+20250730
+
+       Bugfix (defect introduced: Postfix 3.6, date 20200710):
+       Postfix TLS client code logged "Untrusted TLS connection"
+       (wrong) instead of "Trusted TLS connection" (right) for a
+       resumed TLS session, when a server offered a trusted (valid
+       PKI trust chain) certificate that did not match the expected
+       server name pattern. Viktor Dukhovni. Files: tls/tls_client.c,
+       tls/tls_verify.c.
+
+       Cleanup: make the manpage extraction tooling smarter about
+       section headings, and remove the now unnecessary explicit
+       ".SH" formatting requests. This produces zero visible change
+       in formatted Postfix manpages. Files: mantools/srctoman,
+       src/global/config_known_tcp_ports.c, postmulti/postmulti.c,
+       tls/tls_misc.c.
+
+       Regenerate all manpages, causing parameter summaries to be
+       updated with new descriptions from postconf(5). Files:
+       conf/postfix-tls-script, discard/discard.c, error/error.c,
+       oqmgr/qmgr.c, postmulti/postmulti.c, qmgr/qmgr.c,
+       virtual/virtual.c.
index 997e9c52e7822c66d2a4664f8bc422724a2f2d6c..04501b481839ea71735420aa8af9fb76274f9c49 100644 (file)
 #      The location of the OpenSSL command line program \fBopenssl\fR(1).
 # .IP "\fBsmtp_tls_loglevel (0)\fR"
 #      Enable additional Postfix SMTP client logging of TLS activity.
-# .IP "\fBsmtp_tls_security_level (empty)\fR"
+# .IP "\fBsmtp_tls_security_level (Postfix >= 3.11: may; Postfix < 3.11: empty)\fR"
 #      The default SMTP TLS security level for the Postfix SMTP client.
 # .IP "\fBsmtp_tls_session_cache_database (empty)\fR"
 #      Name of the file containing the optional Postfix SMTP client
index 9d0e1ebdeb082e774bd82b680122934047a76f4f..207a0354086261d594973abbdd44a75b0284ebe2 100644 (file)
@@ -60,7 +60,7 @@ DISCARD(8)                                                          DISCARD(8)
 
        <b><a href="postconf.5.html#delay_logging_resolution_limit">delay_logging_resolution_limit</a> (2)</b>
               The maximal number of digits after the decimal point  when  log-
-              ging sub-second delay values.
+              ging delay values.
 
        <b><a href="postconf.5.html#double_bounce_sender">double_bounce_sender</a> (double-bounce)</b>
               The  sender  address of postmaster notifications that are gener-
index aee2cd8ad571c57c18869684ad6e3a9a5d7702d1..4f22acbe0eb209d1af6eb722c4a79abbbe9a969c 100644 (file)
@@ -70,7 +70,7 @@ ERROR(8)                                                              ERROR(8)
 
        <b><a href="postconf.5.html#delay_logging_resolution_limit">delay_logging_resolution_limit</a> (2)</b>
               The  maximal  number of digits after the decimal point when log-
-              ging sub-second delay values.
+              ging delay values.
 
        <b><a href="postconf.5.html#double_bounce_sender">double_bounce_sender</a> (double-bounce)</b>
               The sender address of postmaster notifications that  are  gener-
index 0bebfb533a1d30763b42b6086169c49bb1bfdea4..cc47fea4965b748aab8fb7ff1aa1d3761796c42f 100644 (file)
@@ -348,7 +348,7 @@ OQMGR(8)                                                              OQMGR(8)
 
        <b><a href="postconf.5.html#delay_logging_resolution_limit">delay_logging_resolution_limit</a> (2)</b>
               The  maximal  number of digits after the decimal point when log-
-              ging sub-second delay values.
+              ging delay values.
 
        <b><a href="postconf.5.html#helpful_warnings">helpful_warnings</a> (yes)</b>
               Log warnings about problematic configuration settings, and  pro-
index 272d98b53d1dade35e2cebc5eb29fe4c38f21f74..b94443a394e3ef9dc194235969368aeaf66e4891 100644 (file)
@@ -182,7 +182,7 @@ POSTFIX-TLS(1)                                                  POSTFIX-TLS(1)
        <b><a href="postconf.5.html#smtp_tls_loglevel">smtp_tls_loglevel</a> (0)</b>
               Enable additional Postfix SMTP client logging of TLS activity.
 
-       <b><a href="postconf.5.html#smtp_tls_security_level">smtp_tls_security_level</a> (empty)</b>
+       <b><a href="postconf.5.html#smtp_tls_security_level">smtp_tls_security_level</a> (Postfix</b> &gt;<b>= 3.11: may; Postfix</b> &lt; <b>3.11: empty)</b>
               The default SMTP TLS security level for the Postfix SMTP client.
 
        <b><a href="postconf.5.html#smtp_tls_session_cache_database">smtp_tls_session_cache_database</a> (empty)</b>
index 3e6249e74cbafd9ad88a018db8514a4670d47a90..575f6d7cb4b9d232af808c9b78cbbf41915b1cf2 100644 (file)
@@ -426,7 +426,7 @@ QMGR(8)                                                                QMGR(8)
 
        <b><a href="postconf.5.html#delay_logging_resolution_limit">delay_logging_resolution_limit</a> (2)</b>
               The  maximal  number of digits after the decimal point when log-
-              ging sub-second delay values.
+              ging delay values.
 
        <b><a href="postconf.5.html#helpful_warnings">helpful_warnings</a> (yes)</b>
               Log warnings about problematic configuration settings, and  pro-
index 880018fcba49216aa8080bb020c551d6eb6fefe4..b72652aaaf8f6466bea870896507d66c3d9db9ef 100644 (file)
@@ -233,7 +233,7 @@ VIRTUAL(8)                                                          VIRTUAL(8)
 
        <b><a href="postconf.5.html#delay_logging_resolution_limit">delay_logging_resolution_limit</a> (2)</b>
               The  maximal  number of digits after the decimal point when log-
-              ging sub-second delay values.
+              ging delay values.
 
        <b><a href="postconf.5.html#ipc_timeout">ipc_timeout</a> (3600s)</b>
               The time limit for sending  or  receiving  information  over  an
index 4e8cb92794fdf8dad2fbe9b8b685e5fab00206b2..2a6025c6a33cb79fefaae6d253d52dfa1dbfc57b 100644 (file)
@@ -185,7 +185,7 @@ configuration files.
 The location of the OpenSSL command line program \fBopenssl\fR(1).
 .IP "\fBsmtp_tls_loglevel (0)\fR"
 Enable additional Postfix SMTP client logging of TLS activity.
-.IP "\fBsmtp_tls_security_level (empty)\fR"
+.IP "\fBsmtp_tls_security_level (Postfix >= 3.11: may; Postfix < 3.11: empty)\fR"
 The default SMTP TLS security level for the Postfix SMTP client.
 .IP "\fBsmtp_tls_session_cache_database (empty)\fR"
 Name of the file containing the optional Postfix SMTP client
index 6db035ea196793fe1da5888dee41cc96ab988f81..96c597e9437d4a6800878485611d0c17362aa099 100644 (file)
@@ -95,6 +95,10 @@ command is performed just for the primary instance.
 .PP
 Iterator mode implements the following command options:
 .SH "Instance selection"
+.na
+.nf
+.ad
+.fi
 .IP \fB\-a\fR
 Perform the operation on all instances. This is the default.
 .IP "\fB\-g \fIgroup\fR"
@@ -111,10 +115,18 @@ are started before "source" instances.
 .sp
 This option cannot be used with \fB\-p\fR.
 .SH "List mode"
+.na
+.nf
+.ad
+.fi
 .IP \fB\-l\fR
 List Postfix instances with their instance name, instance
 group name, enable/disable status and configuration directory.
-.SH "Postfix\-wrapper mode"
+.SH "Postfix-wrapper mode"
+.na
+.nf
+.ad
+.fi
 .IP "\fB\-p \fIpostfix\-command\fR"
 Invoke \fBpostfix(1)\fR to execute \fIpostfix\-command\fR.
 This option implements the \fBpostfix\-wrapper\fR(5) interface.
@@ -146,6 +158,10 @@ invoke \fBpostmulti\fR(1) as follows:
 # postmulti \-g msa \-p start
 .RE
 .SH "Command mode"
+.na
+.nf
+.ad
+.fi
 .IP "\fB\-x \fIunix\-command\fR"
 Execute the specified \fIunix\-command\fR for all Postfix instances.
 The command runs with appropriate environment settings for
@@ -154,6 +170,10 @@ config_directory, queue_directory, data_directory,
 multi_instance_name, multi_instance_group and
 multi_instance_enable.
 .SH "Other options"
+.na
+.nf
+.ad
+.fi
 .IP \fB\-v\fR
 Enable verbose logging for debugging purposes. Multiple
 \fB\-v\fR options make the software increasingly verbose.
@@ -168,6 +188,10 @@ multi\-instance status of an existing instance.
 .PP
 The following options are implemented:
 .SH "Existing instance selection"
+.na
+.nf
+.ad
+.fi
 .IP \fB\-a\fR
 When creating or importing an instance, place the new
 instance at the front of the secondary instance list.
@@ -183,6 +207,10 @@ With other life\-cycle operations, apply the operation to
 the named existing instance.  Specify "\-" to select the
 primary Postfix instance.
 .SH "New or existing instance name assignment"
+.na
+.nf
+.ad
+.fi
 .IP "\fB\-I \fIname\fR"
 Assign the specified instance \fIname\fR to an existing
 instance, newly\-created instance, or imported instance.
@@ -194,6 +222,10 @@ likelihood of name collisions with system files.
 Assign the specified \fIgroup\fR name to an existing instance
 or to a newly created or imported instance.
 .SH "Instance creation/deletion/status change"
+.na
+.nf
+.ad
+.fi
 .IP "\fB\-e \fIaction\fR"
 "Edit" managed instances. The following actions are supported:
 .RS
@@ -315,6 +347,10 @@ the instance will not be started etc. with "postfix start",
 "postmulti \-p start" and so on. The instance can still be
 started etc. with "postfix \-c config\-directory start".
 .SH "Other options"
+.na
+.nf
+.ad
+.fi
 .IP \fB\-v\fR
 Enable verbose logging for debugging purposes. Multiple
 \fB\-v\fR options make the software increasingly verbose.
index 7823891490585713ee9af3e0340e9d8f021ac22f..6f01d86a663d8ea98cbabbfdcba1de60d5db4711 100644 (file)
@@ -67,7 +67,7 @@ How much time a Postfix daemon process may take to handle a
 request before it is terminated by a built\-in watchdog timer.
 .IP "\fBdelay_logging_resolution_limit (2)\fR"
 The maximal number of digits after the decimal point when logging
-sub\-second delay values.
+delay values.
 .IP "\fBdouble_bounce_sender (double\-bounce)\fR"
 The sender address of postmaster notifications that are generated
 by the mail system.
index f0dae3be9db7b1e95cf516a6ab773453b79fde35..08c9e158ed52d984e17b80c70ba481d92dd760a7 100644 (file)
@@ -75,7 +75,7 @@ How much time a Postfix daemon process may take to handle a
 request before it is terminated by a built\-in watchdog timer.
 .IP "\fBdelay_logging_resolution_limit (2)\fR"
 The maximal number of digits after the decimal point when logging
-sub\-second delay values.
+delay values.
 .IP "\fBdouble_bounce_sender (double\-bounce)\fR"
 The sender address of postmaster notifications that are generated
 by the mail system.
index 61b4299ab59948bbfa7bfd043c56d62589c17a01..6ea0cede1269cfd0d0a360c7440c8713e806c00b 100644 (file)
@@ -347,7 +347,7 @@ The names of message delivery transports that should not deliver mail
 unless someone issues "\fBsendmail \-q\fR" or equivalent.
 .IP "\fBdelay_logging_resolution_limit (2)\fR"
 The maximal number of digits after the decimal point when logging
-sub\-second delay values.
+delay values.
 .IP "\fBhelpful_warnings (yes)\fR"
 Log warnings about problematic configuration settings, and provide
 helpful suggestions.
index ca1fd4c797b4be11d7933c9c7f336eb53649b886..6be3f8bb1bf1d3b7673d9ef9f95ae62b2eb06c0b 100644 (file)
@@ -411,7 +411,7 @@ The names of message delivery transports that should not deliver mail
 unless someone issues "\fBsendmail \-q\fR" or equivalent.
 .IP "\fBdelay_logging_resolution_limit (2)\fR"
 The maximal number of digits after the decimal point when logging
-sub\-second delay values.
+delay values.
 .IP "\fBhelpful_warnings (yes)\fR"
 Log warnings about problematic configuration settings, and provide
 helpful suggestions.
index 746fc0df23ef72d10c04ea4d6631a8e69aff5602..68e2382c448c003eebf5f000fa853b6a79ab71ea 100644 (file)
@@ -263,7 +263,7 @@ How much time a Postfix daemon process may take to handle a
 request before it is terminated by a built\-in watchdog timer.
 .IP "\fBdelay_logging_resolution_limit (2)\fR"
 The maximal number of digits after the decimal point when logging
-sub\-second delay values.
+delay values.
 .IP "\fBipc_timeout (3600s)\fR"
 The time limit for sending or receiving information over an internal
 communication channel.
index e48f379cd1007c8de7c750d49b16ce47e45c7138..3959be583e93a5ed47b2ea68514631629f27596f 100755 (executable)
@@ -92,7 +92,7 @@ do
        /^HISTORY/s//.SH &\
 .ad\
 .fi/
-       /^[A-Z][A-Z][A-Z][^a-z]*$/s//.SH "&"\
+       /^[A-Z][A-Za-z][A-Za-z].*$/s//.SH "&"\
 .na\
 .nf/
        p
index 45bfd7fb71cd81b68f8804d837f8cb02e376a675..4b800e3ab60a38a682192650ccb11b950389d088 100644 (file)
@@ -189,3 +189,7 @@ proto  proto COMPATIBILITY_README html
  long long which just like time_t is a 64 bit type on many
  File tls tls h
  dual purpose field File tls tls h 
+ conf postfix tls script discard discard c error error c 
+ oqmgr qmgr c postmulti postmulti c qmgr qmgr c 
+ src global config_known_tcp_ports c postmulti postmulti c 
+ virtual virtual c 
index 331f96fbda3c8fcc328f0e8f03457e00dd9ad591..f21b95cbc36d2f0c7b938c214adbf392ef40d3c7 100644 (file)
@@ -53,7 +53,7 @@
 /*     request before it is terminated by a built-in watchdog timer.
 /* .IP "\fBdelay_logging_resolution_limit (2)\fR"
 /*     The maximal number of digits after the decimal point when logging
-/*     sub-second delay values.
+/*     delay values.
 /* .IP "\fBdouble_bounce_sender (double-bounce)\fR"
 /*     The sender address of postmaster notifications that are generated
 /*     by the mail system.
index 61e805b0d805d8cf4ab67ef378bfd474369a7c70..e1ff1cb7ccafc1be4279d6add1f86988f9db59aa 100644 (file)
@@ -61,7 +61,7 @@
 /*     request before it is terminated by a built-in watchdog timer.
 /* .IP "\fBdelay_logging_resolution_limit (2)\fR"
 /*     The maximal number of digits after the decimal point when logging
-/*     sub-second delay values.
+/*     delay values.
 /* .IP "\fBdouble_bounce_sender (double-bounce)\fR"
 /*     The sender address of postmaster notifications that are generated
 /*     by the mail system.
index 563bbd356d4cdc7cccf9e5514e4a1d29c269c5fd..db61f4aae5c1e9b544643b4807b497c6d4460000 100644 (file)
 /*     in the settings argument, and reports any warnings to the standard
 /*     error stream. The source argument is used to provide warning
 /*     context. It typically is a configuration parameter name.
-/* .SH EXPECTED SYNTAX (ABNF)
+/* EXPECTED SYNTAX (ABNF)
 /*     configuration = empty | name-to-port *("," name-to-port)
 /*     name-to-port = 1*(name "=") port
-/* SH EXAMPLES
+/* EXAMPLES
 /*     In the example below, the whitespace is optional.
 /*     smtp = 25, smtps = submissions = 465, submission = 587
 /* LICENSE
index 8ef93f86d08341c32c6874ab6d6f93c111dec845..56b86a41497ae7da343ecf90acc618cff5eaf721 100644 (file)
@@ -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      "20250729"
+#define MAIL_RELEASE_DATE      "20250730"
 #define MAIL_VERSION_NUMBER    "3.11"
 
 #ifdef SNAPSHOT
index 02573f161164842878fb7f29321bf516c82c5450..11859a871d859a7c7832871c55d7d47ea7f92a5d 100644 (file)
 /*     unless someone issues "\fBsendmail -q\fR" or equivalent.
 /* .IP "\fBdelay_logging_resolution_limit (2)\fR"
 /*     The maximal number of digits after the decimal point when logging
-/*     sub-second delay values.
+/*     delay values.
 /* .IP "\fBhelpful_warnings (yes)\fR"
 /*     Log warnings about problematic configuration settings, and provide
 /*     helpful suggestions.
index 5adcd272cacf43ecda41bc3becf20b23ed381912..ccb85afa869f8bbc7d7eee3874edab839b70b008 100644 (file)
@@ -84,7 +84,9 @@
 /*     command is performed just for the primary instance.
 /* .PP
 /*     Iterator mode implements the following command options:
-/* .SH "Instance selection"
+/* Instance selection
+/* .ad
+/* .fi
 /* .IP \fB-a\fR
 /*     Perform the operation on all instances. This is the default.
 /* .IP "\fB-g \fIgroup\fR"
 /*     are started before "source" instances.
 /* .sp
 /*     This option cannot be used with \fB-p\fR.
-/* .SH "List mode"
+/* List mode
+/* .ad
+/* .fi
 /* .IP \fB-l\fR
 /*     List Postfix instances with their instance name, instance
 /*     group name, enable/disable status and configuration directory.
-/* .SH "Postfix-wrapper mode"
+/* Postfix-wrapper mode
+/* .ad
+/* .fi
 /* .IP "\fB-p \fIpostfix-command\fR"
 /*     Invoke \fBpostfix(1)\fR to execute \fIpostfix-command\fR.
 /*     This option implements the \fBpostfix-wrapper\fR(5) interface.
 /* .IP
 /*     # postmulti -g msa -p start
 /* .RE
-/* .SH "Command mode"
+/* Command mode
+/* .ad
+/* .fi
 /* .IP "\fB-x \fIunix-command\fR"
 /*     Execute the specified \fIunix-command\fR for all Postfix instances.
 /*     The command runs with appropriate environment settings for
 /*     config_directory, queue_directory, data_directory,
 /*     multi_instance_name, multi_instance_group and
 /*     multi_instance_enable.
-/* .SH "Other options"
+/* Other options
+/* .ad
+/* .fi
 /* .IP \fB-v\fR
 /*     Enable verbose logging for debugging purposes. Multiple
 /*     \fB-v\fR options make the software increasingly verbose.
 /*     multi-instance status of an existing instance.
 /* .PP
 /*     The following options are implemented:
-/* .SH "Existing instance selection"
+/* Existing instance selection
+/* .ad
+/* .fi
 /* .IP \fB-a\fR
 /*     When creating or importing an instance, place the new
 /*     instance at the front of the secondary instance list.
 /*     With other life-cycle operations, apply the operation to
 /*     the named existing instance.  Specify "-" to select the
 /*     primary Postfix instance.
-/* .SH "New or existing instance name assignment"
+/* New or existing instance name assignment
+/* .ad
+/* .fi
 /* .IP "\fB-I \fIname\fR"
 /*     Assign the specified instance \fIname\fR to an existing
 /*     instance, newly-created instance, or imported instance.
 /* .IP "\fB-G \fIgroup\fR"
 /*     Assign the specified \fIgroup\fR name to an existing instance
 /*     or to a newly created or imported instance.
-/* .SH "Instance creation/deletion/status change"
+/* Instance creation/deletion/status change
+/* .ad
+/* .fi
 /* .IP "\fB-e \fIaction\fR"
 /*     "Edit" managed instances. The following actions are supported:
 /* .RS
 /*     the instance will not be started etc. with "postfix start",
 /*     "postmulti -p start" and so on. The instance can still be
 /*     started etc. with "postfix -c config-directory start".
-/* .SH "Other options"
+/* Other options
+/* .ad
+/* .fi
 /* .IP \fB-v\fR
 /*     Enable verbose logging for debugging purposes. Multiple
 /*     \fB-v\fR options make the software increasingly verbose.
index 25168e482c7d63cc9b66790640ed24bf7ac15db0..d3048d1c78105338124da17d2337f2dd6a6d4eb0 100644 (file)
 /*     unless someone issues "\fBsendmail -q\fR" or equivalent.
 /* .IP "\fBdelay_logging_resolution_limit (2)\fR"
 /*     The maximal number of digits after the decimal point when logging
-/*     sub-second delay values.
+/*     delay values.
 /* .IP "\fBhelpful_warnings (yes)\fR"
 /*     Log warnings about problematic configuration settings, and provide
 /*     helpful suggestions.
index babdbf40b93f88d6003aec1b2cf118fefbe5b2e0..02db1d56f2667a7da3f75f8958716044354496fa 100644 (file)
@@ -319,6 +319,7 @@ static void uncache_session(SSL_CTX *ctx, TLS_SESS_STATE *TLScontext)
 static void verify_x509(TLS_SESS_STATE *TLScontext, X509 *peercert,
                                const TLS_CLIENT_START_PROPS *props)
 {
+    int     x509_err = SSL_get_verify_result(TLScontext->con);
 
     /*
      * On exit both peer_CN and issuer_CN should be set.
@@ -330,7 +331,7 @@ static void verify_x509(TLS_SESS_STATE *TLScontext, X509 *peercert,
      * Is the certificate trust chain trusted and matched?  Any required name
      * checks are now performed internally in OpenSSL.
      */
-    if (SSL_get_verify_result(TLScontext->con) == X509_V_OK) {
+    if (x509_err == X509_V_OK) {
        TLScontext->peer_status |= TLS_CERT_FLAG_TRUSTED;
        if (TLScontext->must_fail) {
            msg_panic("%s: cert valid despite trust init failure",
@@ -363,8 +364,7 @@ static void verify_x509(TLS_SESS_STATE *TLScontext, X509 *peercert,
            }
        }
     } else if (TLS_MUST_MATCH(TLScontext->level) &&
-              TLScontext->errordepth == 0 &&
-              TLScontext->errorcode == X509_V_ERR_HOSTNAME_MISMATCH) {
+              x509_err == X509_V_ERR_HOSTNAME_MISMATCH) {
        /*
         * If the only error is a hostname mismatch, the certificate must have
         * been trusted.
index d4cbe2bb91e27ea4410d1ff0c59055d10c9a36ff..6cc38cc401bdd09de3d8a5c21793816aca9bb657 100644 (file)
@@ -4,9 +4,7 @@
 /* SUMMARY
 /*     miscellaneous TLS support routines
 /* SYNOPSIS
-/* .SH Public functions
-/* .nf
-/* .na
+/* Public functions
 /*     #include <tls.h>
 /*
 /*     void tls_log_summary(role, usage, TLScontext)
@@ -23,9 +21,7 @@
 /*     void    tls_pre_jail_init(TLS_ROLE)
 /*     TLS_ROLE role;
 /*
-/* .SH Internal functions
-/* .nf
-/* .na
+/* Internal functions
 /*     #define TLS_INTERNAL
 /*     #include <tls.h>
 /*
index deb3ae8d3a0d757b0048b31f37dc2103656d1ae0..9c7191c456eeeb166064647023ce61452975112e 100644 (file)
 
 /* update_error_state - safely stash away error state */
 
-static void update_error_state(TLS_SESS_STATE *TLScontext, int depth,
-                                      X509 *errorcert, int errorcode)
+static void update_error_state(X509_STORE_CTX *ctx, TLS_SESS_STATE *TLScontext,
+                                 int depth, X509 *errorcert, int errorcode)
 {
+
     /*
      * Report the error that is closest to the leaf certificate, any errors
      * higher up the chain are immaterial until the "inner" errors are fixed.
@@ -132,11 +133,12 @@ static void update_error_state(TLS_SESS_STATE *TLScontext, int depth,
      * with a hostname mismatch.  Any other error has a higher priority.
      */
     if (TLScontext->errordepth >= 0) {
-       if (TLScontext->errordepth <= depth &&
-           TLScontext->errorcode != X509_V_ERR_HOSTNAME_MISMATCH)
-           return;
-       if (errorcode == X509_V_ERR_HOSTNAME_MISMATCH)
+       if ((TLScontext->errordepth <= depth &&
+            TLScontext->errorcode != X509_V_ERR_HOSTNAME_MISMATCH) ||
+           errorcode == X509_V_ERR_HOSTNAME_MISMATCH) {
+           X509_STORE_CTX_set_error(ctx, TLScontext->errorcode);
            return;
+       }
     }
 
     /*
@@ -191,12 +193,12 @@ int     tls_verify_certificate_callback(int ok, X509_STORE_CTX *ctx)
     if (TLScontext->must_fail) {
        if (depth == 0) {
            X509_STORE_CTX_set_error(ctx, err = X509_V_ERR_UNSPECIFIED);
-           update_error_state(TLScontext, depth, cert, err);
+           update_error_state(ctx, TLScontext, depth, cert, err);
        }
        return (1);
     }
     if (ok == 0)
-       update_error_state(TLScontext, depth, cert, err);
+       update_error_state(ctx, TLScontext, depth, cert, err);
 
     if (TLScontext->log_mask & TLS_LOG_VERBOSE) {
        if (cert) {
index 6fa9f1e67e4a43f3dfb1db0832d3ea78388ff74c..ed8025352c7837299440aa97e808541d5c955f46 100644 (file)
 /*     request before it is terminated by a built-in watchdog timer.
 /* .IP "\fBdelay_logging_resolution_limit (2)\fR"
 /*     The maximal number of digits after the decimal point when logging
-/*     sub-second delay values.
+/*     delay values.
 /* .IP "\fBipc_timeout (3600s)\fR"
 /*     The time limit for sending or receiving information over an internal
 /*     communication channel.