On 8/31/07, legolas wood <[EMAIL PROTECTED]> wrote:
> Hi
> Thank you for reading my post,
> Can some one give me a hint about inserting a Digital certification into
> userCertificate attribute?
Once you have your cert as an X509Certificate, you can call
X509Certificate#getEncoded, which will return the ASN.1 DER format of
the cert. You can then use JNDI to write this to ApacheDS. Make sure
you set the following JNDI environment property client-side so that
the 'userCertificate' is properly handled as binary:
env.put( "java.naming.ldap.attributes.binary", "userCertificate" );
IIRC, 'userCertificate' is known to ApacheDS as a binary value so you
don't need this to write the value, but you will need it to read the
value as binary.
Enrique