|
|
3af7f6 |
From 2dfe3f35c7fef4792f15f0b3f9c9a10e5f9a4692 Mon Sep 17 00:00:00 2001
|
|
|
3af7f6 |
From: Simon Pichugin <spichugi@rehdat.com>
|
|
|
3af7f6 |
Date: Thu, 5 Aug 2021 16:15:09 +0200
|
|
|
3af7f6 |
Subject: [PATCH] Change TLS_REQSAN default to TRY
|
|
|
3af7f6 |
|
|
|
3af7f6 |
---
|
|
|
3af7f6 |
doc/man/man5/ldap.conf.5 | 2 +-
|
|
|
3af7f6 |
libraries/libldap/init.c | 2 +-
|
|
|
3af7f6 |
2 files changed, 2 insertions(+), 2 deletions(-)
|
|
|
3af7f6 |
|
|
|
3af7f6 |
diff --git a/doc/man/man5/ldap.conf.5 b/doc/man/man5/ldap.conf.5
|
|
|
3af7f6 |
index cde2c875f..9f1aa2c0a 100644
|
|
|
3af7f6 |
--- a/doc/man/man5/ldap.conf.5
|
|
|
3af7f6 |
+++ b/doc/man/man5/ldap.conf.5
|
|
|
3af7f6 |
@@ -479,7 +479,6 @@ The client will not check any SAN in the certificate.
|
|
|
3af7f6 |
The SAN is checked against the specified hostname. If a SAN is
|
|
|
3af7f6 |
present but none match the specified hostname, the SANs are ignored
|
|
|
3af7f6 |
and the usual check against the certificate DN is used.
|
|
|
3af7f6 |
-This is the default setting.
|
|
|
3af7f6 |
.TP
|
|
|
3af7f6 |
.B try
|
|
|
3af7f6 |
The SAN is checked against the specified hostname. If no SAN is present
|
|
|
3af7f6 |
@@ -487,6 +486,7 @@ in the server certificate, the usual check against the certificate DN
|
|
|
3af7f6 |
is used. If a SAN is present but doesn't match the specified hostname,
|
|
|
3af7f6 |
the session is immediately terminated. This setting may be preferred
|
|
|
3af7f6 |
when a mix of certs with and without SANs are in use.
|
|
|
3af7f6 |
+This is the default setting.
|
|
|
3af7f6 |
.TP
|
|
|
3af7f6 |
.B demand | hard
|
|
|
3af7f6 |
These keywords are equivalent. The SAN is checked against the specified
|
|
|
3af7f6 |
diff --git a/libraries/libldap/init.c b/libraries/libldap/init.c
|
|
|
3af7f6 |
index 0d91808ec..fa4c176fd 100644
|
|
|
3af7f6 |
--- a/libraries/libldap/init.c
|
|
|
3af7f6 |
+++ b/libraries/libldap/init.c
|
|
|
3af7f6 |
@@ -625,7 +625,7 @@ void ldap_int_initialize_global_options( struct ldapoptions *gopts, int *dbglvl
|
|
|
3af7f6 |
gopts->ldo_tls_connect_cb = NULL;
|
|
|
3af7f6 |
gopts->ldo_tls_connect_arg = NULL;
|
|
|
3af7f6 |
gopts->ldo_tls_require_cert = LDAP_OPT_X_TLS_DEMAND;
|
|
|
3af7f6 |
- gopts->ldo_tls_require_san = LDAP_OPT_X_TLS_ALLOW;
|
|
|
3af7f6 |
+ gopts->ldo_tls_require_san = LDAP_OPT_X_TLS_TRY;
|
|
|
3af7f6 |
#endif
|
|
|
3af7f6 |
gopts->ldo_keepalive_probes = 0;
|
|
|
3af7f6 |
gopts->ldo_keepalive_interval = 0;
|
|
|
3af7f6 |
--
|
|
|
3af7f6 |
2.31.1
|
|
|
3af7f6 |
|