From 979c94de3724ac38bf79ecc3da55368bbe8e9ad0 Mon Sep 17 00:00:00 2001 From: Travis Cross Date: Tue, 26 May 2015 14:01:31 +0000 Subject: [PATCH] FS-7708: Fix docs on enabling cert CN/SAN validation The correct incantations to enable certification common name / subject alternative name verification, per our code, are `subjects_all`, `subjects_in`, and `subjects_out` in a Sofia profile's `tls-verify-policy`. What we've had in our examples and documentation for years are `all_subjects`, `in_subjects`, and `out_subjects`. The result of this is that we've almost certainly confused people into using the incorrect forms. Those poor people will believe that they are verifying the CN/SAN of the received host certificate against the list in `tls-verify-in-subjects` when in fact they are not. One clear issue in this case was that the incorrect forms failed to have any effect without providing any warning or error. This issue could not have persisted if we had made more noise about incorrect input. Given how long this has been broken, it's tempting to alias the incorrect forms to the correct ones. However this would certainly break many existing installations that have, because of this error, never actually tested their setup with CN/SAN validation enabled. In this commit, we fix the examples and documentation, and add an error-level log output when unknown values are passed to `tls-verify-policy`. Thanks-to: Andrew Patrikalakis --- conf/rayo/sip_profiles/external.xml | 2 +- conf/vanilla/sip_profiles/external-ipv6.xml | 2 +- conf/vanilla/sip_profiles/external.xml | 2 +- conf/vanilla/sip_profiles/internal.xml | 2 +- src/mod/endpoints/mod_sofia/conf/sofia.conf.xml | 2 +- src/mod/endpoints/mod_sofia/sofia_glue.c | 4 ++++ 6 files changed, 9 insertions(+), 5 deletions(-) diff --git a/conf/rayo/sip_profiles/external.xml b/conf/rayo/sip_profiles/external.xml index 60266004a4..952e6c7848 100644 --- a/conf/rayo/sip_profiles/external.xml +++ b/conf/rayo/sip_profiles/external.xml @@ -84,7 +84,7 @@ - + diff --git a/conf/vanilla/sip_profiles/external-ipv6.xml b/conf/vanilla/sip_profiles/external-ipv6.xml index 7dc5906c5f..be70ff3b1e 100644 --- a/conf/vanilla/sip_profiles/external-ipv6.xml +++ b/conf/vanilla/sip_profiles/external-ipv6.xml @@ -84,7 +84,7 @@ - + diff --git a/conf/vanilla/sip_profiles/external.xml b/conf/vanilla/sip_profiles/external.xml index 6edc878c06..dfc9504bcb 100644 --- a/conf/vanilla/sip_profiles/external.xml +++ b/conf/vanilla/sip_profiles/external.xml @@ -84,7 +84,7 @@ - + diff --git a/conf/vanilla/sip_profiles/internal.xml b/conf/vanilla/sip_profiles/internal.xml index 1788780601..ccc9893eb4 100644 --- a/conf/vanilla/sip_profiles/internal.xml +++ b/conf/vanilla/sip_profiles/internal.xml @@ -204,7 +204,7 @@ - + diff --git a/src/mod/endpoints/mod_sofia/conf/sofia.conf.xml b/src/mod/endpoints/mod_sofia/conf/sofia.conf.xml index 2e1a849e41..46095e9a6d 100644 --- a/src/mod/endpoints/mod_sofia/conf/sofia.conf.xml +++ b/src/mod/endpoints/mod_sofia/conf/sofia.conf.xml @@ -242,7 +242,7 @@ how should we verify their certificate -->