[prev in list] [next in list] [prev in thread] [next in thread] 

List:       bouncycastle-crypto-dev
Subject:    Inserting Certificate into iPlanet Directory Server using JNDI
From:       "Satish Vohra" <svohraeng () hotmail ! com>
Date:       2002-10-25 12:30:50
[Download RAW message or body]

Hi,

I am trying to add User into iPlanet Directory Server using JNDI.
The certificate is not inserted properly.
Any idea what could be wrong.

Thanks
Satish

------ Code Snipet -----
		myAttrs = new BasicAttributes(true);  // case ignore
		Attribute oc = new BasicAttribute("objectclass");
  	      oc.add("inetOrgPerson");
		oc.add("organizationalPerson");
		oc.add("person");
		oc.add("top");
		Attribute ouSet = new BasicAttribute("ou");
		ouSet.add(ou);
  	      myAttrs.put(oc);
		myAttrs.put(ouSet);
            ....
  	      if (p12 != null && (p12 instanceof java.security.cert.Certificate)) 
{
		  Attribute uc = new BasicAttribute("userPKCS12");
  		  byte cert[];
		  java.io.ByteArrayOutputStream bop = new java.io.ByteArrayOutputStream();
		  java.io.ObjectOutputStream p = new java.io.ObjectOutputStream(bop);
		  p.writeObject(p12);
		  cert = bop.toByteArray();
		  p.flush();
		  p.close();
		  System.out.println("\n\nCertificate Bytes ...\n\n");
		  uc.add(cert);
		  myAttrs.put(uc);
            }

_________________________________________________________________
Broadband? Dial-up? Get reliable MSN Internet Access. 
http://resourcecenter.msn.com/access/plans/default.asp


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic