Which version of OpenLDAP is this? Did you build it yourself, or is it from packages supplied by your operating system vendor? Which TLS library is it linked against? Can you provide a gdb backtrace including debug symbols?
If you can reproduce this with the current OpenLDAP version (2.4.43), built from source and linked with OpenSSL, please file a report in the ITS <http://openldap.org/ITS>.
I'm using version 2.4.31. And I installed it through the ubuntu package manger (apt-get).
[root@ldap1:~] #slapd -V
@(#) $OpenLDAP: slapd (Ubuntu) (Sep 15 2015 18:19:13) $
This is the version of OpenSSL I have installed:
[root@ldap1:~] #apt-cache policy openssl
*** 1.0.1f-1ubuntu2.15 0
Sorry but I'm having some trouble providing a backtrace due to the complexity of the ldap command. This is all I get:
[root@ldap1:~] #gdb ldapmodify -H ldapi:// -Y EXTERNAL -f addcerts.ldif 2>&1 |tee ~/gdb-ldapmodify.txt
gdb: unrecognized option '-H'
Use `gdb --help' for a complete list of options.
[root@ldap1:~] #gdb 'ldapmodify -H ldapi:// -Y EXTERNAL -f' addcerts.ldif 2>&1 |tee ~/gdb-ldapmodify.txt
GNU gdb (Ubuntu 7.7.1-0ubuntu5~14.04.2) 7.7.1
Copyright (C) 2014 Free Software Foundation, Inc.
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law. Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
Find the GDB manual and other documentation resources online at:
For help, type "help".
Type "apropos word" to search for commands related to "word"...
ldapmodify -H ldapi:// -Y EXTERNAL -f: No such file or directory.
"/root/addcerts.ldif" is not a core dump: File format not recognized
Wish I could be of more help answering the question!