Conversation
src/Repositories/KeyRepository.php
Outdated
|
|
||
| public function getPathOfPrivateKey() | ||
| { | ||
| $path = $this->getLocalStorage()->directories("{$this->getPath([])}/roots")[0] . '/root.key'; |
There was a problem hiding this comment.
no uses indices, puede ser un array vacio y eso lo rompera,
el nombre lo debe sacar de la configuracion del key, yo puedo tener 100 tipos de keys, y necesito sacar por tipo de key el ultimo
src/Repositories/KeyRepository.php
Outdated
|
|
||
| public function getPathOfPublicKey() | ||
| { | ||
| $path = $this->getLocalStorage()->directories("{$this->getPath([])}/roots")[0] . '/root.pub'; |
There was a problem hiding this comment.
no uses indices, puede ser un array vacio y eso lo rompera,
el nombre lo debe sacar de la configuracion del key, yo puedo tener 100 tipos de keys, y necesito sacar por tipo de key el ultimo
src/Repositories/KeyRepository.php
Outdated
| return $this->getLocalStorage()->exists($path) ? $path : false; | ||
| } | ||
|
|
||
| public function getPrivateKey() |
There was a problem hiding this comment.
getPrivateKey(array $config)
There was a problem hiding this comment.
tal vez deberia ser estatico?
There was a problem hiding this comment.
getLastPRivateKey(array $config(
src/Repositories/KeyRepository.php
Outdated
|
|
||
| public function getPrivateKey() | ||
| { | ||
| $path = $this->getLocalStorage()->directories("{$this->getPath([])}/roots")[0] . '/root.key'; |
There was a problem hiding this comment.
aqui puede usar el metodo anterior que creaste
|
|
||
| return false; | ||
| } | ||
|
|
| { | ||
| return $this->getLocalStorage()->get($path); | ||
| } | ||
|
|
src/Repositories/KeyRepository.php
Outdated
|
|
||
| public function getPublicKey() | ||
| { | ||
| $path = $this->getLocalStorage()->directories("{$this->getPath([])}/roots")[0] . '/root.pub'; |
| <<<<<<< HEAD | ||
|
|
||
| ======= | ||
| >>>>>>> 10f1b453a30f3efed9ead6c16f7719972f7b2e32 |
There was a problem hiding this comment.
esto es un error, resuelve bien el merge pes
@NilsParedes
| return static::getLocalStorage()->exists($lastPath) ? $lastPath : false; | ||
| } | ||
|
|
||
| public static function getPrivateKey(array $config) |
| >>>>>>> 10f1b453a30f3efed9ead6c16f7719972f7b2e32 | ||
| } | ||
|
|
||
| public static function getPublicKey(array $config) |
|
|
||
| $lastPath = rtrim($lastPath, '/') . '/' . Arr::get($config, 'filename') . '.pub'; | ||
|
|
||
| return static::getLocalStorage()->exists($lastPath) ? $lastPath : false; |
There was a problem hiding this comment.
abajo tienes un metodo file exists,
creo que querias usarlo para eso
No description provided.