From: Graham B. <gb...@po...> - 2000-08-01 09:14:46
|
On Tue, Aug 01, 2000 at 09:15:04AM +0100, Chris Ridd wrote: > Graham Barr <gb...@po...> wrote: > > > On Mon, Jul 31, 2000 at 04:24:44PM +0100, Chris Ridd wrote: > >> I couldn't persuade Convert::ASN1 from messing with the time strings. > >> Replacing 'UTCTime' above with '[UNIVERSAL 23] IMPLICIT STRING' will get > >> the correct unadulterated times back... > > > > You mean you want the string exactly as it appeasrs ? > > Yes. It can sometimes be useful to get the 'raw' octets. (In this case, it > was useful because I could compare the values with the strings I could see > in the cert. But it's useful for when you care about what optional parts of > the value are present.) We could change the configure options to be decode => { time => 'raw|unixtime|timezone' } where `unixtime' is the default > > If you do > > > > $asn->configure( decode => { timezone => 1 } ); > > > That only gives me the following error: > > Can't use string ("decode") as a SCALAR ref while "strict refs" in use at > /usr/lib/perl5/site_perl/5.005/Convert/ASN1.pm line 107. > Convert::ASN1::configure('Convert::ASN1=HASH(0x8373cf0)', 'decode', > 'HASH(0x83b2efc)') called at ./testcert.pl line 20 Whoops, typo :) Change like 107 to $self->{options}{"${type}_${what}"} = $value; Graham. |