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.


--
Regards,
Cordialement,
Emmanuel Lécharny
www.iktek.com

Reply via email to