On 1/12/05 1:06, Rion, Bob <[EMAIL PROTECTED]> wrote:

> Hello
> 
>  
> 
>  
> 
> I am trying to extract a userCertificate;binary object from an ldif file
> using Net::LDAP::LDIF and even in this trivial example the @entries is
> not populated, the other objects and attributes are?
> 
>  
> 
> use Net::LDAP::LDIF;
> 
> $ldif = Net::LDAP::LDIF->new( "test.ldif", "r", onerror => 'undef' );
> 
>  @entries = $ldif->read(  );

Does:

    (@entries) = $ldif->read();

Change things? If you're running with -w and 'use strict;' in effect, does
that show any problems up?

>  
> 
> The goal is to read the ldif file, extract the certificate information
> from the ldif file and store back into a DER format file.

Is the LDIF file encoding the certificate properly? It should look something
like:

userCertificate;binary:: <base-64 encoded DER certificate>

(The certificate could obviously be split across multiple lines...)

Cheers,

Chris


Reply via email to