[Date Prev][Date Next]
[Chronological]
[Thread]
[Top]
stumped
Hi i have the following ldap code which, using ssl attempts to bind to a
server.
=========== start code ===============
if (ldapssl_clientauth_init( "./cert7.db", NULL,
0, NULL, NULL) < -1){
perror( "ldap_clientauth_init" );
return( 1 );
}
/*if (ldapssl_client_init( "./cert7.db", NULL )< 0) {
printf( "Failed to initialize SSL client...\n" );
return( 1 );
}*/
/* get a handle to an LDAP connection */
if ( (ld = ldapssl_init( HOSTNAME, LDAPS_PORT, 1 )) == NULL ){
perror( "ldapssl_init" );
return( 1 );
}
/* Print out an informational message. */
printf( "Binding to server %s:%d\n", HOSTNAME, PORT_NUMBER );
printf( "as the DN %s ...\n", BIND_DN );
/* Bind to the LDAP server. */
rc = ldap_simple_bind_s( ld, BIND_DN, BIND_PW );
if ( rc != LDAP_SUCCESS ) {
fprintf(stderr, "ldap_simple_bind_s: %s\n\n", ldap_err2string(rc));
return( 1 );
} else {
printf( "Bind operation successful.\n" );
}
=========== end code ===============
i get the following output
Binding to server hostname:636
as the DN CN=administrator,CN=Users,DC=rtest,DC=qub,DC=ac,DC=uk ...
ldap_simple_bind_s: Can't contact LDAP server
so i know where its kickin its heels up question is why is it?
now to the best of my knowledge i have installed a certificate onto the
server
(using openssl i gen'd a key then a csr then used my domains root CA to
sign it then formated it to pcks12 then installed it onto the server)
i have also installed the domain root on my machine
Am i missing something out here?
any help would be appreciated...
thanks
ronan
--
Regards
Ronan McGlue
==============
Analyst/Programmer
Information Services
Queens University Belfast
BT7 1NN