Skip to content

Commit

Permalink
allowing stream entry
Browse files Browse the repository at this point in the history
  • Loading branch information
robinsongarciax committed Apr 4, 2022
1 parent 6f40909 commit 4e18aa6
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
7 changes: 6 additions & 1 deletion TotusPKI/Certificate.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,12 @@ class Certificate {
private $encriptedPrivateKey;
private $privateKey;

public function __construct(string $cer, string $key = null, string $password = null) {
/**
* @param string|stream $cer path to the cer file or the read data of the file
* @param string|stream $key path to the key file or the read data of the file
* @param string $password passphrase must be used to the specified key is encrypted
*/
public function __construct($cer, $key = null, string $password = null) {
$this->publicKey = new PublicKey($cer);
if (isset($key)) {
$this->encriptedPrivateKey = new EncriptedPrivateKey($key, $password);
Expand Down
2 changes: 1 addition & 1 deletion TotusPKI/ElementoPKI.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ abstract class ElementoPKI implements IElementoPKI {
protected $name;
protected $data;

public function __construct(string $name, string $data) {
public function __construct($name, $data) {
$this->name = $name;
$data = @is_file($data) ? file_get_contents($data) : $data;

Expand Down

0 comments on commit 4e18aa6

Please sign in to comment.