[Date Prev][Date Next]
[Chronological]
[Thread]
[Top]
Re: Problem when add more value to userCertificate attribute...
Hi,
That's mean i cannot have more than one certificate for one entry ? How
can i do if i really need more than one certificate to store in a entry ?
Regards,
Siok Peng
Geert Van Muylem wrote:
> When you "add" the 2nd certificate, the server tries the compare
> the cert to check whether or not it already exist BUT
> the OpenLDAP server does not support certificate matching!
> Use a replace with the old and the new certificate instead.
> -----Original Message-----
> From: owner-openldap-software@OpenLDAP.org
> [mailto:owner-openldap-software@OpenLDAP.org]On Behalf Of Siok Peng
> Sent: donderdag 13 september 2001 11:33
> To: openldap-software@OpenLDAP.org
> Subject: Problem when add more value to userCertificate attribute...
>
> Hello, all :
> I am trying set up a java application that connect to a Openldap
> 2.0.11. I need to add new entry and new attribute value by using that
> java application. I have successful add new entry to the ldap server.
> But, the problem occur when i try to add another value to a attribute
> called userCertificate. I get the following Exception :
>
> Exception in thread "main"
> javax.naming.directory.InvalidSearchFilterException: [LDAP: error code
> 18 - modify: add value failed]; ....
>
> The following is sub of the java code that i used :
>
> ....
> public static void LDAPAddAttr ( String dn,
> String attr,
> Object attrValue)
> throws LDAPException {
> DirContext ctx = new InitialDirContext(env);
> Attributes newAttr = new BasicAttributes(attr, attrValue);
> ctx.modifyAttributes ( dn, DirContext.ADD_ATTRIBUTE, newAttr );
> } catch {Exception e} {
> throw new LDAPException(e);
> }
>
> public static void main(String[] args) throws LDAPException {
> byte[] userCert = null;
>
> userCert = ReadCertFile("test.der");
>
> ....
>
> LDAPAddAttr("cn=test;c=SG", "userCertificate;binary", userCert);
> System.out.println("success");
> }
>
> Can anyone tell me what's wrong with my java code ? Can userCertificate
> attribute accept more than one value ?
>
> Regards,
> Siok Peng