Certificate_Driver_Selfsign_Controller
extends Certificate_Driver_Controller
in package
Certificate_Driver_Selfsign_Controller
Tags
Table of Contents
Properties
- $_algorithm : string
- Digest Algorithm
- $_allowedProperties : array<string|int, mixed>
- Allowed object properties
- $_days : int
- Specifies the length of time for which the generated certificate will be valid
- $_propertiesValues : array<string|int, mixed>
- Properties values
- $_unlimitedProperties : bool
- Object has unlimited number of properties
Methods
- __construct() : mixed
- Constructor.
- addAllowedProperties() : self
- Add additional allowed properties
- addAllowedProperty() : self
- Add additional allowed property
- createCertificate() : array<string|int, mixed>
- Create Certificate
- factory() : mixed
- Create and return an object of certificate
- getCertificate() : array<string|int, mixed>
- Get information about the supplied certificate
- set() : self
- Run when writing data to inaccessible properties
- setUnlimitedProperties() : self
- Set unlimitedProperties
- sign() : mixed
- Sign a file
- _getDriverName() : srting
- Get full driver name
Properties
$_algorithm
Digest Algorithm
protected
string
$_algorithm
= 'sha256WithRSAEncryption'
$_allowedProperties
Allowed object properties
protected
array<string|int, mixed>
$_allowedProperties
= array()
$_days
Specifies the length of time for which the generated certificate will be valid
protected
int
$_days
= 365
$_propertiesValues
Properties values
protected
array<string|int, mixed>
$_propertiesValues
= array()
$_unlimitedProperties
Object has unlimited number of properties
protected
bool
$_unlimitedProperties
= \FALSE
Methods
__construct()
Constructor.
public
__construct() : mixed
addAllowedProperties()
Add additional allowed properties
public
addAllowedProperties(array<string|int, mixed> $array) : self
Parameters
- $array : array<string|int, mixed>
-
array of properties' names
Return values
selfaddAllowedProperty()
Add additional allowed property
public
addAllowedProperty(string $property) : self
Parameters
- $property : string
-
property name
Return values
selfcreateCertificate()
Create Certificate
public
createCertificate(array<string|int, mixed> $aDistinguishedNames, string $passphrase) : array<string|int, mixed>
Parameters
- $aDistinguishedNames : array<string|int, mixed>
-
The Distinguished Name or subject fields to be used in the certificate.
- $passphrase : string
-
Passphrase to protect the private key
Return values
array<string|int, mixed> —array('certificate' => $certout, 'private_key' => $private_key)
factory()
Create and return an object of certificate
public
static factory(mixed $driverName) : mixed
Parameters
- $driverName : mixed
getCertificate()
Get information about the supplied certificate
public
getCertificate(string $certificate) : array<string|int, mixed>
Parameters
- $certificate : string
Return values
array<string|int, mixed>set()
Run when writing data to inaccessible properties
public
set(string $property, string $value) : self
Parameters
- $property : string
-
property name
- $value : string
-
property value
Return values
selfsetUnlimitedProperties()
Set unlimitedProperties
public
setUnlimitedProperties([bool $value = TRUE ]) : self
Parameters
- $value : bool = TRUE
-
default TRUR
Return values
selfsign()
Sign a file
public
sign(Certificate_Model $oCertificate, string $passphrase, string $filepath) : mixed
Parameters
- $oCertificate : Certificate_Model
- $passphrase : string
-
Passphrase to decode the private key
- $filepath : string
-
The name of the file to be signed.
_getDriverName()
Get full driver name
protected
static _getDriverName(string $driver) : srting
Parameters
- $driver : string
-
driver name