Home » SQL & PL/SQL » SQL & PL/SQL » Has anyone gotten dbms_ldap.open_ssl to work?
Has anyone gotten dbms_ldap.open_ssl to work? [message #177807] Fri, 16 June 2006 11:58 Go to next message
Duane
Messages: 452
Registered: December 2002
Senior Member
It works fine using port 389 but when I use port 636 and try dbms_ldap.open_ssl I get the error ORA-31202: DBMS_LDAP: LDAP client/server error: UnKnown Error Encountered.


Here are some of my parameters. Maybe the location of the wallet or password is the problem?

retval := -1;
ldapHost := 'xxxxxxxxxxxxxxxxxxxx'
ldapPort := '636';
ldapUser := 'umkc-users\'||user;
ldapPasswd := pass;
ldapBase  := 'CN=Users,DC=kc,DC=umkc,DC=edu';
	
mySession := dbms_ldap.init (ldapHost, ldapPort);
	
retval := dbms_ldap.open_ssl (mySession, 'c:\Wallet\', 'xxxxx', 2);
Re: Has anyone gotten dbms_ldap.open_ssl to work? [message #177820 is a reply to message #177807] Fri, 16 June 2006 13:16 Go to previous messageGo to next message
Duane
Messages: 452
Registered: December 2002
Senior Member
Ok, I read an article on www.google.com that said you can't use open_ssl using a third party LDAP, such as, Active Directory and it only works with OID. That sucks.

Anyone have a solution for using SSL and a third party LDAP?
Re: Has anyone gotten dbms_ldap.open_ssl to work? [message #230497 is a reply to message #177807] Thu, 12 April 2007 02:29 Go to previous messageGo to next message
sallas
Messages: 1
Registered: April 2007
Junior Member
Duane,

Did you get this going in the end as I am also getting the same error messages in trying to connect to an AD server.

Have you tried executing the following on the Oracle server:
>ldapbind -p 636 -h 192.162.34.56 -U 2 -P mypwd -W file:c:\Wallet\

Note replace IP with host Ip, and mypwd with wallet password.
I do this from our Windows Oracle server and it binds over SSL to the AD, but I still get the same error as you trying to execute from PL/SQL (Toad).

EDIT: Also do you have the http address for the article you speak of? As I have read metalinks that seem to suggest you cant SSL connect to 3rd party AD, however I have seen other forum posts asking for help on AD searching after they have successfully connected to MS AD over SSL.

I may have to go a web service if I cant do LDAPS.

[Updated on: Thu, 12 April 2007 02:31]

Report message to a moderator

Re: Has anyone gotten dbms_ldap.open_ssl to work? [message #230653 is a reply to message #177807] Thu, 12 April 2007 08:47 Go to previous messageGo to next message
Duane
Messages: 452
Registered: December 2002
Senior Member
Yes I did, here's what I'm using.

PROCEDURE login (user   varchar2,
                 pass   varchar2,
                 submit varchar2) IS
				 
  returnValue       pls_integer;
  ldapPort          varchar2(3);
  ldapHost          varchar2(19);
  ldapBase          varchar2(29);
  
  mySession         dbms_ldap.session;
  
  computerSessionId globalVariables.sessionId%type;

  BEGIN
  
    IF user is null or 
       pass is null
      THEN
        owa_util.redirect_url('/oracle-login-error.html');
    END IF;
  
    returnValue := -1;
    ldapHost := 'xxxxxxxxxxxxxxxxxxx';
    ldapPort := '636';
    ldapBase  := 'CN=Users,DC=xx,DC=xxxx,DC=edu';
    
    dbms_ldap.use_exception := true;
	
    mySession := dbms_ldap.init (ldapHost, ldapPort);
    returnValue := dbms_ldap.open_ssl (mySession, 'file:c:\wallet\', 'xxxxxxxxxxxxxx' 2);
    returnValue := dbms_ldap.simple_bind_s (mySession, user, pass);

.
.
.
END;



The following post helped me in getting it to work:

http://www.orafaq.com/forum/m/178776/49537/?srch=dbms_ldap#msg_178776

[Updated on: Thu, 12 April 2007 08:50]

Report message to a moderator

Re: Has anyone gotten dbms_ldap.open_ssl to work? [message #364732 is a reply to message #230653] Tue, 09 December 2008 17:42 Go to previous message
n.l.wilson
Messages: 1
Registered: December 2008
Junior Member
Can you tell me what you put in the oracle wallet to get this to work.

Thanks,
Nancy
Previous Topic: Issue on Date Field
Next Topic: execute immediate with select
Goto Forum:
  


Current Time: Wed Dec 07 03:01:02 CST 2016

Total time taken to generate the page: 0.37831 seconds