Claes Jakobsson > Crypt-NSS > Crypt::NSS::Certificate

Download:
Crypt-NSS-0.04.tar.gz

Dependencies

Annotate this POD

View/Report Bugs
Source  

NAME ^

Crypt::NSS::Certificate - X.509 certificate and related fuctions

INTERFACE ^

CLASS METHODS

from_base64_DER ( $data : string ) : Crypt::NSS::Certificate

Creates a new certificate from a Base64 encoded DER string.

INSTANCE METHODS

Getting information about the certificate

issuer ( ) : string
get_issuer ( ) : string
issuer_name ( ) : string

Returns the DN of the issuer of the certificate.

subject ( ) : string
get_subject ( ) : string
subject_name ( ) : string

Returns the certificates DN.

email_address ( ) : string
get_email_address ( ) : string

Returns the email address of the certificate if any.

public_key ( ) : Crypt::NSS::PublicKey
get_public_key ( ) : Crypt::NSS::PublicKey

Returns the certificates public key.

Verifying the certificate

verify_hostname ( $pattern : string ) : boolean

Verifies that the hostname in the certificate matches the given hostname pattern.

get_validity_for_datetime( $year : integer, $month : integer, $day : integer [, $hour : integer, $minute : integer, $second : integer, $usec : integer ]) : integer

Checks if the certificate is valid for the given date and optional time. Returns -1 if the certificate has expired, 0 if it's still valid or 1 if it's not valid yet but will be in the future.

is_valid_now ( ) : boolean

Checks if the certificate is valid now (localtime).

Miscellaneous methods

clone ( ) : Crypt::NSS::Certificate

Returns a copy of the certificate.

syntax highlighting: