Re: ldap connection via SSL
| From: | Unknown Sender | Date: | Mon, 21 Oct 2002 06:31:24 +0000 |
| Subject: | Re: ldap connection via SSL | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-120697@lists.php.net to get a copy of this message | ||
On Thu, Sep 26, 2002 at 03:33:46PM +0200, Vazquez, Juan wrote:
> To use ldap_connect to connect via SSL to your LDAP server, you must use
> the following:
>
> ldap_connect( "ldaps://server.domain.com/", 636 );
Actually the port number is ignored here. 636 is the default port,
if you want another it must be part of the URL. Examples:
ldap_connect( "ldaps://server.domain.com/");
ldap_connect( "ldaps://server.domain.com:6636/");
> "server.domain.com" must be the exact name of the server your issued
> your certificate to (with OpenLDAP, using openssl).
>
>
> any LDAP server ( not only an OpenLDAP one ), I have been searching for =
> information but I have not found anything.
AFAIK this should work with all LDAP servers using a special port for
SSL connections. Might possibly be some SSL related problems in some
cases.
LDAPv3 servers (at least OpenLDAP and hopefully the others) also support
switching to TLS (SSL) on the unencrypted LDAP connection. After a normal
connect one can at some point send a start_tls command to switch to TLS.
PHP has a ldap_start_tls() function for this.
Stig