directory-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Harakiri <harakiri...@yahoo.com>
Subject Re: userCertficate;binary problem (was : Re: Upgrading to apacheds-service-2.0.0-M3.jar - ClassNotFoundException)
Date Tue, 18 Oct 2011 17:34:34 GMT


--- On Tue, 10/18/11, Emmanuel Lecharny <elecharny@gmail.com> wrote:

> From: Emmanuel Lecharny <elecharny@gmail.com>
> Subject: userCertficate;binary problem (was : Re: Upgrading to apacheds-service-2.0.0-M3.jar
- ClassNotFoundException)
> To: users@directory.apache.org
> 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

Mime
View raw message