directory-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Emmanuel Lecharny <elecha...@gmail.com>
Subject userCertficate;binary problem (was : Re: Upgrading to apacheds-service-2.0.0-M3.jar - ClassNotFoundException)
Date Tue, 18 Oct 2011 16:26:20 GMT
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


Mime
View raw message