Issue 9157 - return additional error code information when OPT_X_TLS_NEWCTX fails
Summary: return additional error code information when OPT_X_TLS_NEWCTX fails
Status: VERIFIED FIXED
Alias: None
Product: OpenLDAP
Classification: Unclassified
Component: slapd (show other issues)
Version: unspecified
Hardware: All All
: Lowest normal
Target Milestone: 2.6.0
Assignee: Howard Chu
URL:
Keywords:
: 6477 (view as issue list)
Depends on:
Blocks:
 
Reported: 2020-01-24 10:03 UTC by tagrain@gmail.com
Modified: 2023-10-09 17:36 UTC (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this issue.
Description tagrain@gmail.com 2020-01-24 10:03:15 UTC
Full_Name: Thomas Grainger
Version: libldap-2.4-2
OS: Ubuntu
URL: ftp://ftp.openldap.org/incoming/
Submission from: (NULL) (62.60.6.23)


when setting OPT_X_TLS_NEWCTX after an invalid OPT_X_TLS_CACERTFILE libldap
returns a generic error code

would it be possible to pass the underlying TLS library's error code instead or
in addition?

https://github.com/python-ldap/python-ldap/issues/55#issuecomment-577831055
Comment 1 Shawn McKinney 2020-01-27 17:34:44 UTC
In one of our test envs, had the path wrong in replication config for encryption artifacts:

*** Conf excerpt: ***
syncrepl
…
tls_key=/opt/symas/etc/openldap/file-name.pem
***

Which gives generic error:
*** Log Trace: ***
an 27 17:25:17 sapz1a slapd[6203]: slapd starting
…
TLS context initialization failed (-1)
Jan 27 17:25:17 hostname slapd[6203]: do_syncrepl: rid=031 rc -1 retrying (4 retries left)
***

Would have been helpful for the message to specify which artifact wasn’t found, the line number of the config, or some other way of narrowing the problem.

—
Shawn





Comment 2 Quanah Gibson-Mount 2021-06-14 16:26:42 UTC
Need to see if this is possible, see also ITS#9474
Comment 3 Howard Chu 2021-07-22 14:28:04 UTC
fixed in master
Comment 4 Quanah Gibson-Mount 2021-07-22 16:30:33 UTC
Commits: 
  • 2c0707cf 
by Howard Chu at 2021-07-22T15:27:31+01:00 
ITS#9157 save TLS errmsg in ld->ld_error
Comment 5 Quanah Gibson-Mount 2022-06-03 20:33:45 UTC
head:

• 2c0707cf 
by Howard Chu 

    ITS#9157: check for NULL ld


RE26 (2.6.3):

  • 6675535c 
by Howard Chu at 2022-06-03T20:29:24+00:00 
ITS#9157: check for NULL ld
Comment 6 Quanah Gibson-Mount 2023-10-09 17:36:29 UTC
*** Issue 6477 has been marked as a duplicate of this issue. ***