post by tommy @ 20 六月, 2007 19:55
首先, TLS 是在 Protocol Version 3 才有提供, 所以必須在 ldap_connect() 之後, 使用 ldap_set_option() 設定使用 protocol version 3 才可以. 如果這樣子處理, 並沒有辦法正確的執行 ldap_bind(), 則必須在你 client 端的 ldap.conf 中, 加上 TLS_REQCERT 這個參數, 其值為 nerver 或 allow 才可以. 如果沒有 ldap.conf, 也可以利用環境變數 LDAPTLS_REQCERT 來設定, 或直接使用 putenv() 來設定這個變數. (閱讀全文)