Net::SSLeay::OO::X509::Name - methods to call on SSL certificate names


Net-SSLeay-OO documentation  | view source Contained in the Net-SSLeay-OO distribution.

Index


NAME

Top

Net::SSLeay::OO::X509::Name - methods to call on SSL certificate names

SYNOPSIS

Top

 my $name = $cert->get_subject_name;

 # for 'common' attributes
 print "Summary of cert: ".$name->oneline."\n";
 print "Common name is ".$name->cn."\n";

 # others...
 use Net::SSLeay::OO::Constants qw(NID_pbe_WithSHA1And2_Key_TripleDES_CBC);
 my $val = $name->get_text_by_NID(NID_pbe_WithSHA1And2_Key_TripleDES_CBC);

DESCRIPTION

Top

This object represents the X509_NAME structure in OpenSSL. It has a bunch of fields such as "common name", etc.

Two methods are imported from the OpenSSL library;

oneline

Returns a string, such as:

 /C=NZ/ST=Wellington/O=Catalyst IT/OU=Security/CN=Test Client

get_text_by_NID(NID_xxx)

Return a given field from the name. See openssl/objects.h for the complete list.

Convenience methods have been added which return the following common fields:

        cn           NID_commonName
	country      NID_countryName
	locality     NID_localityName
	state        NID_stateOrProvinceName
	org          NID_organizationName
	org_unit     NID_organizationalUnitName
	subject_key  NID_subject_key_identifier
	key_usage    NID_key_usage
	serial       NID_serialNumber

AUTHOR

Top

Sam Vilain, samv@cpan.org

COPYRIGHT

Top

SEE ALSO

Top

Net::SSLeay::OO, Net::SSLeay::OO::X509


Net-SSLeay-OO documentation  | view source Contained in the Net-SSLeay-OO distribution.