> Is this right, or am I getting something wrong here. I certainly hope
> that I am wrong, because this would render LdapClient practically
> useless for me.
I'am glad to have found out I was indeed wrong. I found the correct way
to do the encoding. For the record, here it is:
ByteArrayOutputStream encodeStream = new ByteArrayOutputStream();
LBEREncoder encoder = new LBEREncoder();
ASN1Tagged[] seq = new ASN1Tagged[] {
new ASN1Tagged(new ASN1Identifier(ASN1Identifier.CONTEXT,false,0),
new ASN1Null(), false),
new ASN1Tagged(new ASN1Identifier(ASN1Identifier.CONTEXT,false,1),
new ASN1OctetString(oldPassword), false),
new ASN1Tagged(new ASN1Identifier(ASN1Identifier.CONTEXT,false,2),
new ASN1OctetString(newPassword), false)};
ASN1Sequence opSeq = new ASN1Sequence(seq,3);
ASN1SequenceOf opSeqOf = new ASN1SequenceOf(opSeq);
opSeqOf.encode(encoder, encodeStream);
encodedValue = encodeStream.toByteArray();
The classes used here for encoding are from the jldap library.
Regards,
Christian