\core\commonX509

This class contains handling functions for X.509 certificates

Summary

Methods
Properties
Constants
pem2der()
der2pem()
processCertificate()
splitCertificate()
No public properties found
No constants found
No protected methods found
No protected properties found
N/A
No private methods found
No private properties found
N/A

Methods

pem2der()

pem2der( pemData) : 

transform PEM formatted certificate to DER format

@param string $pemData blob of data, which is hopefully a PEM certificate

Parameters

pemData

Returns

the DER representation of the certificate

@author http://php.net/manual/en/ref.openssl.php (comment from 29-Mar-2007)

der2pem()

der2pem(  derData) : 

transform DER formatted certificate to PEM format

Parameters

derData

blob of DER data

Returns

the PEM representation of the certificate

processCertificate()

processCertificate(  cadata) : array|bool

prepare PEM and DER formats, MD5 and SHA1 fingerprints and subject of the certificate

returns an array with the following fields:

 uuid
pem certificate in PEM format
der certificate in DER format
md5 MD5 fingerprint
sha1    SHA1 fingerprint
name    certificate subject
root value 1 if root certificate 0 otherwise
ca   value 1 if CA certificate 0 otherwise

Parameters

cadata

certificate in ether PEM or DER format

Returns

array|bool —

splitCertificate()

splitCertificate(  cadata) : mixed|string|int

split a certificate file into components

returns an array containing the PEM format of the certificate (s) if the file contains multiple certificates it gets split into components

Parameters

cadata

certificate in ether PEM or DER format

Returns

mixed|string|int —