Hi,

I can't reproduce... this just works fine here without hangs, 
I'm using OpenBSD -current, ldapd(as of today) + TLS (self-signed
TLS certificate). 

The ldifs and image(54.7K) are available at:
http://shutupandhack.org/~gsoares/tmp/1.ldif
http://shutupandhack.org/~gsoares/tmp/2.ldif
http://shutupandhack.org/~gsoares/tmp/sample.jpeg

could you try to reproduce using the files above? 
let me know if I missed anything. 
following more details about my tests:

*ldif*

dn: cn=Robert1 Smith,ou=people,dc=example,dc=com
objectclass: inetOrgPerson
cn: Robert1 Smith
cn: Robert1 J Smith
cn: bob  smith
sn: smith
uid: rjsmith
## Please specify a file that would cause conn_read() to be called
## multiple times. I tried around 2KB, 3KB, 5KB and 13KB files for
## jpegPhoto attribute.
jpegPhoto:< file:///home/gsoares/sample.jpeg
userpassword: rJsmitH
carlicense: HISCAR 123
homephone: 555-111-2222
mail: [email protected]
mail: [email protected]
mail: [email protected]
description: swell guy
ou: Human Resources

*Adding(no hangs)*

% ldapadd -vv -H ldaps://127.0.0.1 -x -D 'cn=admin,dc=example,dc=com' -w secret 
-f ./2.ldif
ldap_initialize( ldaps://127.0.0.1:636/??base )
add objectclass:
        inetOrgPerson
add cn:
        Robert1 Smith
        Robert1 J Smith
        bob  smith
add sn:
        smith
add uid:
        rjsmith
add jpegPhoto:
        NOT ASCII (56060 bytes)
add userpassword:
        rJsmitH
add carlicense:
        HISCAR 123
add homephone:
        555-111-2222
add mail:
        [email protected]
        [email protected]
        [email protected]
add description:
        swell guy
add ou:
        Human Resources
adding new entry "cn=Robert1 Smith,ou=people,dc=example,dc=com"
modify complete

*Searching*

% ldapsearch -tt -T ./ -LLL -H ldaps://127.0.0.1 -x -D 
'cn=admin,dc=example,dc=com' -w secret -b 'cn=Robert1 
Smith,ou=people,dc=example,dc=com' jpegPhoto
dn: cn=robert1 smith,ou=people,dc=example,dc=com
jpegPhoto:< file:///.//ldapsearch-jpegPhoto-38ROnW


*ldapd debug*

Mar  1 00:11:30.650 [6247] accepted connection from 127.0.0.1 on fd 11
Mar  1 00:11:30.650 [6247] conn_tls_init: switching to TLS
Mar  1 00:11:30.683 [6247] consumed 46 bytes
Mar  1 00:11:30.683 [6247] got request type 0, id 1
Mar  1 00:11:30.683 [6247] bind dn = cn=admin,dc=example,dc=com
Mar  1 00:11:30.683 [6247] successfully authenticated as 
cn=admin,dc=example,dc=com
Mar  1 00:11:30.683 [6247] sending response 1 with result 0
Mar  1 00:11:30.684 [6247] consumed 43997 bytes
Mar  1 00:11:30.684 [6247] got request type 8, id 2
Mar  1 00:11:30.684 [6247] adding entry cn=robert 
smith,ou=people,dc=example,dc=com
Mar  1 00:11:30.685 [6247] indexing cn=robert smith,ou=people,dc=example,dc=com 
on objectClass
Mar  1 00:11:30.685 [6247] indexing cn=robert smith,ou=people,dc=example,dc=com 
on cn
Mar  1 00:11:30.685 [6247] indexing cn=robert smith,ou=people,dc=example,dc=com 
on ou
Mar  1 00:11:30.685 [6247] indexing cn=robert smith,ou=people,dc=example,dc=com 
on uid
Mar  1 00:11:30.685 [6247] indexing cn=robert smith,ou=people,dc=example,dc=com 
on mail
Mar  1 00:11:30.685 [6247] indexing cn=robert smith,ou=people,dc=example,dc=com 
on sn
Mar  1 00:11:30.685 [6247] indexing rdn on @ou=people,cn=robert smith
Mar  1 00:11:30.697 [6247] sending response 9 with result 0
Mar  1 00:11:30.698 [6247] consumed 7 bytes
Mar  1 00:11:30.698 [6247] got request type 2, id 3
Mar  1 00:11:30.698 [6247] current bind dn = cn=admin,dc=example,dc=com
Mar  1 00:11:30.698 [6247] end-of-file on connection 11
Mar  1 00:11:30.698 [6247] closing connection 11
Mar  1 00:16:11.313 [6247] accepted connection from 127.0.0.1 on fd 11
Mar  1 00:16:11.313 [6247] conn_tls_init: switching to TLS
Mar  1 00:16:11.346 [6247] consumed 46 bytes
Mar  1 00:16:11.346 [6247] got request type 0, id 1
Mar  1 00:16:11.346 [6247] bind dn = cn=admin,dc=example,dc=com
Mar  1 00:16:11.346 [6247] successfully authenticated as 
cn=admin,dc=example,dc=com
Mar  1 00:16:11.346 [6247] sending response 1 with result 0
Mar  1 00:16:11.347 [6247] consumed 56469 bytes
Mar  1 00:16:11.347 [6247] got request type 8, id 2
Mar  1 00:16:11.347 [6247] adding entry cn=robert 
smith,ou=people,dc=example,dc=com
Mar  1 00:16:11.347 [6247] cn=robert smith,ou=people,dc=example,dc=com: already 
exists
Mar  1 00:16:11.347 [6247] sending response 9 with result 68
Mar  1 00:16:11.348 [6247] consumed 7 bytes
Mar  1 00:16:11.348 [6247] got request type 2, id 3
Mar  1 00:16:11.348 [6247] current bind dn = cn=admin,dc=example,dc=com
Mar  1 00:16:11.348 [6247] end-of-file on connection 11
Mar  1 00:16:11.348 [6247] closing connection 11
Mar  1 00:16:35.836 [6247] accepted connection from 127.0.0.1 on fd 11
Mar  1 00:16:35.836 [6247] conn_tls_init: switching to TLS
Mar  1 00:16:35.872 [6247] consumed 46 bytes
Mar  1 00:16:35.872 [6247] got request type 0, id 1
Mar  1 00:16:35.873 [6247] bind dn = cn=admin,dc=example,dc=com
Mar  1 00:16:35.873 [6247] successfully authenticated as 
cn=admin,dc=example,dc=com
Mar  1 00:16:35.873 [6247] sending response 1 with result 0
Mar  1 00:16:35.874 [6247] consumed 56472 bytes
Mar  1 00:16:35.874 [6247] got request type 8, id 2
Mar  1 00:16:35.874 [6247] adding entry cn=robert1 
smith,ou=people,dc=example,dc=com
Mar  1 00:16:35.874 [6247] indexing cn=robert1 
smith,ou=people,dc=example,dc=com on objectClass
Mar  1 00:16:35.874 [6247] indexing cn=robert1 
smith,ou=people,dc=example,dc=com on cn
Mar  1 00:16:35.874 [6247] indexing cn=robert1 
smith,ou=people,dc=example,dc=com on ou
Mar  1 00:16:35.874 [6247] indexing cn=robert1 
smith,ou=people,dc=example,dc=com on uid
Mar  1 00:16:35.874 [6247] indexing cn=robert1 
smith,ou=people,dc=example,dc=com on mail
Mar  1 00:16:35.874 [6247] indexing cn=robert1 
smith,ou=people,dc=example,dc=com on sn
Mar  1 00:16:35.874 [6247] indexing rdn on @ou=people,cn=robert1 smith
Mar  1 00:16:35.876 [6247] sending response 9 with result 0
Mar  1 00:16:35.876 [6247] consumed 7 bytes
Mar  1 00:16:35.877 [6247] got request type 2, id 3
Mar  1 00:16:35.877 [6247] current bind dn = cn=admin,dc=example,dc=com
Mar  1 00:16:35.877 [6247] closing connection 11
Mar  1 00:19:29.363 [6247] accepted connection from 127.0.0.1 on fd 11
Mar  1 00:19:29.363 [6247] conn_tls_init: switching to TLS
Mar  1 00:19:29.408 [6247] consumed 46 bytes
Mar  1 00:19:29.408 [6247] got request type 0, id 1
Mar  1 00:19:29.408 [6247] bind dn = cn=admin,dc=example,dc=com
Mar  1 00:19:29.408 [6247] successfully authenticated as 
cn=admin,dc=example,dc=com
Mar  1 00:19:29.408 [6247] sending response 1 with result 0
Mar  1 00:19:29.409 [6247] consumed 94 bytes
Mar  1 00:19:29.409 [6247] got request type 3, id 2
Mar  1 00:19:29.409 [6247] base dn = cn=robert1 
smith,ou=people,dc=example,dc=com, scope = 2
Mar  1 00:19:29.409 [6247] init full scan
Mar  1 00:19:29.409 [6247] found dn cn=robert1 smith,ou=people,dc=example,dc=com
Mar  1 00:19:29.410 [6247] found dn cn=robert smith,ou=people,dc=example,dc=com
Mar  1 00:19:29.410 [6247] scanned past basedn suffix
Mar  1 00:19:29.410 [6247] 2 scanned, 1 matched, 0 dups
Mar  1 00:19:29.410 [6247] sending response 5 with result 0
Mar  1 00:19:29.410 [6247] search failed: Invalid argument
Mar  1 00:19:29.410 [6247] finished search on msgid 2
Mar  1 00:19:29.412 [6247] consumed 7 bytes
Mar  1 00:19:29.412 [6247] got request type 2, id 3
Mar  1 00:19:29.412 [6247] current bind dn = cn=admin,dc=example,dc=com
Mar  1 00:19:29.412 [6247] end-of-file on connection 11
Mar  1 00:19:29.412 [6247] closing connection 11

Reply via email to