Class OpenSSLCertificate

Description

Reads and parses X509 certificates

This class is built over the functions provided by the openssl PHP extension.

Located in /core/security/OpenSSLCertificate.class.php (line 45)

PHP2Go
   |
   --OpenSSLCertificate
Variable Summary
Method Summary
void __destruct ()
string getContent ()
string getExpiryDate ([string $fmt = ''])
string getHash ()
string getIssueDate ([string $fmt = ''])
string getName ()
array getPurposes ()
string getSerialNumber ()
string getVersion ()
bool isValid ()
bool _readCertificate (string $path)
string __toString ()
Variables
string $contents (line 115)

Full certificate

resource $handle (line 123)

X509 handle

  • access: private
string $hash (line 66)

Certificate's hash

DistinguishedName $issuerDN (line 87)

Issuer's distinguished name

string $name (line 52)

Certificate's name

DistinguishedName $ownerDN (line 59)

Owner's distinguished name

string $purposes (line 108)

Certificate's purposes

string $serialNumber (line 73)

Certificate's serial number

int $validFrom (line 94)

Initial validity timestamp

int $validTo (line 101)

Expiration timestamp

string $version (line 80)

Certificate's version

Methods
Constructor OpenSSLCertificate (line 131)

Class constructor

OpenSSLCertificate OpenSSLCertificate (string $path)
  • string $path: Certificate's path
Destructor __destruct (line 142)

Class destructor

void __destruct ()
getContent (line 153)

Get certificate's content

string getContent ()
getExpiryDate (line 243)

Get expiry date

The $fmt argument represents the date format to be applied on the expiration timestamp. If missing, local date format will be used.

string getExpiryDate ([string $fmt = ''])
  • string $fmt: Date format
getHash (line 180)

Get certificate's hash

string getHash ()
getIssueDate (line 222)

Get issue date

The $fmt argument represents the date format to be applied on the initial validity timestamp. If this parameter is missing, local date format will be used.

string getIssueDate ([string $fmt = ''])
  • string $fmt: Date format
getIssuerDN (line 207)

Get issuer's distinguished name

DistinguishedName getIssuerDN ()
getName (line 162)

Get certificate's name

string getName ()
getOwnerDN (line 171)

Get owner's distinguished name

DistinguishedName getOwnerDN ()
getPurposes (line 272)

Get certificate's purposes

array getPurposes ()
getSerialNumber (line 189)

Get certificate's serial number

string getSerialNumber ()
getVersion (line 198)

Get certificate's version

string getVersion ()
isValid (line 259)

Validates the certificate's expiration timestamp

bool isValid ()
_readCertificate (line 296)

Reads, parses and validates the contents of the certificate

bool _readCertificate (string $path)
  • string $path: Certificate's path
__toString (line 281)

Builds and returns a string representation of the certificate

string __toString ()

Redefinition of:
PHP2Go::__toString()
Generate a string representation of the object

Inherited Methods

Inherited From PHP2Go

PHP2Go::PHP2Go()
PHP2Go::equals()
PHP2Go::generateUniqueId()
PHP2Go::getClassName()
PHP2Go::getConfigVal()
PHP2Go::getLangVal()
PHP2Go::getObjectName()
PHP2Go::getParentName()
PHP2Go::hasDestructor()
PHP2Go::hashCode()
PHP2Go::isA()
PHP2Go::isSubclassOf()
PHP2Go::logError()
PHP2Go::raiseError()
PHP2Go::registerDestructor()
PHP2Go::registerShutdownFunc()
PHP2Go::retrieve()
PHP2Go::store()
PHP2Go::__toString()

Documentation generated on Sun, 07 Oct 2007 19:28:05 -0300 by phpDocumentor 1.3.2