Convert-X509

 view release on metacpan or  search on metacpan

lib/Convert/X509.pod  view on Meta::CPAN


=head2 subject

Applicable to Request and Certificate.

Result of method differs for scalar and list context:
 - a hash-reference like {'C'=>['org'], 'OU'=>['cpan','search']};
 values list often contains only one element, but many in general
 - a list like ('CN=Name Surname','C=RU','L=Moscow')

X509 data may contains unicode strings,
so in general we have to decode it to localized one-byte oriented string.
It is the _second_ parameter (result codepage) subject method could accept.

But sometimes X509 data contains already "localized" one-byte string.
And its codepage (_first_ param accepted by subject)
can be different for console.

That's why subject can get up to two codepages subject(cp_from,cp_to)
(look Encode.pm).
And pretty print subject with russian strings may looks like



( run in 0.350 second using v1.01-cache-2.11-cpan-88abd93f124 )