--- On Tue, 10/18/11, Emmanuel Lecharny <[email protected]> wrote:
> From: Emmanuel Lecharny <[email protected]> > Subject: userCertficate;binary problem (was : Re: Upgrading to > apacheds-service-2.0.0-M3.jar - ClassNotFoundException) > To: [email protected] > Date: Tuesday, October 18, 2011, 12:26 PM > Ok, > > I have fixed the client-side code and now the following > code works fine : > > /** > * Test method for > userCertificate;binary AT > */ > @Test > public void testUserCertificateBinary() > throws LdapException > { > Entry entry = new DefaultEntry( > schemaManager ); > entry.add( "objectClass", > "top", "person", "inetorgPerson" ); > entry.add( "cn", "test1", > "test2" ); > entry.add( "sn", "Test1", > "Test2" ); > entry.add( "userPassword", > BYTES1, BYTES2 ); > > entry.add( > "userCertificate;binary", Strings.getBytesUtf8( "secret" ) > ); > assertTrue( > entry.containsAttribute( "userCertificate;binary" ) ); > assertTrue( > entry.containsAttribute( "userCertificate" ) ); > > entry.removeAttributes( > "userCertificate;binary" ); > assertFalse( > entry.containsAttribute( "userCertificate;binary" ) ); > assertFalse( > entry.containsAttribute( "userCertificate" ) ); > > entry.add( "userCertificate", > Strings.getBytesUtf8( "secret" ) ); > assertTrue( > entry.containsAttribute( "userCertificate;binary" ) ); > assertTrue( > entry.containsAttribute( "userCertificate" ) ); > } > > > As you can see, there is no more difference between > 'userCertificate' and 'userCertificate;binary'. > > > I'm running global tests to see if it has an impact on the > client or the server, and if not, i'm going to commit the > fix. > Great job - thank you very much! Is there a nightly build (complete all-in-one jar) for this available sometime so i can test it? I gather that when i now query for this attribute - "userCertificate;binary" is also returned? (The previous hack would make it so, that if "userCertificate;binary" was requested, just "userCertificate" was returned - which did not help the cause because RFC states that "userCertificate;binary" must be returned. Thanks
