[Date Prev][Date Next] [Chronological] [Thread] [Top]

SASL authentication (DIGEST-MD5)

I have a problem in usind SASL authentication (DIGEST-MD5) with your java libraries. When I execute the bind method (the one with the mechanism as a parameter) I got as answer an error 92 LDAP_NOT_SUPPORTED. I suppose I need to specify somehow that I want to use LDAP_v3, but I can't immagine how, since neither the bind nor the connect method have such a parameter. Am I missing some information? 
This is the very simple code I'm trying to run. LogWriter is just a simple class to write to a log file
public class provaldap1 {
  public provaldap1() {

  public static void main(String[] args) {
    LogWriter log = new LogWriter("C:/Temp/Log.out");
    log.write(new Object(),"MESSAGE","inizio: ");;
    LDAPConnection c = new LDAPConnection();
    try {
      String[] st = new String[1];
      st[0] = "DIGEST-MD5";
      c.bind( "CN=myname,OU=people,O=mycompany,C=it",null,st,null,null);
      log.write(new Object(),"MESSAGE","autenticato: ");
    } catch (LDAPException e)  {
      log.write(new Object(),"MESSAGE","errore: "+e.getResultCode());
      if ( e.getResultCode() == 14  ) {
        log.write(new Object(),"MESSAGE","LDAPMessage: "+e.getLDAPErrorMessage());
        if (e.getCause() != null)
          log.write(new Object(),"MESSAGE","Cause: "+e.getCause().toString());
        log.write(new Object(),"MESSAGE","Message: "+e.getMessage());
And this is what I find in my logfile
2003-6-19 9:44:38 718 | java.lang.Object@239137 | MESSAGE | inizio: 
2003-6-19 9:44:40 701 | java.lang.Object@3efab0 | MESSAGE | errore client: 92
2003-6-19 9:44:40 701 | java.lang.Object@3c5982 | MESSAGE | LDAPMessage: null
2003-6-19 9:44:40 751 | java.lang.Object@55550d | MESSAGE | Message: LDAP Not Supported
Can someone show me te way?
Roberto Gastaldo

This message and its attachments are addressed solely to the persons
above and may contain confidential information. If you have received
the message in error, be informed that any use of the content hereof
is prohibited. Please return it immediately to the sender and delete
the message. Should you have any questions, please contact us by
replying to MailAdmin@tilab.com. Thank you