| 1 | <?php |
||
| 8 | class Certificate |
||
| 9 | { |
||
| 10 | /** |
||
| 11 | * @var Filesystem |
||
| 12 | */ |
||
| 13 | protected $storage; |
||
| 14 | /** |
||
| 15 | * @var array |
||
| 16 | */ |
||
| 17 | protected $paths = [ |
||
| 18 | 'p12' => 'certificate.p12', |
||
| 19 | 'pem' => 'certificate.pem', |
||
| 20 | 'password' => 'certificate.password', |
||
| 21 | ]; |
||
| 22 | |||
| 23 | /** |
||
| 24 | * Create a new Certificate. |
||
| 25 | * |
||
| 26 | * @param Filesystem $storage |
||
| 27 | */ |
||
| 28 | 1 | public function __construct(Filesystem $storage) |
|
| 32 | |||
| 33 | /** |
||
| 34 | * Return certificate. |
||
| 35 | * |
||
| 36 | * @return string |
||
| 37 | */ |
||
| 38 | public function getP12Certificate() |
||
| 46 | |||
| 47 | /** |
||
| 48 | * Return password. |
||
| 49 | * |
||
| 50 | * @return string |
||
| 51 | */ |
||
| 52 | public function getPassword() |
||
| 60 | |||
| 61 | /** |
||
| 62 | * Get pem certificate. |
||
| 63 | * |
||
| 64 | * @return string |
||
| 65 | */ |
||
| 66 | public function getPemCertificate() |
||
| 74 | |||
| 75 | /** |
||
| 76 | * Return pem certificate path. |
||
| 77 | * |
||
| 78 | * @return string |
||
| 79 | */ |
||
| 80 | 1 | public function getPemCertificatePath() |
|
| 84 | |||
| 85 | /** |
||
| 86 | * Set certificates filenames. |
||
| 87 | * |
||
| 88 | * @param array $paths |
||
| 89 | * @return $this |
||
| 90 | */ |
||
| 91 | public function setPaths(array $paths) |
||
| 97 | } |
||
| 98 |