Re: Ldap_bind problem with TLS - SDK 5.1.7 and NSS 3.11 & NSPR 4.6.
Anton Bobrov <[email protected]>
| Newsgroups | gmane.comp.mozilla.devel.directory |
|---|---|
| Organization | Sun Microsystems, Inc. |
| Message-ID | <[email protected]> |
you need to initialize & configure NSS first. you can do that with one of ldapssl_ init functions [example below]. > I've got the following components: Mozilla LDAP C SDK 5.1.7 and NSS > 3.11 & NSPR 4.6 as the downloaded binaries from the Mozilla FTP site for > the Solaris 5.9 sparc platform. > > To use these components, I've a short piece of C code to develop my > understanding of connecting and binding to an LDAP directory. The code > I'll include shortly but the functions I'm using are: #define CERT_DB_PATH "/local/my/certdb" insert ldapssl_client_init( CERT_DB_PATH, NULL ) here [ /example ] > ldap_init( MYLDAP_HOSTNAME, MYLDAP_PORT ) > ldap_set_option( ld, LDAP_OPT_PROTOCOL_VERSION, &ldap_version ) > ldap_start_tls_s( ld, NULL, NULL ); > ldap_bind_s( ld, MYBIND_DN, MYBIND_PW, LDAP_AUTH_SIMPLE ); > ldap_unbind( ld );