Reputation: 1398
I'm trying to add a certificate as a binary attribute value from a byte array, but I'm getting this error.
ct;binary: value #0 invalid per syntax
If I replace the byte array with the cert base64 string, the same error occurs.
This is my code:
attr = new BasicAttribute("ct;binary", CertificateBytes);
item = new ModificationItem(DirContext.ADD_ATTRIBUTE, attr);
ModificationItem[] modifyItems = {item};
ldapTemplate.modifyAttributes(dn, modifyItems);
Upvotes: 1
Views: 2963
Reputation: 3300
There's a system property setting, java.naming.ldap.attributes.binary
(more information here), which specifies which attributes should be handled as binary by the Java LDAP provider. You might want to try playing around with that.
Upvotes: 1